MCPcopy Create free account
hub / github.com/amitsaha/gitbackup / TestHandleValidateConfigInvalidService

Function TestHandleValidateConfigInvalidService

config_file_test.go:119–130  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

117}
118
119func 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
132func TestHandleValidateConfigMissingEnvVar(t *testing.T) {
133 tmpDir := t.TempDir()

Callers

nothing calls this directly

Calls 1

handleValidateConfigFunction · 0.85

Tested by

no test coverage detected