MCPcopy Create free account
hub / github.com/CodSpeedHQ/codspeed / test_walltime_executor_with_env

Function test_walltime_executor_with_env

src/executor/tests.rs:264–281  ·  view source on GitHub ↗
(
        #[case] env_case: (&str, &str),
        #[values(false, true)] enable_profiler: bool,
    )

Source from the content-addressed store, hash-verified

262 #[rstest::rstest]
263 #[test_log::test(tokio::test)]
264 async fn test_walltime_executor_with_env(
265 #[case] env_case: (&str, &str),
266 #[values(false, true)] enable_profiler: bool,
267 ) {
268 let (_permit, mut executor) = get_walltime_executor().await;
269
270 let (env_var, env_value) = env_case;
271 temp_env::async_with_vars(
272 &[(env_var, Some(env_value)), ("GITHUB_ACTIONS", None)],
273 async {
274 let cmd = env_var_validation_script(env_var, env_value);
275 let config = walltime_config(&cmd, enable_profiler);
276 let (execution_context, _temp_dir) = create_test_setup(config).await;
277 executor.run(&execution_context, &None).await.unwrap();
278 },
279 )
280 .await;
281 }
282
283 // Ensure that the working directory is used correctly
284 #[rstest::rstest]

Callers

nothing calls this directly

Calls 5

get_walltime_executorFunction · 0.85
walltime_configFunction · 0.85
create_test_setupFunction · 0.85
runMethod · 0.45

Tested by

no test coverage detected