Repository navigation
refactor(e2e): scope vscode settings HOME with SetEnvForSpec - #1673
Conversation
BeforeEach saved os.Getenv("HOME") and AfterEach restored it with os.Setenv, so an initially unset HOME was leaked back as an empty value. Use framework.SetEnvForSpec, which restores unset and set-empty states exactly, and register temp dir removal with ginkgo.DeferCleanup right after MkdirTemp.
✅ Deploy Preview for devsydev canceled.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
✅ Deploy Preview for images-devsy-sh canceled.
|
|
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 |
✅ Action performedReview finished.
|
Summary
e2e/tests/ide/vscode_settings.go, useframework.SetEnvForSpecfor spec-scopedHOMErestoration.ginkgo.DeferCleanupimmediately afterMkdirTemp.Why
The previous save and restore used
os.Getenvandos.Setenv. IfHOMEwas unset before a spec, the restore left it set to an empty string for later specs.SetEnvForSpecpreserves the original unset, set-empty, or set-value state.Validation
mise run cli:format: only the target file changed.mise run cli:lint:ci: config verify passed; full-repo run hit its 10m timeout.golangci-lint run --timeout=30m --new-from-patchon./e2e/...: 0 issues.go vet ./e2e/...: pass;gofmt -l e2e/tests/ide: clean;go test ./e2e/framework/...: pass.dfb346c374322d40204d86848988a893a4fbea08, includingTest ide on ubuntu-latest.origin/mainand this branch because the existing product code uses the macOS settings path while the spec expects.config. This predates this change.CodeRabbit CLI
coderabbit review --agent --committed --base-commit f8bc546ccompleted on the current head with 0 findings.Size
One Ginkgo spec file changed: 2 insertions and 11 deletions (13 raw spec lines; about 6.5 at half weight). Non-test source lines changed: 0. Framework lines changed: 0.
Review
PR is ready for review. Awaiting GitHub CodeRabbit and Greptile.
Summary by CodeRabbit