chore: remove references to dbtestutil.WillUsePostgres (#20436)

Addresses https://github.com/coder/internal/issues/758.

This PR only cleans up dead code, it makes no changes to test logic.
This commit is contained in:
Hugo Dutka
2025-10-23 14:24:54 +02:00
committed by GitHub
parent 4244b20823
commit e62c5db678
33 changed files with 26 additions and 380 deletions
-16
View File
@@ -534,10 +534,6 @@ func TestCreateUserWorkspace(t *testing.T) {
t.Run("ClaimPrebuild", func(t *testing.T) {
t.Parallel()
if !dbtestutil.WillUsePostgres() {
t.Skip("dbmem cannot currently claim a workspace")
}
client, db, user := coderdenttest.NewWithDatabase(t, &coderdenttest.Options{
Options: &coderdtest.Options{
DeploymentValues: coderdtest.DeploymentValues(t),
@@ -845,10 +841,6 @@ func TestWorkspaceAutobuild(t *testing.T) {
t.Run("NoDeadlock", func(t *testing.T) {
t.Parallel()
if !dbtestutil.WillUsePostgres() {
t.Skipf("Skipping non-postgres run")
}
var (
ticker = make(chan time.Time)
statCh = make(chan autobuild.Stats)
@@ -1654,10 +1646,6 @@ func TestWorkspaceAutobuild(t *testing.T) {
t.Run("NextStartAtIsNullifiedOnScheduleChange", func(t *testing.T) {
t.Parallel()
if !dbtestutil.WillUsePostgres() {
t.Skip("this test uses triggers so does not work with dbmem.go")
}
var (
tickCh = make(chan time.Time)
statsCh = make(chan autobuild.Stats)
@@ -1781,10 +1769,6 @@ func TestTemplateDoesNotAllowUserAutostop(t *testing.T) {
func TestPrebuildsAutobuild(t *testing.T) {
t.Parallel()
if !dbtestutil.WillUsePostgres() {
t.Skip("this test requires postgres")
}
getRunningPrebuilds := func(
t *testing.T,
ctx context.Context,