File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
coderd/database/dbtestutil Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,9 @@ func TestMain(m *testing.M) {
19
19
20
20
func TestOpen (t * testing.T ) {
21
21
t .Parallel ()
22
+ if ! dbtestutil .WillUsePostgres () {
23
+ t .Skip ("this test requires postgres" )
24
+ }
22
25
23
26
connect , err := dbtestutil .Open (t )
24
27
require .NoError (t , err )
@@ -33,6 +36,9 @@ func TestOpen(t *testing.T) {
33
36
34
37
func TestOpen_InvalidDBFrom (t * testing.T ) {
35
38
t .Parallel ()
39
+ if ! dbtestutil .WillUsePostgres () {
40
+ t .Skip ("this test requires postgres" )
41
+ }
36
42
37
43
_ , err := dbtestutil .Open (t , dbtestutil .WithDBFrom ("__invalid__" ))
38
44
require .Error (t , err )
@@ -42,6 +48,9 @@ func TestOpen_InvalidDBFrom(t *testing.T) {
42
48
43
49
func TestOpen_ValidDBFrom (t * testing.T ) {
44
50
t .Parallel ()
51
+ if ! dbtestutil .WillUsePostgres () {
52
+ t .Skip ("this test requires postgres" )
53
+ }
45
54
46
55
// first check if we can create a new template db
47
56
dsn , err := dbtestutil .Open (t , dbtestutil .WithDBFrom ("" ))
You can’t perform that action at this time.
0 commit comments