fix(coderd/database): remove linux build tags from db package (#16633)

Remove linux build tags from database package to make sure we can run
tests on Mac OS.
This commit is contained in:
Yevhenii Shcherbina
2025-02-25 11:39:37 -05:00
committed by GitHub
parent 763921bc61
commit 98dfc70f31
5 changed files with 9 additions and 10 deletions

View File

@ -1,5 +1,3 @@
//go:build linux
package database_test
import (

View File

@ -1,5 +1,3 @@
//go:build linux
package dbtestutil_test
import (
@ -21,6 +19,9 @@ func TestMain(m *testing.M) {
func TestOpen(t *testing.T) {
t.Parallel()
if !dbtestutil.WillUsePostgres() {
t.Skip("this test requires postgres")
}
connect, err := dbtestutil.Open(t)
require.NoError(t, err)
@ -35,6 +36,9 @@ func TestOpen(t *testing.T) {
func TestOpen_InvalidDBFrom(t *testing.T) {
t.Parallel()
if !dbtestutil.WillUsePostgres() {
t.Skip("this test requires postgres")
}
_, err := dbtestutil.Open(t, dbtestutil.WithDBFrom("__invalid__"))
require.Error(t, err)
@ -44,6 +48,9 @@ func TestOpen_InvalidDBFrom(t *testing.T) {
func TestOpen_ValidDBFrom(t *testing.T) {
t.Parallel()
if !dbtestutil.WillUsePostgres() {
t.Skip("this test requires postgres")
}
// first check if we can create a new template db
dsn, err := dbtestutil.Open(t, dbtestutil.WithDBFrom(""))

View File

@ -1,5 +1,3 @@
//go:build linux
package migrations_test
import (

View File

@ -1,5 +1,3 @@
//go:build linux
package pubsub_test
import (

View File

@ -1,5 +1,3 @@
//go:build linux
package database_test
import (