mod common;
use agent_os_client::ExecOptions;
#[tokio::test]
async fn wasm_command_software_mounts_into_vm() {
if !common::sidecar_available() {
eprintln!("skipping wasm_command_software_mounts_into_vm: sidecar binary not built");
return;
}
let Some(os) = common::new_vm_with_commands().await else {
eprintln!("skipping wasm_command_software_mounts_into_vm: coreutils wasm artifacts absent");
return;
};
let result = os
.exec("echo hello", ExecOptions::default())
.await
.expect("exec echo hello");
assert_eq!(
result.exit_code, 0,
"echo should exit 0 (stderr: {:?})",
result.stderr
);
assert_eq!(result.stdout.trim_end(), "hello", "echo stdout");
}