Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

Commit

Permalink
make sure hosts are running on separate things
Browse files Browse the repository at this point in the history
Signed-off-by: Brooks Townsend <[email protected]>

v2

Signed-off-by: Brooks Townsend <[email protected]>

same port fail

Signed-off-by: Brooks Townsend <[email protected]>
  • Loading branch information
brooksmtownsend committed Jun 5, 2023
1 parent 2b967ee commit 1318296
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 2 additions & 0 deletions crates/wash-lib/src/start/wasmcloud.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down Expand Up @@ -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());
Expand Down
13 changes: 12 additions & 1 deletion tests/integration_up.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit 1318296

Please sign in to comment.