feat: awards folder in the data folder, anybody can create its own awards.

This commit is contained in:
2026-07-13 18:03:06 +02:00
parent c170d6091e
commit 656e238a59
8 changed files with 950 additions and 31 deletions
+6 -2
View File
@@ -391,9 +391,13 @@ func TestCatalogDefaults(t *testing.T) {
byCode[d.Code] = d
}
// The catalog is MEANT to grow — dropping a JSON in is how an award ships. So
// assert the ten originals are still there, never that the count is exactly ten:
// a test that fails the moment you add an award is a test that teaches you to
// ignore it.
want := []string{"DDFM", "DXCC", "IOTA", "POTA", "SOTA", "WAC", "WAS", "WAZ", "WPX", "WWFF"}
if len(defs) != len(want) {
t.Fatalf("catalog has %d awards, want %d (%v)", len(defs), len(want), byCode)
if len(defs) < len(want) {
t.Fatalf("catalog has %d awards, want at least the %d built-ins (%v)", len(defs), len(want), byCode)
}
for _, c := range want {
d, ok := byCode[c]