Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 25, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions coderd/database/db_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
//go:build linux

package database_test

import (
Expand Down
11 changes: 9 additions & 2 deletions coderd/database/dbtestutil/postgres_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
//go:build linux

package dbtestutil_test

import (
Expand All @@ -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)
Expand All @@ -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)
Expand All @@ -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(""))
Expand Down
2 changes: 0 additions & 2 deletions coderd/database/migrations/migrate_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
//go:build linux

package migrations_test

import (
Expand Down
2 changes: 0 additions & 2 deletions coderd/database/pubsub/pubsub_linux_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
//go:build linux

package pubsub_test

import (
Expand Down
2 changes: 0 additions & 2 deletions coderd/database/querier_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
//go:build linux

package database_test

import (
Expand Down
Loading