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

Function env_var_validation_script

src/executor/tests.rs:51–62  ·  view source on GitHub ↗
(env: &str, expected: &str)

Source from the content-addressed store, hash-verified

49 ];
50
51 pub fn env_var_validation_script(env: &str, expected: &str) -> String {
52 let expected: String = expected.quoted(Bash);
53 format!(
54 r#"
55if [ "${env}" != {expected} ]; then
56 echo "FAIL: Environment variable not set correctly"
57 echo "Got: '${env}'"
58 exit 1
59fi
60"#
61 )
62 }
63
64 pub const ENV_TESTS: [(&str, &str); 8] = [
65 // Mixed quotes, backticks, and shell metacharacters

Calls

no outgoing calls

Tested by

no test coverage detected