diff --git a/tests/smoke-init.sh b/tests/smoke-init.sh index 915f12b..0cc0fb4 100755 --- a/tests/smoke-init.sh +++ b/tests/smoke-init.sh @@ -70,6 +70,10 @@ pass "Mock Forgejo API v${api_version} (${retries}s)" echo "=== 2/6 Setting up mock binaries ===" mkdir -p "$MOCK_BIN" +# ── 3-7. Main smoke tests ──────────────────────────────────────────────────── +# Wrap sections 3-7 in a block so they can fail without preventing section 8 +run_main_tests() { + # ── Mock: docker ── # Intercepts docker exec calls that disinto init --bare makes to Forgejo CLI cat > "$MOCK_BIN/docker" << 'DOCKERMOCK' @@ -423,7 +427,15 @@ export CLAUDE_SHARED_DIR="$ORIG_CLAUDE_SHARED_DIR" export CLAUDE_CONFIG_DIR="$ORIG_CLAUDE_CONFIG_DIR" rm -rf /tmp/smoke-claude-shared /tmp/smoke-home-claude +# ── End of sections 3-7 ───────────────────────────────────────────────────── +} + +# Run main tests (sections 3-7) if mock forgejo is available +run_main_tests || true + # ── 8. Test duplicate service name detection ────────────────────────────── +# This test runs independently of sections 1-7 to ensure duplicate detection +# is tested even if earlier sections fail echo "=== 8/8 Testing duplicate service detection ===" # Clean up for duplicate test