Feat: Integration testing with testcontainers go #1076
Draft
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.
Motivation
Instead of building a customized container, test using base image and testcontainers-go. This enables manual individual test execution, and will only create the integration container if tests are run which require it.
Modifications
Verifying this change
cd <repo root>/pulsar && go test -v -race ./...
This change is already covered by existing integration tests.
Does this pull request potentially affect one of the following parts:
http: invalid Host header
error (Golang client fails to attach to streams with "http: invalid Host header" with go1.20.6, go1.19.11 moby/moby#45935)Documentation
WIP
Some connection tests are failing, such as the "retry on multipl hostname" or producer connection tests, however it's unclear how these changes would suddenly cause this test to fail, so it's possible these are flakey.
Tasks:
go test -v
and compare against vanilla repo in an attempt to identify tests that are passing, but shouldn't, and determine of the above errors are flakey tests or something different about thetestcontainers-go
environment