Repository navigation
refactor(e2e): add framework helpers for OS-gated skips - #1560
Conversation
Replace inline runtime.GOOS checks around ginkgo.Skip with framework.SkipOnWindows and framework.SkipUnlessOS so the OS gate lives in one place. Skip messages and the set of skipped specs are unchanged.
✅ Deploy Preview for devsydev canceled.
|
✅ Deploy Preview for images-devsy-sh canceled.
|
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 56 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
The goconst linter flagged the "windows" literal repeated three times in package framework. Use one unexported constant for it.
|
CI on 8633fec: 88/90 jobs green incl. all other e2e suites. Failures look unrelated: Unit Tests (ubuntu) TestExecStreamAttemptCancellationOwnsSource (pkg/agent/delivery, not touched here); Test integration: devsy-provider-ssh releases/latest/download/provider.yaml returns 404 (external). Needs failed-job rerun, then ready + review gates. Left draft; not merged. |
|
This pull request does not currently match the merge queue conditions, so it cannot be queued from here. The box comes back if it matches again. |
|
@coderabbitai review |
|
|
@coderabbitai review |
|
Summary
Replace inline
runtime.GOOSchecks that guardginkgo.Skipin e2e specs with two framework helpers:framework.SkipOnWindows(reason)framework.SkipUnlessOS(goos, reason)16 call sites across 10 files are converted. Skip messages are unchanged, and the same specs are skipped on the same platforms. The
"runtime"import is removed where it was the only use. TheosWindowsconstant ine2e/tests/build/build.gois removed because it had no other use.Why
The same OS gate was written about five different ways across packages (
osWindows,"windows",!= osLinux,!= "linux"). Routing them through one helper keeps the gate and the skip message together and removes the per-package constant drift.Validation
Commands actually run on commit
599bbf2d5:mise run cli:format: exit 0mise run cli:lint:ci: exit 0go vet ./e2e/...: exit 0GOOS=windows go vet ./e2e/...: exit 0GOOS=darwin go vet ./e2e/...: exit 0go test ./e2e/framework/...: pass (framework, dockerwsl, runenv)go tool ginkgo --dry-run --no-color ./e2e: 503 of 503 on this branch and 503 of 503 on origin/main (66837e2). Counts match.Not run: the e2e suites themselves. They need a live Docker, SSH, WSL, or microsandbox environment, so no suite was executed green on the head SHA.
CodeRabbit CLI
coderabbit review --agent --committed --base-commit 66837e246failed twice withConnection failed: WebSocket closed(recoverable, TRPCWebSocketClosedError). No review output was produced. This is not the "Failed to start review" error. The review is still outstanding.Auto-merge
e2e/, and it is inside the size cap (11 files: 10 in e2e/tests plus the new helper file; 77 changed lines in e2e/tests, 19 insertions and 58 deletions). But the affected suites were not run green on the head SHA, and the CodeRabbit gate did not complete. Per the auto-refactor policy this stays draft, "needs human".e2e/framework/platform.go(new file). The e2e/tests changes are 19 insertions and 58 deletions across 10 files.SkipOnWindowsandSkipUnlessOS("windows")call sites in build, dockerbuildkit, ssh, up), Linux-target e2e jobs (SkipUnlessOS("linux")in ide, up/dockerless, up/prebuilds, up/up_behaviors), and the microsandbox Linux KVM job for the dockerless and prebuilds fixtures.Next
599bbf2d5.