Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 74c00cd

Browse files
committed
Fix CI flake
1 parent 22360d3 commit 74c00cd

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

.github/workflows/coder.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ jobs:
210210
211211
- name: Test with PostgreSQL Database
212212
if: runner.os == 'Linux'
213-
run: DB=true gotestsum --junitfile="gotests.xml" --packages="./..." --
213+
run: DB=ci gotestsum --junitfile="gotests.xml" --packages="./..." --
214214
-covermode=atomic -coverprofile="gotests.coverage" -timeout=3m
215215
-coverpkg=./...,github.com/coder/coder/codersdk
216216
-count=1 -parallel=2 -race -failfast

cli/start_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ func TestStart(t *testing.T) {
3434
var accessURL string
3535
require.Eventually(t, func() bool {
3636
var err error
37-
accessURL, err = cfg.URL().Read()
37+
accessURL, err = cfg.Session().Read()
3838
return err == nil
3939
}, 15*time.Second, 25*time.Millisecond)
4040
// Verify that authentication was properly set in dev-mode.

database/postgres/postgres.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ var openPortMutex sync.Mutex
2121

2222
// Open creates a new PostgreSQL server using a Docker container.
2323
func Open() (string, func(), error) {
24-
if os.Getenv("CI") != "" {
24+
if os.Getenv("DB") == "ci" {
2525
// In CI, creating a Docker container for each test is slow.
2626
// This expects a PostgreSQL instance with the hardcoded credentials
2727
// available.

0 commit comments

Comments
 (0)