1
0
Fork 0
mirror of https://github.com/TwiN/gatus.git synced 2024-12-15 17:51:09 +00:00

Fix TestService_ValidateAndSetDefaultsWithDNS test case

This commit is contained in:
cemturker 2020-11-18 01:00:16 +01:00
parent bc914e12b0
commit 4ad5c7b99c

View file

@ -101,16 +101,18 @@ func TestService_ValidateAndSetDefaultsWithInvalidDNSQueryType(t *testing.T) {
}
func TestService_ValidateAndSetDefaultsWithDNS(t *testing.T) {
conditionSuccess := Condition("[DNS_RCODE] == NOERROR")
service := &Service{
Name: "",
Name: "dns-test",
URL: "http://example.com",
DNS: &DNS{
QueryType: "A",
QueryName: "example.com",
},
Conditions: []*Condition{&conditionSuccess},
}
service.ValidateAndSetDefaults()
if service.DNS.QueryName == "example.com." {
if service.DNS.QueryName != "example.com." {
t.Error("Service.dns.query-name should be formatted with . suffix")
}
}