Skip to content

Commit 190f313

Browse files
committed
Move to env variable opt out
Signed-off-by: Ryan Levick <[email protected]>
1 parent 328e990 commit 190f313

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,8 @@ jobs:
170170
- name: Run Integration Tests
171171
run: |
172172
make test-integration
173+
env:
174+
SPIN_CONFORMANCE_TESTS_DOCKER_OPT_OUT: true
173175
# Only run integration tests on macOS as they will be run on ubuntu separately
174176
if: ${{ matrix.runner == 'macos-14' }}
175177

tests/conformance-tests/src/lib.rs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@ pub fn run_test(
1616
services.push("tcp-echo");
1717
}
1818
conformance_tests::config::Precondition::Redis => {
19-
if is_docker_installed() {
19+
if should_run_docker_based_tests() {
2020
services.push("redis")
2121
} else {
2222
// Skip the test if docker is not installed.
2323
return Ok(());
2424
}
2525
}
2626
conformance_tests::config::Precondition::Mqtt => {
27-
if is_docker_installed() {
27+
if should_run_docker_based_tests() {
2828
services.push("mqtt")
2929
} else {
3030
// Skip the test if docker is not installed.
@@ -73,10 +73,6 @@ pub fn run_test(
7373
}
7474

7575
/// Whether or not docker is installed on the system.
76-
fn is_docker_installed() -> bool {
77-
std::process::Command::new("docker")
78-
.arg("--version")
79-
.output()
80-
.map(|output| output.status.success())
81-
.unwrap_or(false)
76+
fn should_run_docker_based_tests() -> bool {
77+
std::env::var("SPIN_CONFORMANCE_TESTS_DOCKER_OPT_OUT").is_err()
8278
}

0 commit comments

Comments
 (0)