Skip to content

Commit 5834ed8

Browse files
authored
ci: update postgres pub table with uuid (googleapis#2745)
1 parent ea2b698 commit 5834ed8

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

tests/tool.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1754,6 +1754,12 @@ func RunPostgresListTriggersTest(t *testing.T, ctx context.Context, pool *pgxpoo
17541754

17551755
func setupPostgresPublicationTable(t *testing.T, ctx context.Context, pool *pgxpool.Pool, tableName string, pubName string) func(t *testing.T) {
17561756
t.Helper()
1757+
if _, err := pool.Exec(ctx, fmt.Sprintf("DROP PUBLICATION IF EXISTS %s;", pubName)); err != nil {
1758+
t.Errorf("unable to drop publication %s: %v", pubName, err)
1759+
}
1760+
if _, err := pool.Exec(ctx, fmt.Sprintf("DROP TABLE IF EXISTS %s;", tableName)); err != nil {
1761+
t.Errorf("unable to drop table %s: %v", tableName, err)
1762+
}
17571763
createTableStmt := fmt.Sprintf("CREATE TABLE %s (id SERIAL PRIMARY KEY, name TEXT);", tableName)
17581764
if _, err := pool.Exec(ctx, createTableStmt); err != nil {
17591765
t.Fatalf("unable to create table %s: %v", tableName, err)

0 commit comments

Comments
 (0)