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
This commit is contained in:
localai-org-maint-bot committed 2026-09-20 03:05:35 +00:00
1 parent 095ff79b5c
commit 7e0a90af71
1 file changed
+3 -3
+3 -3
View File
@@ -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))