Skip to content

Commit

Permalink
test(e2e): add one e2e test with memory persistence
Browse files Browse the repository at this point in the history
Signed-off-by: Márk Kővári <[email protected]>
  • Loading branch information
markkovari committed Dec 24, 2024
1 parent 4070caa commit b85a3c6
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 8 deletions.
13 changes: 8 additions & 5 deletions tests/e2e.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ impl ClientInfo {
self.wadm_clients.insert(lattice_prefix.to_string(), client);
}

pub async fn launch_wadm(&mut self) {
pub async fn launch_wadm(&mut self, extra_envs: Option<HashMap<&str, &str>>) {
let repo_root =
PathBuf::from(std::env::var("CARGO_MANIFEST_DIR").expect("Unable to find repo root"));
// Create the logging directory
Expand All @@ -172,6 +172,12 @@ impl ClientInfo {
wadm_binary_path.display()
)
}
let mut envs = HashMap::from([
("RUST_LOG","info,wadm=debug,wadm::scaler=trace,wadm::workers::event=trace,wasmcloud_control_interface=trace")
]);
if let Some(extra_envs) = extra_envs {
envs.extend(extra_envs);
}

for i in 0..3 {
let log_path = log_dir.join(format!("wadm-{i}"));
Expand All @@ -184,10 +190,7 @@ impl ClientInfo {
.stderr(file)
.stdout(Stdio::null())
.kill_on_drop(true)
.env(
"RUST_LOG",
"info,wadm=debug,wadm::scaler=trace,wadm::workers::event=trace,wasmcloud_control_interface=trace",
)
.envs(&envs)
.spawn()
.expect("Unable to spawn wadm binary");
self.commands.push(child);
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e_multiple_hosts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ async fn run_multiple_host_tests() {
let mut client_info = ClientInfo::new(manifest_dir, compose_file).await;
client_info.add_ctl_client(DEFAULT_LATTICE_ID, None).await;
client_info.add_wadm_client(DEFAULT_LATTICE_ID).await;
client_info.launch_wadm().await;
client_info.launch_wadm(None).await;

// Wait for the first event on the lattice prefix before we start deploying and checking
// statuses. Wadm can absolutely handle hosts starting before you start the wadm process, but the first event
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e_shared.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ async fn run_shared_component_tests() {
client_info.add_wadm_client(SHARED_PROVIDERS_LATTICE).await;
client_info.add_ctl_client(INVALID_TEST_LATTICE, None).await;
client_info.add_wadm_client(INVALID_TEST_LATTICE).await;
client_info.launch_wadm().await;
client_info.launch_wadm(None).await;

// Wait for the first event on the lattice prefix before we start deploying and checking
// statuses. Wadm can absolutely handle hosts starting before you start the wadm process, but the first event
Expand Down
5 changes: 4 additions & 1 deletion tests/e2e_upgrades.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ async fn run_upgrade_tests() {
let mut client_info = ClientInfo::new(manifest_dir, compose_file).await;
client_info.add_ctl_client("default", None).await;
client_info.add_wadm_client("default").await;
client_info.launch_wadm().await;
client_info
// .launch_wadm(Some(HashMap::from([("--stream-persistence", "memory")])))
.launch_wadm(None)
.await;

// Wait for the first event on the lattice prefix before we start deploying and checking
// statuses. Wadm can absolutely handle hosts starting before you start the wadm process, but the first event
Expand Down

0 comments on commit b85a3c6

Please sign in to comment.