Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d3ed6fe

Browse files
authored
chore(coderd/autobuild): use dbtestutil.WillUsePostgres instead of os.Getenv in test (coder#18145)
Standardizing on `WillUsePostgres` will make it easier to remove the check entirely once dbmem is removed. Related to coder#15109.
1 parent 782d01b commit d3ed6fe

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

coderd/autobuild/lifecycle_executor_test.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package autobuild_test
22

33
import (
44
"context"
5-
"os"
65
"testing"
76
"time"
87

@@ -741,7 +740,7 @@ func TestExecutorWorkspaceAutostopNoWaitChangedMyMind(t *testing.T) {
741740
}
742741

743742
func TestExecutorAutostartMultipleOK(t *testing.T) {
744-
if os.Getenv("DB") == "" {
743+
if !dbtestutil.WillUsePostgres() {
745744
t.Skip(`This test only really works when using a "real" database, similar to a HA setup`)
746745
}
747746

0 commit comments

Comments
 (0)