aboutsummaryrefslogtreecommitdiff
path: root/plugin/test/helpers.go
diff options
context:
space:
mode:
Diffstat (limited to 'plugin/test/helpers.go')
-rw-r--r--plugin/test/helpers.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/plugin/test/helpers.go b/plugin/test/helpers.go
index 065cf8935..e22cbf2d1 100644
--- a/plugin/test/helpers.go
+++ b/plugin/test/helpers.go
@@ -81,6 +81,9 @@ func PTR(rr string) *dns.PTR { r, _ := dns.NewRR(rr); return r.(*dns.PTR) }
// TXT returns a TXT record from rr. It panics on errors.
func TXT(rr string) *dns.TXT { r, _ := dns.NewRR(rr); return r.(*dns.TXT) }
+// HINFO returns a HINFO record from rr. It panics on errors.
+func HINFO(rr string) *dns.HINFO { r, _ := dns.NewRR(rr); return r.(*dns.HINFO) }
+
// MX returns an MX record from rr. It panics on errors.
func MX(rr string) *dns.MX { r, _ := dns.NewRR(rr); return r.(*dns.MX) }
@@ -215,6 +218,13 @@ func Section(t *testing.T, tc Case, sec sect, rr []dns.RR) bool {
return false
}
}
+ case *dns.HINFO:
+ if x.Cpu != section[i].(*dns.HINFO).Cpu {
+ t.Errorf("rr %d should have a Cpu of %s, but has %s", i, section[i].(*dns.HINFO).Cpu, x.Cpu)
+ }
+ if x.Os != section[i].(*dns.HINFO).Os {
+ t.Errorf("rr %d should have a Os of %s, but has %s", i, section[i].(*dns.HINFO).Os, x.Os)
+ }
case *dns.SOA:
tt := section[i].(*dns.SOA)
if x.Ns != tt.Ns {