From 1318296f105b14f114c95c8569b65961c4540bd5 Mon Sep 17 00:00:00 2001 From: Brooks Townsend Date: Thu, 18 May 2023 09:55:11 -0400 Subject: [PATCH] make sure hosts are running on separate things Signed-off-by: Brooks Townsend v2 Signed-off-by: Brooks Townsend same port fail Signed-off-by: Brooks Townsend --- crates/wash-lib/src/start/wasmcloud.rs | 2 ++ tests/integration_up.rs | 13 ++++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/crates/wash-lib/src/start/wasmcloud.rs b/crates/wash-lib/src/start/wasmcloud.rs index 6d19df5f9..71aeaac25 100644 --- a/crates/wash-lib/src/start/wasmcloud.rs +++ b/crates/wash-lib/src/start/wasmcloud.rs @@ -456,6 +456,7 @@ mod test { .await; let mut host_env = HashMap::new(); + host_env.insert("WASMCLOUD_DASHBOARD_PORT".to_string(), "5003".to_string()); host_env.insert("WASMCLOUD_RPC_PORT".to_string(), nats_port.to_string()); host_env.insert("WASMCLOUD_CTL_PORT".to_string(), nats_port.to_string()); host_env.insert("WASMCLOUD_PROV_RPC_PORT".to_string(), nats_port.to_string()); @@ -488,6 +489,7 @@ mod test { // Should fail because the port is already in use by another host let mut host_env = HashMap::new(); + host_env.insert("WASMCLOUD_DASHBOARD_PORT".to_string(), "5003".to_string()); host_env.insert("WASMCLOUD_RPC_PORT".to_string(), nats_port.to_string()); host_env.insert("WASMCLOUD_CTL_PORT".to_string(), nats_port.to_string()); host_env.insert("WASMCLOUD_PROV_RPC_PORT".to_string(), nats_port.to_string()); diff --git a/tests/integration_up.rs b/tests/integration_up.rs index 3c5b73bdd..4a5d19362 100644 --- a/tests/integration_up.rs +++ b/tests/integration_up.rs @@ -27,6 +27,8 @@ async fn integration_up_can_start_wasmcloud_and_actor_serial() -> Result<()> { "up", "--nats-port", "5893", + "--dashboard-port", + "5002", "-o", "json", "--detached", @@ -116,7 +118,16 @@ async fn integration_up_can_stop_detached_host_serial() -> Result<()> { let stdout = std::fs::File::create(&path).expect("could not create log file for wash up test"); let mut up_cmd = Command::new(env!("CARGO_BIN_EXE_wash")) - .args(["up", "--nats-port", "5894", "-o", "json", "--detached"]) + .args([ + "up", + "--nats-port", + "5894", + "--dashboard-port", + "5001", + "-o", + "json", + "--detached", + ]) .kill_on_drop(true) .stdout(stdout) .spawn()