1
0
mirror of https://github.com/StackExchange/dnscontrol.git synced 2024-05-11 05:55:12 +00:00

BUG: diff2: ttl changes don't always work (#2093)

This commit is contained in:
Tom Limoncelli
2023-02-25 22:40:54 -05:00
committed by GitHub
parent ab872cc13f
commit 05dc26bf2e
8 changed files with 151 additions and 101 deletions

View File

@@ -206,3 +206,36 @@ compFn: <nil>
})
}
}
func Test_mkCompareBlobs(t *testing.T) {
type args struct {
rc *models.RecordConfig
f func(*models.RecordConfig) string
}
tests := []struct {
name string
args args
want string
want1 string
}{
{
name: "simple",
args: args{
rc: makeRec("label", "A", "1.1.1.1"),
},
want: "1.1.1.1",
want1: "1.1.1.1 ttl=300",
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
got, got1 := mkCompareBlobs(tt.args.rc, tt.args.f)
if got != tt.want {
t.Errorf("mkCompareBlobs() got = %q, want %q", got, tt.want)
}
if got1 != tt.want1 {
t.Errorf("mkCompareBlobs() got1 = %q, want %q", got1, tt.want1)
}
})
}
}