(t *testing.T)
| 2394 | } |
| 2395 | |
| 2396 | func TestServerYAMLConfig(t *testing.T) { |
| 2397 | t.Parallel() |
| 2398 | |
| 2399 | var deployValues codersdk.DeploymentValues |
| 2400 | opts := deployValues.Options() |
| 2401 | |
| 2402 | err := opts.SetDefaults() |
| 2403 | require.NoError(t, err) |
| 2404 | |
| 2405 | n, err := opts.MarshalYAML() |
| 2406 | require.NoError(t, err) |
| 2407 | |
| 2408 | // Sanity-check that we can read the config back in. |
| 2409 | err = opts.UnmarshalYAML(n.(*yaml.Node)) |
| 2410 | require.NoError(t, err) |
| 2411 | |
| 2412 | var wantBuf bytes.Buffer |
| 2413 | enc := yaml.NewEncoder(&wantBuf) |
| 2414 | enc.SetIndent(2) |
| 2415 | err = enc.Encode(n) |
| 2416 | require.NoError(t, err) |
| 2417 | |
| 2418 | clitest.TestGoldenFile(t, "server-config.yaml", wantBuf.Bytes(), nil) |
| 2419 | } |
| 2420 | |
| 2421 | func TestConnectToPostgres(t *testing.T) { |
| 2422 | t.Parallel() |
nothing calls this directly
no test coverage detected