From 499c688c1971ddc7366d4c28c6e5db8a627b2160 Mon Sep 17 00:00:00 2001 From: Danny Kopping Date: Fri, 28 Feb 2025 08:12:04 +0000 Subject: [PATCH] Skipping on non-postgres run Signed-off-by: Danny Kopping --- enterprise/coderd/prebuilds/controller_test.go | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/enterprise/coderd/prebuilds/controller_test.go b/enterprise/coderd/prebuilds/controller_test.go index 6a78d25be0..a11622d5c1 100644 --- a/enterprise/coderd/prebuilds/controller_test.go +++ b/enterprise/coderd/prebuilds/controller_test.go @@ -17,6 +17,10 @@ import ( ) func TestNoReconciliationActionsIfNoPresets(t *testing.T) { + if !dbtestutil.WillUsePostgres() { + t.Skip("This test requires postgres") + } + // Scenario: No reconciliation actions are taken if there are no presets t.Parallel() @@ -57,6 +61,10 @@ func TestNoReconciliationActionsIfNoPresets(t *testing.T) { } func TestNoReconciliationActionsIfNoPrebuilds(t *testing.T) { + if !dbtestutil.WillUsePostgres() { + t.Skip("This test requires postgres") + } + // Scenario: No reconciliation actions are taken if there are no prebuilds t.Parallel() @@ -109,6 +117,10 @@ func TestNoReconciliationActionsIfNoPrebuilds(t *testing.T) { } func TestPrebuildCreation(t *testing.T) { + if !dbtestutil.WillUsePostgres() { + t.Skip("This test requires postgres") + } + t.Parallel() // Scenario: Prebuilds are created if and only if they are needed @@ -260,6 +272,10 @@ func TestPrebuildCreation(t *testing.T) { } func TestDeleteUnwantedPrebuilds(t *testing.T) { + if !dbtestutil.WillUsePostgres() { + t.Skip("This test requires postgres") + } + // Scenario: Prebuilds are deleted if and only if they are extraneous t.Parallel()