mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
chore: remove references to dbtestutil.WillUsePostgres (#20436)
Addresses https://github.com/coder/internal/issues/758. This PR only cleans up dead code, it makes no changes to test logic.
This commit is contained in:
@@ -20,9 +20,6 @@ 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)
|
||||
@@ -37,9 +34,6 @@ 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)
|
||||
@@ -49,9 +43,6 @@ 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(""))
|
||||
@@ -115,9 +106,6 @@ func TestOpen_ValidDBFrom(t *testing.T) {
|
||||
func TestOpen_Panic(t *testing.T) {
|
||||
t.Skip("unskip this to manually test that we don't leak a database into postgres")
|
||||
t.Parallel()
|
||||
if !dbtestutil.WillUsePostgres() {
|
||||
t.Skip("this test requires postgres")
|
||||
}
|
||||
|
||||
_, err := dbtestutil.Open(t)
|
||||
require.NoError(t, err)
|
||||
@@ -127,9 +115,6 @@ func TestOpen_Panic(t *testing.T) {
|
||||
func TestOpen_Timeout(t *testing.T) {
|
||||
t.Skip("unskip this and set a short timeout to manually test that we don't leak a database into postgres")
|
||||
t.Parallel()
|
||||
if !dbtestutil.WillUsePostgres() {
|
||||
t.Skip("this test requires postgres")
|
||||
}
|
||||
|
||||
_, err := dbtestutil.Open(t)
|
||||
require.NoError(t, err)
|
||||
|
||||
Reference in New Issue
Block a user