This repository has been archived by the owner on May 6, 2024. It is now read-only.
chore: replicate the existing tests using testcontainers-go #7
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.
What does this PR do?
It creates a separate
main_testcontainers_test.go
file with copies of the very same tests as inmain_test.go
. These new tests use a Go build tag in order to separate their execution from the existing tests, therefore it's possible to run both test suites separately:The new tests are created using testcontainers-go, showcasing an alternative to ory/dockertest on how to test Docker containers with Testcontainer for Go.
Finally, it bumps the Go version from Go 1.16 to 1.18
Why is it important?
As we explained in #6, we don't want to replace, but coexist in this application, which is used by the Go tutorial in the Docker docs.
Related issues
Follows-up
As described in docker/docs#16221, we'd like to contribute to the Go tutorial in the Docker docs, including a section for
Testcontainers for Go
.