run the whole spec dir by default, gate docker-backed specs on a variable

shellspec --tag ~integration filtered out untagged examples too, which
silently emptied the suite.
This commit is contained in:
Yann Autissier
2026-09-03 18:22:40 +02:00
parent 3a64c47260
commit 6c97f99f87
4 changed files with 7 additions and 2 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
--require spec_helper --require spec_helper
--shell bash --shell bash
--default-path spec/unit:spec/golden --default-path spec
--pattern "*_spec.sh" --pattern "*_spec.sh"
+1 -1
View File
@@ -12,7 +12,7 @@ test-unit: ## Run unit tests only
test-golden: ## Run golden tests only (MYOS_ENGINE=legacy|cli) test-golden: ## Run golden tests only (MYOS_ENGINE=legacy|cli)
$(SHELLSPEC) spec/golden $(SHELLSPEC) spec/golden
test-integration: ## Run tests needing a real docker daemon test-integration: ## Run tests needing a real docker daemon
$(SHELLSPEC) --tag integration MYOS_INTEGRATION=1 $(SHELLSPEC) spec/integration
golden-record: ## Re-record golden expectations from the legacy engine golden-record: ## Re-record golden expectations from the legacy engine
spec/golden/record.sh $(CASES) spec/golden/record.sh $(CASES)
lint: ## shellcheck all shell sources lint: ## shellcheck all shell sources
View File
+5
View File
@@ -4,3 +4,8 @@ MYOS_ROOT=${MYOS_ROOT:-$SHELLSPEC_PROJECT_ROOT}
SPEC_DIR=$MYOS_ROOT/spec SPEC_DIR=$MYOS_ROOT/spec
export MYOS_ROOT SPEC_DIR export MYOS_ROOT SPEC_DIR
. "$SPEC_DIR/support/run.sh" . "$SPEC_DIR/support/run.sh"
# Specs under spec/integration and spec/e2e drive a real docker daemon.
# They are skipped unless MYOS_INTEGRATION=1 / MYOS_E2E=1 (make test-integration).
myos_needs_docker() { [ -n "${MYOS_INTEGRATION:-}" ]; }
myos_needs_swarm() { [ -n "${MYOS_E2E:-}" ]; }