Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 0 additions & 35 deletions crates/api/src/yaml/client_lint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -588,38 +588,3 @@ pub fn lint_client_against_nodes(

warnings
}

#[cfg(test)]
mod tests {
use super::*;

// The `publish-no-media` rule documented at the top of this file is not
// implemented: `PublishConfig` has no `audio`/`video` boolean fields,
// only a `tracks` array. Pin the current behaviour so the rustdoc/code
// drift surfaces if anyone tries to revive the rule without re-reading
// the model. See PR description "Follow-ups / observations".
#[test]
fn publish_no_media_rule_is_not_emitted() {
let client = ClientSection {
gateway_path: Some("/gw".into()),
publish: Some(PublishConfig {
broadcast: "bcast".into(),
tracks: vec![PublishTrackConfig {
kind: TrackKind::Audio,
source: CaptureSource::Microphone,
broadcast: None,
width: None,
height: None,
codec: None,
max_bitrate: None,
}],
}),
..ClientSection::default()
};
let warnings = lint_client_section(&client, EngineMode::Dynamic);
assert!(
!warnings.iter().any(|w| w.rule == "publish-no-media"),
"unexpected `publish-no-media` warning: {warnings:?}"
);
}
}
2 changes: 1 addition & 1 deletion crates/api/src/yaml/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -844,7 +844,7 @@ fn test_lint_missing_gateway() {
}

#[test]
fn test_lint_publish_no_media() {
fn test_lint_empty_tracks() {
let mut c = dynamic_client();
c.publish = Some(PublishConfig { broadcast: "x".into(), tracks: vec![] });
let warnings = lint_client_section(&c, EngineMode::Dynamic);
Comment on lines +847 to 850
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 Info: Deleted regression test overlapped with the renamed empty-tracks coverage

The removed client_lint.rs unit test only asserted that a normal publish config with one track does not emit the obsolete publish-no-media rule. Since the lint implementation emits empty-tracks only when publish.tracks.is_empty() (crates/api/src/yaml/client_lint.rs:169-175), the renamed test here continues to cover the active behavior for empty publish configurations. A repository-wide search found no remaining publish-no-media references, so this looks like test cleanup rather than a behavioral change that needs a bug finding.

(Refers to lines 847-851)

Open in Devin Review (Staging)

Was this helpful? React with 👍 or 👎 to provide feedback.

Debug

Playground

Expand Down
Loading