fix: tighten config and update error handling

This commit is contained in:
2026-05-13 17:03:20 +08:00
parent 9af18f400c
commit 142c611fcb
4 changed files with 49 additions and 4 deletions

View File

@@ -62,6 +62,11 @@ func TestValidateRejectsMissingConnectionFields(t *testing.T) {
}
cfg.Gitea.Org = "skills"
if err := Validate(cfg); err == nil {
t.Fatal("Validate returned nil error without username")
}
cfg.Gitea.Username = "alice"
if err := Validate(cfg); err != nil {
t.Fatalf("Validate returned error for valid config: %v", err)
}