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

Function TestInitConfigNoConfigFile

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

Source from the content-addressed store, hash-verified

201}
202
203func TestInitConfigNoConfigFile(t *testing.T) {
204 // No config file — should behave exactly as before
205 c, err := buildTestConfig([]string{"-service", "github"})
206 if err != nil {
207 t.Fatalf("Expected no error, got: %v", err)
208 }
209
210 if c.service != "github" {
211 t.Errorf("Expected service 'github', got: %v", c.service)
212 }
213 // Defaults should be the flag defaults
214 if c.ignoreFork {
215 t.Error("Expected ignore_fork to be false by default")
216 }
217 if c.githubRepoType != "all" {
218 t.Errorf("Expected github.repoType 'all', got: %v", c.githubRepoType)
219 }
220}
221
222func TestHandleValidateConfigInvalidRepoType(t *testing.T) {
223 tmpDir := t.TempDir()

Callers

nothing calls this directly

Calls 1

buildTestConfigFunction · 0.85

Tested by

no test coverage detected