Skip to content

Commit

Permalink
Use the default sink in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
colinmarc committed Dec 29, 2023
1 parent feae08b commit fc540fe
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions src/protocol/command/playback_stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -342,15 +342,6 @@ mod integration_tests {
fn create_playback_stream() -> anyhow::Result<()> {
let mut sock = connect_and_init()?;

write_command_message(sock.get_mut(), 10, Command::GetServerInfo)
.context("sending get_server_info command failed")?;
let (_, server_info) = read_reply_message::<ServerInfo>(&mut sock)
.context("get_server_info command failed")?;

let sink_name = server_info.default_sink_name.ok_or_else(|| {
anyhow::anyhow!("server has no default sink, cannot create playback stream")
})?;

write_command_message(
sock.get_mut(),
0,
Expand All @@ -368,7 +359,7 @@ mod integration_tests {
..Default::default()
},
sink_index: None,
sink_name: Some(sink_name.clone()),
sink_name: Some(CString::new("@DEFAULT_SINK@")?),
..Default::default()
}),
)?;
Expand Down

0 comments on commit fc540fe

Please sign in to comment.