summaryrefslogtreecommitdiff
path: root/internal/config/config_test.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-03-28 10:16:18 +0200
committerPaul Buetow <paul@buetow.org>2026-03-28 10:16:18 +0200
commit73c6a37ecf0aac04711e5624455743b3493a7ef5 (patch)
treeac58cce0dcd03ccac3f5f3e313a46ebe9d352b30 /internal/config/config_test.go
parent1615abaacccdbb5002404a77270fd333ce8ad718 (diff)
feat(sync): auto-sync full backups and showcase cgit linksv0.17.0main
Diffstat (limited to 'internal/config/config_test.go')
-rw-r--r--internal/config/config_test.go22
1 files changed, 22 insertions, 0 deletions
diff --git a/internal/config/config_test.go b/internal/config/config_test.go
index db70457..30b59df 100644
--- a/internal/config/config_test.go
+++ b/internal/config/config_test.go
@@ -25,3 +25,25 @@ func TestValidate_ShowcaseStatsBranchesRejectsEmptyBranch(t *testing.T) {
t.Fatalf("Validate() error = %q, want showcase_stats_branches context", err)
}
}
+
+func TestValidate_DescriptionSyncFieldsMustBePaired(t *testing.T) {
+ t.Parallel()
+
+ cfg := &Config{
+ Organizations: []Organization{
+ {
+ Host: "ssh://git@example.com/repos",
+ BackupLocation: true,
+ DescriptionSyncHost: "root@example.com",
+ },
+ },
+ }
+
+ err := cfg.Validate()
+ if err == nil {
+ t.Fatal("Validate() error = nil, want description sync validation error")
+ }
+ if !strings.Contains(err.Error(), "descriptionSyncHost") {
+ t.Fatalf("Validate() error = %q, want descriptionSyncHost context", err)
+ }
+}