Stats heatmap: empty hours same height; cname_chain only for long chains
The "Busiest times" grid's hours without data used the class "empty", which picked up the padding of empty messages. One CNAME to another no longer warns; three or more get an info note showing the chain. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
9db76a113c
commit
12013b12d5
6 files changed
+41
-10
No files matched your search
@@ -161,8 +161,9 @@ func TestRecordConflicts(t *testing.T) {
|
||||
}, "cname_loop", Error},
|
||||
{"cname chain", func(b *builder, z *model.Zone) {
|
||||
b.rec(z, "a", "CNAME", "b")
|
||||
b.rec(z, "b", "CNAME", "ns1")
|
||||
}, "cname_chain", Warning},
|
||||
b.rec(z, "b", "CNAME", "c")
|
||||
b.rec(z, "c", "CNAME", "ns1")
|
||||
}, "cname_chain", Info},
|
||||
{"dangling cname", func(b *builder, z *model.Zone) { b.rec(z, "a", "CNAME", "nothing") }, "cname_dangling", Warning},
|
||||
{"null mx not alone", func(b *builder, z *model.Zone) {
|
||||
b.rec(z, "@", "MX", "0 .")
|
||||
@@ -380,3 +381,16 @@ func TestProblemStringDisplaysZone(t *testing.T) {
|
||||
t.Errorf("String() = %q, want %q", got, want)
|
||||
}
|
||||
}
|
||||
|
||||
// One CNAME to another is common and says nothing.
|
||||
func TestShortCNAMEChain(t *testing.T) {
|
||||
b := newBuilder()
|
||||
z := b.primary("example.com", nil)
|
||||
b.rec(z, "songshare", "CNAME", "navidrome")
|
||||
b.rec(z, "navidrome", "CNAME", "ns1")
|
||||
for _, p := range State(b.s, Options{}) {
|
||||
if p.Code == "cname_chain" {
|
||||
t.Errorf("one extra CNAME: %s %s", p.Severity, p.Message)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user