Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit733d3f1

Browse files
authored
chore(enterprise/cli): remove dbmem from tests (#18795)
Related to#15109.
1 parentf147ebf commit733d3f1

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

‎enterprise/cli/server_test.go

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,20 @@ import (
1212

1313
"github.com/coder/coder/v2/cli/clitest"
1414
"github.com/coder/coder/v2/cli/config"
15+
"github.com/coder/coder/v2/coderd/database/dbtestutil"
1516
"github.com/coder/coder/v2/enterprise/cli"
1617
"github.com/coder/coder/v2/testutil"
1718
)
1819

20+
funcdbArg(t*testing.T)string {
21+
if!dbtestutil.WillUsePostgres() {
22+
return"--in-memory"
23+
}
24+
dbURL,err:=dbtestutil.Open(t)
25+
require.NoError(t,err)
26+
return"--postgres-url="+dbURL
27+
}
28+
1929
// TestServer runs the enterprise server command
2030
// and waits for /healthz to return "OK".
2131
funcTestServer_Single(t*testing.T) {
@@ -27,9 +37,10 @@ func TestServer_Single(t *testing.T) {
2737
varroot cli.RootCmd
2838
cmd,err:=root.Command(root.EnterpriseSubcommands())
2939
require.NoError(t,err)
40+
3041
inv,cfg:=clitest.NewWithCommand(t,cmd,
3142
"server",
32-
"--in-memory",
43+
dbArg(t),
3344
"--http-address",":0",
3445
"--access-url","http://example.com",
3546
)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp