From b4d3d588ff6cd0db9d203c33c5063ba69ce4d2a2 Mon Sep 17 00:00:00 2001 From: Stefan Niclas Heun Date: Sat, 8 Feb 2025 00:06:56 +0100 Subject: [PATCH] adding minimal fixes --- .github/workflows/go-tests.yml | 2 ++ server/testutils/db_setup.go | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/go-tests.yml b/.github/workflows/go-tests.yml index 206a322e..45b2122c 100644 --- a/.github/workflows/go-tests.yml +++ b/.github/workflows/go-tests.yml @@ -21,6 +21,8 @@ jobs: - name: Install dependencies run: cd ${{ matrix.directory }} && go mod download - name: Test with Go + env: + TESTCONTAINERS_RYUK_DISABLED: "true" run: cd ${{ matrix.directory }} && go test ./... -json > TestResults-${{ matrix.directory }}.json - name: Upload Go test results if: always() diff --git a/server/testutils/db_setup.go b/server/testutils/db_setup.go index c37ba9f8..5585adc8 100644 --- a/server/testutils/db_setup.go +++ b/server/testutils/db_setup.go @@ -4,7 +4,6 @@ import ( "context" "fmt" "os" - "time" "github.com/jackc/pgx/v5/pgxpool" db "github.com/niclasheun/prompt2.0/db/sqlc" @@ -27,7 +26,10 @@ func SetupTestDB(ctx context.Context, sqlDumpPath string) (*TestDB, func(), erro "POSTGRES_PASSWORD": "testpass", "POSTGRES_DB": "prompt", }, - WaitingFor: wait.ForListeningPort("5432/tcp").WithStartupTimeout(300 * time.Second), + WaitingFor: wait.ForAll( + wait.ForLog("database system is ready to accept connections"), + wait.ForListeningPort("5432/tcp"), + ), } container, err := testcontainers.GenericContainer(ctx, testcontainers.GenericContainerRequest{