From 9e55e65ac5eb6ff645880ee253a33f6ab138b615 Mon Sep 17 00:00:00 2001 From: mo khan Date: Thu, 14 Aug 2025 11:54:52 -0600 Subject: Fix the broken build by running pg as a separate container. Improve shell scripts and remove /sparkles/restore endpoint - Add error handling and debugging to shell scripts with `set -e` and `DEBUG` flag - Ensure scripts run from project root with `cd "$(dirname "$0")/.."` - Remove `/sparkles/restore` endpoint from public routes and Envoy config - Add Postgres test container support for integration tests - Update CI configuration with newer Runway version and improved test setup - Simplify Makefile by removing redundant commands ------- :robot: Commit message generated by GitLab Duo --- .../testcontainers-go/modules/postgres/options.go | 39 ++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 vendor/github.com/testcontainers/testcontainers-go/modules/postgres/options.go (limited to 'vendor/github.com/testcontainers/testcontainers-go/modules/postgres/options.go') diff --git a/vendor/github.com/testcontainers/testcontainers-go/modules/postgres/options.go b/vendor/github.com/testcontainers/testcontainers-go/modules/postgres/options.go new file mode 100644 index 0000000..5779f85 --- /dev/null +++ b/vendor/github.com/testcontainers/testcontainers-go/modules/postgres/options.go @@ -0,0 +1,39 @@ +package postgres + +import ( + "github.com/testcontainers/testcontainers-go" +) + +type options struct { + // SQLDriverName is the name of the SQL driver to use. + SQLDriverName string + Snapshot string +} + +func defaultOptions() options { + return options{ + SQLDriverName: "postgres", + Snapshot: defaultSnapshotName, + } +} + +// Compiler check to ensure that Option implements the testcontainers.ContainerCustomizer interface. +var _ testcontainers.ContainerCustomizer = (Option)(nil) + +// Option is an option for the Redpanda container. +type Option func(*options) + +// Customize is a NOOP. It's defined to satisfy the testcontainers.ContainerCustomizer interface. +func (o Option) Customize(*testcontainers.GenericContainerRequest) error { + // NOOP to satisfy interface. + return nil +} + +// WithSQLDriver sets the SQL driver to use for the container. +// It is passed to sql.Open() to connect to the database when making or restoring snapshots. +// This can be set if your app imports a different postgres driver, f.ex. "pgx" +func WithSQLDriver(driver string) Option { + return func(o *options) { + o.SQLDriverName = driver + } +} -- cgit v1.2.3