Skip to content

Commit

Permalink
Add SOA test
Browse files Browse the repository at this point in the history
  • Loading branch information
gerrowadat committed Nov 7, 2023
1 parent 40da64b commit 0ede5a7
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion clouddns_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,14 @@ func TestZoneFileFragment(t *testing.T) {
args: args{rr: &dns.ResourceRecordSet{}},
want: "",
},
{
name: "SimpleSOA",
args: args{rr: &dns.ResourceRecordSet{
Type: "SOA",
Rrdatas: []string{"doot. root.doot. 0 0 0"},
}},
want: " IN SOA doot. root.doot. 0 0 0",
},
{
name: "SimpleA",
args: args{rr: &dns.ResourceRecordSet{
Expand Down Expand Up @@ -211,7 +219,7 @@ func TestZoneFileFragment(t *testing.T) {
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
if got := ZoneFileFragment(tt.args.rr); got != tt.want {
t.Errorf("ZoneFileFragment() = %v, want %v", got, tt.want)
t.Errorf("ZoneFileFragment() = '%v', want '%v'", got, tt.want)
}
})
}
Expand Down

0 comments on commit 0ede5a7

Please sign in to comment.