Repository navigation
refactor(e2e): share kubectl fixture runner in up tests - #1489
Conversation
Replace per-file copies of the kubectl/ssh command runner and workspace pod discovery with one shared set in e2e/tests/up/fixture_command.go: runFixtureCommand, fixtureCommand, and fixtureWorkspacePod. Timeouts are kept per call site. Failure text for the shared wrapper is now 'fixture command ...' for both call paths. Pod discovery gains the selector and GinkgoWriter diagnostics on the dockerless path.
✅ Deploy Preview for devsydev canceled.
|
✅ Deploy Preview for images-devsy-sh canceled.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
|
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. |
What
Replace per-file copies of the kubectl/ssh fixture command runner and workspace pod discovery in
e2e/tests/upwith one shared set infixture_command.go:runFixtureCommand(ctx, timeout, env, argv...): bounded exec, group cancellation, WaitDelay, env append.fixtureCommand(...): same runner, fails the spec on error.fixtureWorkspacePod(ctx, namespace, selector): Eventually-based single-ready-pod lookup.Removed:
kindSSHCommand,runKindSSHCommand,kindSSHWorkspacePod(ssh agent file) anddockerlessPathKubectl,runDockerlessPathKubectl,dockerlessPathWorkspacePod(dockerless file). Call sites now pass the program name as argv[0].Why
Two near-identical runner and pod helper copies drifted in shape only; one shared helper keeps timeouts and diagnostics in one place.
Behaviour
time.Minute, kind SSH2*time.Minute, pod discovery10*time.Second(the same clip as the oldpollCtx).os.Environ().fixture command %v: %s. The dockerless message waskubectl %v: %s; the kind message wasprivate SSH fixture command .... Neutral wording is used because kind call sites run docker, git, ssh, cp and kubectl.Verification
task cli:format: clean.go vet ./e2e/tests/up/: pass (compiles test files).task cli:lint:ci(diff-only gate): 0 issues.golangci-lint run ./e2e/tests/up/...: remaining findings are pre-existing funlen/cyclop/dupl in untouched code; none on new lines.review --committedon the commit: 0 findings.Review
CodeRabbit: 0 findings. Skipped findings: none.
Summary by CodeRabbit