Support a separate database for Web UI tables
This commit is contained in:
1 parent
a2f8e59d9b
commit
f464dc0af9
38 files changed
+880
-302
No files matched your search
@@ -63,7 +63,7 @@ func TestIntegrationRecordStore(t *testing.T) {
|
||||
}
|
||||
ids[key] = id
|
||||
}
|
||||
d.rootExec(t, "INSERT INTO `coredns_records` (`zone`, `name`, `ttl`, `content`, `record_type`) VALUES ('a.org.', 'broken', NULL, NULL, 'soa')")
|
||||
d.rootExec(t, "INSERT INTO {records} (`zone`, `name`, `ttl`, `content`, `record_type`) VALUES ('a.org.', 'broken', NULL, NULL, 'soa')")
|
||||
zones, err := s.ListZones(ctx)
|
||||
if err != nil || len(zones) != 2 {
|
||||
t.Fatal(zones, err)
|
||||
@@ -361,7 +361,7 @@ func TestIntegrationSessionStore(t *testing.T) {
|
||||
if n, err := s.DeleteUserSessions(ctx, u.ID); n != 1 || err != nil {
|
||||
t.Fatal(n, err)
|
||||
}
|
||||
if d.count(t, "SELECT COUNT(*) FROM `coredns_webui_sessions`") != 1 {
|
||||
if d.count(t, "SELECT COUNT(*) FROM {sessions}") != 1 {
|
||||
t.Fatal("unexpected sessions left")
|
||||
}
|
||||
}
|
||||
@@ -434,10 +434,10 @@ func TestIntegrationDelegationStore(t *testing.T) {
|
||||
if err != nil || len(deleted) != 3 || deleted[0].Username != "admin" || deleted[1].Username != "bob" || deleted[2].Username != "dave" || deleted[1].CreatedBy != admin.ID {
|
||||
t.Fatalf("%+v %v", deleted, err)
|
||||
}
|
||||
if d.count(t, "SELECT COUNT(*) FROM `coredns_webui_zone_delegations` WHERE `zone` = 'a.org.'") != 0 {
|
||||
if d.count(t, "SELECT COUNT(*) FROM {delegations} WHERE `zone` = 'a.org.'") != 0 {
|
||||
t.Fatal("delegations left")
|
||||
}
|
||||
if d.count(t, "SELECT COUNT(*) FROM `coredns_webui_zone_delegations`") != 1 {
|
||||
if d.count(t, "SELECT COUNT(*) FROM {delegations}") != 1 {
|
||||
t.Fatal("other zone delegations deleted")
|
||||
}
|
||||
if rows, err := s.DeleteZoneDelegations(ctx, "a.org."); rows != nil || err != nil {
|
||||
|
||||
Reference in new issue
Block a user