8000 fix(coderd/database): remove linux build tags from db package by evgeniy-scherbina · Pull Request #16633 · coder/coder · GitHub
[go: up one dir, main page]

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
Changes from 1 commit
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
Prev Previous commit
test(coderd/database): skip tests when PostgreSQL is unavailable
  • Loading branch information
evgeniy-scherbina committed Feb 25, 2025
commit 01d399bddd1d286c9423b0424a8f94914542b1c4
9 changes: 9 additions & 0 deletions coderd/database/dbtestutil/postgres_test.go
8000
Original file line number Diff line number Diff line change
Expand Up @@ -19,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 @@ -33,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 @@ -42,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
Loading
0