mirror of
https://github.com/mudler/LocalAI.git
synced 2026-11-06 12:33:16 -05:00
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:
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
|
||||
|
||||
Reference in new issue
Block a user