Testing: Testcontainers for Go#1782
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
amotl
left a comment
There was a problem hiding this comment.
Excellent, thank you so much! Please also add a relevant item to .github/dependabot.yml when applicable.
c12da26 to
f95ce37
Compare
04f7fc2 to
d1673c4
Compare
kneth
left a comment
There was a problem hiding this comment.
LGTM (disclaimer: I don't know much about Golang)
Adds a self-contained Go integration-testing example under
testing/testcontainers/go-pgx/, bringing Go to parity with the existing Java and Python Testcontainers examples.Testcontainers for Go has no dedicated CrateDB module, so a small
cratedb.gohelper drives the coreGenericContainerwith the CrateDB OCI image, a single-node command line, and an HTTP wait strategy on port 4200. Tests connect over the PostgreSQL wire protocol with [pgx]. Unlikeby-language/go-pgx, the suite needs no external CrateDB and no CIservices:block — Testcontainers starts the database itself.Test cases:
TestMain) — querysys.summitsover the shared connectiont.CleanupARRAY,OBJECT(DYNAMIC),GEO_POINT,TIMESTAMP WITH TIME ZONE/_sqlREST interface on port 4200Also includes a README, a Makefile, and a CI workflow (
testing-testcontainers-go.yml: Go 1.26.x × CrateDB nightly, nightly cron).Run locally (requires Docker):
Closes #1770