fix: Make smoke test section 8 run independently of sections 1-7
Some checks failed
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/pr/ci Pipeline was successful
ci/woodpecker/pr/smoke-init Pipeline failed

This commit is contained in:
Agent 2026-04-17 15:58:51 +00:00
parent 661d92e9b4
commit ad39c6ffa4

View file

@ -70,6 +70,10 @@ pass "Mock Forgejo API v${api_version} (${retries}s)"
echo "=== 2/6 Setting up mock binaries ===" echo "=== 2/6 Setting up mock binaries ==="
mkdir -p "$MOCK_BIN" 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 ── # ── Mock: docker ──
# Intercepts docker exec calls that disinto init --bare makes to Forgejo CLI # Intercepts docker exec calls that disinto init --bare makes to Forgejo CLI
cat > "$MOCK_BIN/docker" << 'DOCKERMOCK' 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" export CLAUDE_CONFIG_DIR="$ORIG_CLAUDE_CONFIG_DIR"
rm -rf /tmp/smoke-claude-shared /tmp/smoke-home-claude 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 ────────────────────────────── # ── 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 ===" echo "=== 8/8 Testing duplicate service detection ==="
# Clean up for duplicate test # Clean up for duplicate test