We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see ourdocumentation.
There was an error while loading.Please reload this page.
1 parentf147ebf commit733d3f1Copy full SHA for 733d3f1
enterprise/cli/server_test.go
@@ -12,10 +12,20 @@ import (
12
13
"github.com/coder/coder/v2/cli/clitest"
14
"github.com/coder/coder/v2/cli/config"
15
+"github.com/coder/coder/v2/coderd/database/dbtestutil"
16
"github.com/coder/coder/v2/enterprise/cli"
17
"github.com/coder/coder/v2/testutil"
18
)
19
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
+
29
// TestServer runs the enterprise server command
30
// and waits for /healthz to return "OK".
31
funcTestServer_Single(t*testing.T) {
@@ -27,9 +37,10 @@ func TestServer_Single(t *testing.T) {
37
varroot cli.RootCmd
38
cmd,err:=root.Command(root.EnterpriseSubcommands())
39
require.NoError(t,err)
40
41
inv,cfg:=clitest.NewWithCommand(t,cmd,
42
"server",
32
-"--in-memory",
43
+dbArg(t),
33
44
"--http-address",":0",
34
45
"--access-url","http://example.com",
35
46