milestone 17: real deadlines, validator holes, upstream editor, trusted proxies, contract samples, badvers
This commit is contained in:
@@ -730,6 +730,22 @@ test "every HELP line has a TYPE line and a sample, and every sample a name" {
|
||||
try testing.expectEqual(helps, samples);
|
||||
// `nxdns_up` plus every DNS counter: the families a bare state still has.
|
||||
try testing.expectEqual(1 + dns_stat_fields.len + 7, samples);
|
||||
// The reflective walk names the counters, so a renamed `Handler.Stats`
|
||||
// field silently renames a scraped series. Pin the ones an operator alerts
|
||||
// on by name.
|
||||
for ([_][]const u8{
|
||||
"nxdns_dns_queries_total",
|
||||
"nxdns_dns_formerr_total",
|
||||
"nxdns_dns_notimp_total",
|
||||
"nxdns_dns_badvers_total",
|
||||
"nxdns_dns_servfail_total",
|
||||
"nxdns_dns_refused_total",
|
||||
"nxdns_dns_blocked_total",
|
||||
}) |metric| {
|
||||
var line_buf: [128]u8 = undefined;
|
||||
const line = try std.fmt.bufPrint(&line_buf, "# TYPE {s} counter\n", .{metric});
|
||||
try testing.expect(std.mem.containsAtLeast(u8, text, 1, line));
|
||||
}
|
||||
}
|
||||
|
||||
test "an unwired collaborator omits its family rather than reporting zeros" {
|
||||
|
||||
Reference in New Issue
Block a user