chore(coderd/autobuild): use dbtestutil.WillUsePostgres instead of os.Getenv in test (#18145)

Standardizing on `WillUsePostgres` will make it easier to remove the
check entirely once dbmem is removed.

Related to https://github.com/coder/coder/issues/15109.
This commit is contained in:
Hugo Dutka
2025-06-02 13:58:07 +02:00
committed by GitHub
parent 782d01bae2
commit d3ed6fe652

View File

@ -2,7 +2,6 @@ package autobuild_test
import (
"context"
"os"
"testing"
"time"
@ -741,7 +740,7 @@ func TestExecutorWorkspaceAutostopNoWaitChangedMyMind(t *testing.T) {
}
func TestExecutorAutostartMultipleOK(t *testing.T) {
if os.Getenv("DB") == "" {
if !dbtestutil.WillUsePostgres() {
t.Skip(`This test only really works when using a "real" database, similar to a HA setup`)
}