Documentation
¶
Overview ¶
Command seed-embedded-postgres fills the embedded-postgres binary cache at image build time.
github.com/fergusstrange/embedded-postgres downloads a postgres build from Maven Central the first time a test starts a server, and caches it under $HOME/.embedded-postgres-go. CI containers start with that cache empty, so every test run fetched the jar again, and any non-200 from the repository failed the suite — reported as "no version found matching <version>", which the library returns for any bad status, not just a missing artifact. Seeding the cache while the image is built means the tests themselves never reach the network.
Run it with the postgres versions a service's tests ask for:
go run .../seed-embedded-postgres 14.13.0
Only the standard library is used, so it runs with `go run <file>` from anywhere, with no module context and nothing to download first.