Skip to content

fix(test): Docker skip guards + flaky test stabilization (#677)#857

Merged
diberry merged 2 commits intodevfrom
squad/723-docker-skip-guards
Apr 7, 2026
Merged

fix(test): Docker skip guards + flaky test stabilization (#677)#857
diberry merged 2 commits intodevfrom
squad/723-docker-skip-guards

Conversation

@diberry
Copy link
Copy Markdown
Collaborator

@diberry diberry commented Apr 5, 2026

Cherry-picks the fix from #723. Adds shared Docker skip guard helper and stabilizes flaky tests.

Changes

  • New: \ est/helpers/skip-guards.ts\ — shared \dockerSkipReason()\ helper
  • Refactored: \ est/aspire-integration.test.ts\ — uses shared helper instead of inline Docker check
  • Added: \ est/cli/aspire.test.ts\ — \describe.skipIf\ guard so Docker tests skip gracefully
  • Fixed: \ est/template-sync.test.ts\ — timeout 30s → 60s for flaky stability

Testing

  • ✅ 162 tests pass (Docker tests skip gracefully without Docker)
  • ✅ 5 aspire-integration tests correctly skipped

Original author: @tamirdresher
Closes #677, fixes #582

Part of stale PR triage (diberry#137)

Copilot AI review requested due to automatic review settings April 5, 2026 17:50
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 5, 2026

🟢 Impact Analysis — PR #857

Risk tier: 🟢 LOW

📊 Summary

Metric Count
Files changed 4
Files added 1
Files modified 3
Files deleted 0
Modules touched 1

🎯 Risk Factors

  • 4 files changed (≤5 → LOW)
  • 1 module(s) touched (≤1 → LOW)

📦 Modules Affected

tests (4 files)
  • test/aspire-integration.test.ts
  • test/cli/aspire.test.ts
  • test/helpers/skip-guards.ts
  • test/template-sync.test.ts

This report is generated automatically for every PR. See #733 for details.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 5, 2026

🛫 PR Readiness Check

ℹ️ This comment updates on each push. Last checked: commit 41a93ad

PR Scope: 🔧 Infrastructure

⚠️ 5 item(s) to address before review

Status Check Details
Single commit 2 commits — consider squashing before review
Not in draft Ready for review
Branch up to date dev is 3 commit(s) ahead — rebase recommended
Copilot review No Copilot review yet — it may still be processing
Changeset present No source files changed — changeset not required
Scope clean No .squad/ or docs/proposals/ files
No merge conflicts No merge conflicts
Copilot threads resolved 1 unresolved Copilot thread(s) — fix and resolve before merging
CI passing 16 check(s) still running

Files Changed (4 files, +73 −30)

File +/−
test/aspire-integration.test.ts +12 −21
test/cli/aspire.test.ts +25 −8
test/helpers/skip-guards.ts +35 −0
test/template-sync.test.ts +1 −1

Total: +73 −30


This check runs automatically on every push. Fix any ❌ items and push again.
See CONTRIBUTING.md and PR Requirements for details.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR cherry-picks the fix from #723 to make Docker-dependent tests skip gracefully when Docker is unavailable (or explicitly disabled) and to reduce flakiness in template sync tests under load.

Changes:

  • Introduces a shared Docker skip-guard helper (dockerSkipReason()) for test suites.
  • Refactors Aspire integration and CLI Aspire tests to use describe.skipIf(...) with the shared helper.
  • Increases the sync-templates.mjs execution test timeout to improve stability.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

File Description
test/helpers/skip-guards.ts Adds shared Docker availability detection and skip-reason helper for tests.
test/aspire-integration.test.ts Replaces inline Docker detection with the shared dockerSkipReason() guard.
test/cli/aspire.test.ts Wraps Docker availability describe block in a describe.skipIf(...) guard using the shared helper.
test/template-sync.test.ts Raises exec timeout from 30s to 60s to reduce flakiness under load.

Comment thread test/helpers/skip-guards.ts Outdated
Comment thread test/helpers/skip-guards.ts Outdated
Comment thread test/cli/aspire.test.ts
Comment thread test/aspire-integration.test.ts
@diberry diberry force-pushed the squad/723-docker-skip-guards branch from b3fc085 to 41a93ad Compare April 6, 2026 04:03
@diberry diberry force-pushed the squad/723-docker-skip-guards branch 2 times, most recently from 63a9c03 to a82b185 Compare April 6, 2026 15:02
- Add shared skip-guards.ts with isDockerAvailable() and dockerSkipReason()
- Split Docker-present tests from mocked tests so mocked tests always run
- Guard signal handlers behind SKIP_REASON check
- Stabilize flaky tests with proper cleanup

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@diberry diberry force-pushed the squad/723-docker-skip-guards branch from a82b185 to 0e922bc Compare April 6, 2026 16:08
Copy link
Copy Markdown
Collaborator

@tamirdresher tamirdresher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved by @tamirdresher — reviewed diff, CI green, changes are clean and well-tested. cc @diberry

@diberry diberry merged commit dde77f6 into dev Apr 7, 2026
11 checks passed
tamirdresher pushed a commit that referenced this pull request Apr 21, 2026
- Add shared skip-guards.ts with isDockerAvailable() and dockerSkipReason()
- Split Docker-present tests from mocked tests so mocked tests always run
- Guard signal handlers behind SKIP_REASON check
- Stabilize flaky tests with proper cleanup

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@bradygaster
Copy link
Copy Markdown
Owner

Closed by #theSquadsquad triage — verified fixed in v0.9.4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(test): add Docker skip guards + stabilize flaky tests under load Flaky tests under full-suite load + Docker-dependent tests need skip guard

5 participants