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:
parent
bc914e12b0
commit
4ad5c7b99c
1 changed files with 4 additions and 2 deletions
|
@ -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")
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue