Add seed migration with zones and records from CoreDNS zone files

Populates the database on first run with the two existing zones
(svc.mcp.metacircular.net, mcp.metacircular.net) and all their A
records (metacrypt, mcr, sgard, mcp-agent, rift, ns).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-26 20:35:16 -07:00
parent f9635578e0
commit 5efd51b3d7
4 changed files with 78 additions and 49 deletions

View File

@@ -79,8 +79,9 @@ func TestListZones(t *testing.T) {
if err != nil {
t.Fatalf("list zones: %v", err)
}
if len(zones) != 2 {
t.Fatalf("got %d zones, want 2", len(zones))
// 2 seed zones + 2 created = 4 total. Verify ours are present and ordered.
if len(zones) != 4 {
t.Fatalf("got %d zones, want 4", len(zones))
}
if zones[0].Name != "a.example.com" {
t.Fatalf("zones should be ordered by name, got %q first", zones[0].Name)