mirror of
https://github.com/coder/coder.git
synced 2025-07-03 16:13:58 +00:00
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:
committed by
GitHub
parent
763921bc61
commit
98dfc70f31
@ -1,5 +1,3 @@
|
||||
//go:build linux
|
||||
|
||||
package database_test
|
||||
|
||||
import (
|
||||
|
@ -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(""))
|
||||
|
@ -1,5 +1,3 @@
|
||||
//go:build linux
|
||||
|
||||
package migrations_test
|
||||
|
||||
import (
|
||||
|
@ -1,5 +1,3 @@
|
||||
//go:build linux
|
||||
|
||||
package pubsub_test
|
||||
|
||||
import (
|
||||
|
@ -1,5 +1,3 @@
|
||||
//go:build linux
|
||||
|
||||
package database_test
|
||||
|
||||
import (
|
||||
|
Reference in New Issue
Block a user