From 7e0a90af713a6efd34b044aaab62d25952e548b3 Mon Sep 17 00:00:00 2001 From: localai-org-maint-bot <306269227+localai-org-maint-bot@users.noreply.github.com> Date: Mon, 7 Sep 2026 16:08:13 +0000 Subject: [PATCH] test: guard shared PostgreSQL setup on macOS Apply the existing Docker skip at the container entry point so the maintenance-connection regression cannot bypass it. Assisted-by: Codex:GPT-6 --- core/services/testutil/testdb.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/services/testutil/testdb.go b/core/services/testutil/testdb.go index bd732ef66..4201293e4 100644 --- a/core/services/testutil/testdb.go +++ b/core/services/testutil/testdb.go @@ -87,6 +87,9 @@ var _ = AfterSuite(func() { // true thing. func sharedPostgres() string { GinkgoHelper() + if runtime.GOOS == "darwin" { + Skip("testcontainers requires Docker, not available on macOS CI") + } sharedOnce.Do(func() { ctx := context.Background() @@ -133,9 +136,6 @@ func SetupTestDB() *gorm.DB { // out and lose them on the next one. func SetupTestDBWithDSN() (*gorm.DB, string) { GinkgoHelper() - if runtime.GOOS == "darwin" { - Skip("testcontainers requires Docker, not available on macOS CI") - } dsn := sharedPostgres() name := fmt.Sprintf("testdb_%d", dbCounter.Add(1))