{{ message }}
Repository navigation
fix(email): unbreak factory_test.go after #333 merge glitch - #337
Merged
cristim merged 1 commit intoMay 11, 2026
Merged
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.
Contributor
Member
Author
|
@coderabbitai review |
Contributor
✅ Actions performedReview triggered.
|
Contributor
This was referenced May 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

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