File tree 3 files changed +5
-5
lines changed
3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -210,7 +210,7 @@ jobs:
210
210
211
211
- name : Test with PostgreSQL Database
212
212
if : runner.os == 'Linux'
213
- run : DB=true gotestsum --junitfile="gotests.xml" --packages="./..." --
213
+ run : DB=ci gotestsum --junitfile="gotests.xml" --packages="./..." --
214
214
-covermode=atomic -coverprofile="gotests.coverage" -timeout=3m
215
215
-coverpkg=./...,github.com/coder/coder/codersdk
216
216
-count=1 -parallel=2 -race -failfast
Original file line number Diff line number Diff line change @@ -31,14 +31,14 @@ func TestStart(t *testing.T) {
31
31
err := root .ExecuteContext (ctx )
32
32
require .ErrorIs (t , err , context .Canceled )
33
33
}()
34
- var accessURL string
34
+ var token string
35
35
require .Eventually (t , func () bool {
36
36
var err error
37
- accessURL , err = cfg .URL ().Read ()
37
+ token , err = cfg .Session ().Read ()
38
38
return err == nil
39
39
}, 15 * time .Second , 25 * time .Millisecond )
40
40
// Verify that authentication was properly set in dev-mode.
41
- token , err := cfg .Session ().Read ()
41
+ accessURL , err := cfg .URL ().Read ()
42
42
require .NoError (t , err )
43
43
parsed , err := url .Parse (accessURL )
44
44
require .NoError (t , err )
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ var openPortMutex sync.Mutex
21
21
22
22
// Open creates a new PostgreSQL server using a Docker container.
23
23
func Open () (string , func (), error ) {
24
- if os .Getenv ("CI " ) != " " {
24
+ if os .Getenv ("DB " ) == "ci " {
25
25
// In CI, creating a Docker container for each test is slow.
26
26
// This expects a PostgreSQL instance with the hardcoded credentials
27
27
// available.
You can’t perform that action at this time.
0 commit comments