diff --git a/tests/integration_get.rs b/tests/integration_get.rs index 1c970217..2b786fea 100644 --- a/tests/integration_get.rs +++ b/tests/integration_get.rs @@ -15,7 +15,14 @@ async fn integration_get_hosts_serial() -> Result<()> { let wash_instance = TestWashInstance::create().await?; let output = Command::new(env!("CARGO_BIN_EXE_wash")) - .args(["get", "hosts", "--output", "json"]) + .args([ + "get", + "hosts", + "--output", + "json", + "--ctl-port", + &wash_instance.nats_port.to_string(), + ]) .kill_on_drop(true) .output() .await @@ -37,10 +44,17 @@ async fn integration_get_hosts_serial() -> Result<()> { #[tokio::test] #[serial] async fn integration_get_links_serial() -> Result<()> { - let _wash_instance = TestWashInstance::create().await?; + let wash_instance = TestWashInstance::create().await?; let output = Command::new(env!("CARGO_BIN_EXE_wash")) - .args(["get", "links", "--output", "json"]) + .args([ + "get", + "links", + "--output", + "json", + "--ctl-port", + &wash_instance.nats_port.to_string(), + ]) .kill_on_drop(true) .output() .await @@ -67,6 +81,8 @@ async fn integration_get_host_inventory_serial() -> Result<()> { &wash_instance.host_id, "--output", "json", + "--ctl-port", + &wash_instance.nats_port.to_string(), ]) .kill_on_drop(true) .output() @@ -122,10 +138,17 @@ async fn integration_get_host_inventory_serial() -> Result<()> { #[tokio::test] #[serial] async fn integration_get_claims_serial() -> Result<()> { - let _wash_instance = TestWashInstance::create().await?; + let wash_instance = TestWashInstance::create().await?; let output = Command::new(env!("CARGO_BIN_EXE_wash")) - .args(["get", "claims", "--output", "json"]) + .args([ + "get", + "claims", + "--output", + "json", + "--ctl-port", + &wash_instance.nats_port.to_string(), + ]) .kill_on_drop(true) .output() .await diff --git a/tests/integration_link.rs b/tests/integration_link.rs index 6075870b..c50a8422 100644 --- a/tests/integration_link.rs +++ b/tests/integration_link.rs @@ -9,10 +9,17 @@ use common::TestWashInstance; #[tokio::test] #[serial] async fn integration_link_serial() -> Result<()> { - let _wash = TestWashInstance::create().await?; + let wash = TestWashInstance::create().await?; let output = Command::new(env!("CARGO_BIN_EXE_wash")) - .args(["link", "query", "--output", "json"]) + .args([ + "link", + "query", + "--output", + "json", + "--ctl-port", + &wash.nats_port.to_string(), + ]) .kill_on_drop(true) .output() .await diff --git a/tests/integration_start.rs b/tests/integration_start.rs index f0f07c6e..317216c8 100644 --- a/tests/integration_start.rs +++ b/tests/integration_start.rs @@ -9,7 +9,7 @@ use common::{TestWashInstance, ECHO_OCI_REF, PROVIDER_HTTPSERVER_OCI_REF}; #[tokio::test] #[serial] async fn integration_start_actor_serial() -> Result<()> { - let _wash_instance = TestWashInstance::create().await?; + let wash_instance = TestWashInstance::create().await?; let output = Command::new(env!("CARGO_BIN_EXE_wash")) .args([ @@ -20,6 +20,8 @@ async fn integration_start_actor_serial() -> Result<()> { "json", "--timeout-ms", "40000", + "--ctl-port", + &wash_instance.nats_port.to_string(), ]) .kill_on_drop(true) .output() @@ -38,7 +40,7 @@ async fn integration_start_actor_serial() -> Result<()> { #[tokio::test] #[serial] async fn integration_start_provider_serial() -> Result<()> { - let _wash_instance = TestWashInstance::create().await?; + let wash_instance = TestWashInstance::create().await?; let output = Command::new(env!("CARGO_BIN_EXE_wash")) .args([ @@ -49,6 +51,8 @@ async fn integration_start_provider_serial() -> Result<()> { "json", "--timeout-ms", "40000", + "--ctl-port", + &wash_instance.nats_port.to_string(), ]) .kill_on_drop(true) .output() diff --git a/tests/integration_stop.rs b/tests/integration_stop.rs index 1201bdac..f0e6507e 100644 --- a/tests/integration_stop.rs +++ b/tests/integration_stop.rs @@ -20,6 +20,8 @@ async fn integration_stop_actor_serial() -> Result<()> { "json", "--timeout-ms", "20000", + "--ctl-port", + &wash_instance.nats_port.to_string(), ]) .output() .await @@ -42,7 +44,16 @@ async fn integration_stop_actor_serial() -> Result<()> { // Stop the actor let output = Command::new(env!("CARGO_BIN_EXE_wash")) - .args(["stop", "actor", &host_id, &actor_id, "--output", "json"]) + .args([ + "stop", + "actor", + &host_id, + &actor_id, + "--output", + "json", + "--ctl-port", + &wash_instance.nats_port.to_string(), + ]) .output() .await .context("failed to stop actor")?; @@ -70,6 +81,8 @@ async fn integration_stop_provider_serial() -> Result<()> { "json", "--timeout-ms", "20000", + "--ctl-port", + &wash_instance.nats_port.to_string(), ]) .output() .await @@ -107,6 +120,8 @@ async fn integration_stop_provider_serial() -> Result<()> { &contract_id, "--output", "json", + "--ctl-port", + &wash_instance.nats_port.to_string(), ]) .output() .await @@ -127,7 +142,15 @@ async fn integration_stop_host_serial() -> Result<()> { let wash_instance = TestWashInstance::create().await?; let output = Command::new(env!("CARGO_BIN_EXE_wash")) - .args(["stop", "host", &wash_instance.host_id, "--output", "json"]) + .args([ + "stop", + "host", + &wash_instance.host_id, + "--output", + "json", + "--ctl-port", + &wash_instance.nats_port.to_string(), + ]) .output() .await .context("failed to stop provider")?;