test(connectors): wipe the migration and pairing tables before each PostgreSQL spec

The coverage run and the no-skips run share one database. The migration
claim left its rows behind, so the second run found the claim taken and
two specs failed. Wipe the two tables the setup left out.

Assisted-by: Claude:claude-sonnet-5-5 go
This commit is contained in:
Ettore Di Giacinto committed 2026-11-04 06:59:46 +00:00
1 parent 63387c26db
commit 1e75fc11bc
1 file changed
+1 -1
@@ -29,7 +29,7 @@ var _ = Describe("GORM on PostgreSQL", func() {
DeferCleanup(func() { _ = sqlDB.Close() })
s, err := connectors.NewGORM(db)
Expect(err).NotTo(HaveOccurred())
for _, tbl := range []string{"studio_connector_chats", "studio_connector_senders", "studio_connector_state", "studio_connector_keys", "studio_connectors"} {
for _, tbl := range []string{"studio_connector_chats", "studio_connector_senders", "studio_connector_state", "studio_connector_keys", "studio_connector_pairings", "studio_connector_migrations", "studio_connectors"} {
Expect(db.Exec("DELETE FROM " + tbl).Error).To(Succeed())
}
return s