MCPcopy Create free account
hub / github.com/castai/openwebui-content-sync / TestMain_WithNonExistentConfigFile

Function TestMain_WithNonExistentConfigFile

main_test.go:75–89  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

73}
74
75func TestMain_WithNonExistentConfigFile(t *testing.T) {
76 // Test loading non-existent config file (should use defaults)
77 cfg, err := config.Load("non-existent-config.yaml")
78 if err != nil {
79 t.Fatalf("Failed to load default config: %v", err)
80 }
81
82 // Check default values
83 if cfg.LogLevel != "info" {
84 t.Errorf("Expected log level 'info', got '%s'", cfg.LogLevel)
85 }
86 if cfg.Schedule.Interval != 1*time.Hour {
87 t.Errorf("Expected schedule interval 1h, got %v", cfg.Schedule.Interval)
88 }
89}
90
91func TestMain_FlagParsing(t *testing.T) {
92 // Save original command line args

Callers

nothing calls this directly

Calls 1

LoadFunction · 0.92

Tested by

no test coverage detected