diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 0f23005..3a887dd 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -31,7 +31,9 @@ jobs: go-version: '1.22' - name: Setup pg_dump - run: sudo apt-get install postgresql-client + run: | + sudo apt-get install postgresql-client + which pg_dump - name: Wait for PostgreSQL to be ready run: | diff --git a/pkg/utils/testutils/snapshoting.go b/pkg/utils/testutils/snapshoting.go index ee3f584..2101907 100644 --- a/pkg/utils/testutils/snapshoting.go +++ b/pkg/utils/testutils/snapshoting.go @@ -140,7 +140,10 @@ func MaySnapshotSavePgDump(t TestingT, schemaName string, db schema.DatabaseCred env := map[string]string{"PGPASSWORD": db.Pass} - _, _, err = cmdexec.Exec(getPgDumpPath(), args, env) + _, stderr, err := cmdexec.Exec(getPgDumpPath(), args, env) + if err != nil { + fmt.Println(stderr) + } require.NoError(t, err) return @@ -168,7 +171,10 @@ func AssertSnapshotPgDumpDiff(t TestingT, schemaName string, db schema.DatabaseC env := map[string]string{"PGPASSWORD": db.Pass} - _, _, err := cmdexec.Exec(getPgDumpPath(), args, env) + _, stderr, err := cmdexec.Exec(getPgDumpPath(), args, env) + if err != nil { + fmt.Println(stderr) + } require.NoError(t, err) snap, err := os.ReadFile(fileSnap)