Skip to content

Commit 98dfc70

Browse files
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.
1 parent 763921b commit 98dfc70

File tree

5 files changed

+9
-10
lines changed

5 files changed

+9
-10
lines changed

coderd/database/db_test.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
//go:build linux
2-
31
package database_test
42

53
import (

coderd/database/dbtestutil/postgres_test.go

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
//go:build linux
2-
31
package dbtestutil_test
42

53
import (
@@ -21,6 +19,9 @@ func TestMain(m *testing.M) {
2119

2220
func TestOpen(t *testing.T) {
2321
t.Parallel()
22+
if !dbtestutil.WillUsePostgres() {
23+
t.Skip("this test requires postgres")
24+
}
2425

2526
connect, err := dbtestutil.Open(t)
2627
require.NoError(t, err)
@@ -35,6 +36,9 @@ func TestOpen(t *testing.T) {
3536

3637
func TestOpen_InvalidDBFrom(t *testing.T) {
3738
t.Parallel()
39+
if !dbtestutil.WillUsePostgres() {
40+
t.Skip("this test requires postgres")
41+
}
3842

3943
_, err := dbtestutil.Open(t, dbtestutil.WithDBFrom("__invalid__"))
4044
require.Error(t, err)
@@ -44,6 +48,9 @@ func TestOpen_InvalidDBFrom(t *testing.T) {
4448

4549
func TestOpen_ValidDBFrom(t *testing.T) {
4650
t.Parallel()
51+
if !dbtestutil.WillUsePostgres() {
52+
t.Skip("this test requires postgres")
53+
}
4754

4855
// first check if we can create a new template db
4956
dsn, err := dbtestutil.Open(t, dbtestutil.WithDBFrom(""))

coderd/database/migrations/migrate_test.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
//go:build linux
2-
31
package migrations_test
42

53
import (

coderd/database/pubsub/pubsub_linux_test.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
//go:build linux
2-
31
package pubsub_test
42

53
import (

coderd/database/querier_test.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
//go:build linux
2-
31
package database_test
42

53
import (

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy