MCPcopy Index your code
hub / github.com/coder/coder / TestServer_Production

Function TestServer_Production

cli/server_test.go:2145–2169  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

2143}
2144
2145func TestServer_Production(t *testing.T) {
2146 t.Parallel()
2147 if runtime.GOOS != "linux" || testing.Short() {
2148 // Skip on non-Linux because it spawns a PostgreSQL instance.
2149 t.SkipNow()
2150 }
2151
2152 // Postgres + race detector + CI = slow.
2153 ctx, cancelFunc := context.WithTimeout(context.Background(), testutil.WaitSuperLong*3)
2154 defer cancelFunc()
2155
2156 inv, cfg := clitest.New(t,
2157 "server",
2158 "--http-address", ":0",
2159 "--access-url", "http://example.com",
2160 dbArg(t),
2161 "--cache-dir", t.TempDir(),
2162 )
2163 clitest.Start(t, inv.WithContext(ctx))
2164 accessURL := waitAccessURL(t, cfg)
2165 client := codersdk.New(accessURL)
2166
2167 _, err := client.CreateFirstUser(ctx, coderdtest.FirstUserParams)
2168 require.NoError(t, err)
2169}
2170
2171//nolint:tparallel,paralleltest // This test sets environment variables.
2172func TestServer_TelemetryDisable(t *testing.T) {

Callers

nothing calls this directly

Calls 9

NewFunction · 0.92
StartFunction · 0.92
NewFunction · 0.92
SkipNowMethod · 0.80
WithContextMethod · 0.80
CreateFirstUserMethod · 0.80
dbArgFunction · 0.70
waitAccessURLFunction · 0.70
TempDirMethod · 0.65

Tested by

no test coverage detected