(t *testing.T)
| 117 | } |
| 118 | |
| 119 | func TestHandleValidateConfigInvalidService(t *testing.T) { |
| 120 | tmpDir := t.TempDir() |
| 121 | configPath := filepath.Join(tmpDir, defaultConfigFile) |
| 122 | |
| 123 | // Write a config with an invalid service |
| 124 | os.WriteFile(configPath, []byte("service: notaservice\n"), 0644) |
| 125 | |
| 126 | err := handleValidateConfig(configPath) |
| 127 | if err == nil { |
| 128 | t.Fatal("Expected validation error for invalid service") |
| 129 | } |
| 130 | } |
| 131 | |
| 132 | func TestHandleValidateConfigMissingEnvVar(t *testing.T) { |
| 133 | tmpDir := t.TempDir() |
nothing calls this directly
no test coverage detected