Skip to content

Commit 859ff47

Browse files
committed
Fix bad_build_test with ambient RUST_LOG set
Signed-off-by: Lann Martin <[email protected]>
1 parent 7af0c0c commit 859ff47

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

tests/integration.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,8 +341,13 @@ mod integration_tests {
341341
app_type: SpinAppType::None,
342342
},
343343
ServicesConfig::none(),
344-
|_| Ok(()),
344+
|env| {
345+
// Since this test asserts exact stderr output, disable logging
346+
env.set_env_var("RUST_LOG", "off");
347+
Ok(())
348+
},
345349
)?;
350+
346351
let expected = r#"Error: Couldn't find trigger executor for local app "spin.toml"
347352
348353
Caused by:

tests/testing-framework/src/runtimes/spin_cli.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ impl SpinCli {
5959
let port = get_random_port()?;
6060
let mut spin_cmd = Command::new(spin_config.binary_path);
6161
let child = spin_cmd
62+
.envs(env.env_vars())
6263
.arg("up")
6364
.current_dir(env.path())
6465
.args(["--listen", &format!("127.0.0.1:{port}")])
@@ -117,6 +118,7 @@ impl SpinCli {
117118
env: &mut TestEnvironment<R>,
118119
) -> anyhow::Result<Self> {
119120
let mut child = Command::new(spin_config.binary_path)
121+
.envs(env.env_vars())
120122
.arg("up")
121123
.current_dir(env.path())
122124
.args(spin_config.spin_up_args)
@@ -149,6 +151,7 @@ impl SpinCli {
149151
env: &mut TestEnvironment<R>,
150152
) -> anyhow::Result<Self> {
151153
let mut child = Command::new(spin_config.binary_path)
154+
.envs(env.env_vars())
152155
.arg("up")
153156
.current_dir(env.path())
154157
.args(spin_config.spin_up_args)

0 commit comments

Comments
 (0)