fix(email): unbreak factory_test.go after #333 merge glitch#337
Conversation
PR #333 (closes #332) landed a botched merge of `unset_falls_through` in TestNewSenderFromEnvironment_EmailEnabled — two overlapping copies of the same sub-test ended up concatenated (one missing its closing braces, one preceded by stray fragments), plus duplicate `ctx :=` / `sender, err :=` lines. The result didn't parse: gofmt -l internal/email/factory_test.go internal/email/factory_test.go:309:2: missing ',' before newline ... internal/email/factory_test.go:312:6: expected '(', found TestNewSenderWithConfig_AWS This trips `gofmt` and `go vet` in the pre-commit workflow on every open PR against `feat/multicloud-web-frontend` (e.g. #326, #335, #336). Keep the `prev/hadPrev` version of the sub-test (the one that actually does `os.Unsetenv` first, which is the case the test name describes), drop the orphaned `orig/hadOrig` fragment, and remove the duplicate ctx/sender declarations. Verified locally: gofmt clean, `go vet ./internal/email/...` clean, `go test ./internal/email/...` 306 tests pass.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
💤 Files with no reviewable changes (1)
📝 WalkthroughWalkthroughThe ChangesTest Environment Isolation
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
|
Caution Docstrings generation - FAILED No docstrings were generated. |
Summary
internal/email/factory_test.gowith two overlappingt.Run("unset_falls_through", ...)blocks — one missing its closing braces, one followed by duplicatedctx :=/sender, err :=lines. The file no longer parses.gofmt+go vetin thepre-commitworkflow on every open PR againstfeat/multicloud-web-frontend(feat(frontend/recs): per-column show/hide with Columns toolbar dropdown #326, fix(local-dev): docker-compose + .env.example cover the new required env vars (closes #334) #335, feat(frontend,email): Archera Insurance CTA in modals + education pages + email mentions (closes #314) #336, …). Independent of any individual PR's changes — the broken bytes live on the base.prev/hadPrevversion of the sub-test (the one that actuallyUnsetenvsEMAIL_ENABLEDfirst, which is what the test name describes), drop the orphanedorig/hadOrigfragment, and remove the duplicate ctx/sender pair.Reproduction
Or check the failing pre-commit step on any open PR against the base — same error shape.
Test plan
gofmt -l internal/email/factory_test.go— cleango vet ./internal/email/...— cleango test ./internal/email/...— 306 tests passpre-commitjob goes green (this is the workflow that was previously red on every PR)Summary by CodeRabbit