(t *testing.T)
| 2143 | } |
| 2144 | |
| 2145 | func 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. |
| 2172 | func TestServer_TelemetryDisable(t *testing.T) { |
nothing calls this directly
no test coverage detected