diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9887529a8..6c7528d18 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -170,6 +170,8 @@ jobs: - name: Run Integration Tests run: | make test-integration + env: + SPIN_CONFORMANCE_TESTS_DOCKER_OPT_OUT: true # Only run integration tests on macOS as they will be run on ubuntu separately if: ${{ matrix.runner == 'macos-14' }} diff --git a/tests/conformance-tests/src/lib.rs b/tests/conformance-tests/src/lib.rs index 8aacf5238..a03084819 100644 --- a/tests/conformance-tests/src/lib.rs +++ b/tests/conformance-tests/src/lib.rs @@ -16,7 +16,7 @@ pub fn run_test( services.push("tcp-echo"); } conformance_tests::config::Precondition::Redis => { - if is_docker_installed() { + if should_run_docker_based_tests() { services.push("redis") } else { // Skip the test if docker is not installed. @@ -24,7 +24,7 @@ pub fn run_test( } } conformance_tests::config::Precondition::Mqtt => { - if is_docker_installed() { + if should_run_docker_based_tests() { services.push("mqtt") } else { // Skip the test if docker is not installed. @@ -73,10 +73,6 @@ pub fn run_test( } /// Whether or not docker is installed on the system. -fn is_docker_installed() -> bool { - std::process::Command::new("docker") - .arg("--version") - .output() - .map(|output| output.status.success()) - .unwrap_or(false) +fn should_run_docker_based_tests() -> bool { + std::env::var("SPIN_CONFORMANCE_TESTS_DOCKER_OPT_OUT").is_err() }