(t *testing.T)
| 130 | } |
| 131 | |
| 132 | func TestHandleValidateConfigMissingEnvVar(t *testing.T) { |
| 133 | tmpDir := t.TempDir() |
| 134 | configPath := filepath.Join(tmpDir, defaultConfigFile) |
| 135 | |
| 136 | // Write a valid gitlab config but don't set GITLAB_TOKEN |
| 137 | os.WriteFile(configPath, []byte("service: gitlab\ngitlab:\n project_visibility: internal\n project_membership_type: all\n"), 0644) |
| 138 | os.Unsetenv("GITLAB_TOKEN") |
| 139 | |
| 140 | err := handleValidateConfig(configPath) |
| 141 | if err == nil { |
| 142 | t.Fatal("Expected validation error for missing GITLAB_TOKEN") |
| 143 | } |
| 144 | } |
| 145 | |
| 146 | func TestInitConfigWithConfigFile(t *testing.T) { |
| 147 | tmpDir := t.TempDir() |
nothing calls this directly
no test coverage detected