refactor(test): Migrate E2E tests to testcontainers-go#84
Merged
Conversation
Replace manual docker compose shell commands with testcontainers-go compose module for programmatic container lifecycle management. Key improvements: - Automatic cleanup via t.Cleanup() even on test failure - Built-in wait strategies replace manual health polling loops - Tests are self-contained Go tests, no Makefile orchestration needed - Removed boilerplate setup/teardown functions Signed-off-by: nfebe <fenn25.fn@gmail.com>
Code Review SummaryThis PR refactors the E2E testing suite to use 🚀 Key Improvements
💡 Minor Suggestions
|
Extract shared startComposeEnv() helper using testcontainers-go to eliminate duplicated compose setup across security and lua tests. Use t.Context() instead of context.Background() in test functions. Bump Go version from 1.24 to 1.25 across Dockerfiles, CI workflow, and go.mod to satisfy testcontainers-go v0.41.0 minimum requirement. Signed-off-by: nfebe <fenn25.fn@gmail.com>
55a2749 to
873669c
Compare
873669c to
11caff0
Compare
golangci-lint v1 is built with Go 1.24 and cannot lint code targeting Go 1.25. Upgrade CI action to v7 with golangci-lint v2, update Makefile install path, and add .golangci.yml to disable errcheck and ST/QF staticcheck rules that are newly enabled in v2 defaults. Signed-off-by: nfebe <fenn25.fn@gmail.com>
11caff0 to
19c56ee
Compare
…ners API Use testcontainers.GenericNetwork to create the proxy Docker network instead of shelling out via exec.Command. Cleanup functions now log errors instead of discarding them with _ =. Signed-off-by: nfebe <fenn25.fn@gmail.com>
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.
Replace manual docker compose shell commands with testcontainers-go compose module for programmatic container lifecycle management.
Key improvements: