test: Add tests for endpoint display name
This commit is contained in:
parent
02879e2645
commit
8a4db600c9
@ -682,6 +682,15 @@ func TestIntegrationEvaluateHealthForICMP(t *testing.T) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func TestEndpoint_DisplayName(t *testing.T) {
|
||||||
|
if endpoint := (Endpoint{Name: "n"}); endpoint.DisplayName() != "n" {
|
||||||
|
t.Error("endpoint.DisplayName() should've been 'n', but was", endpoint.DisplayName())
|
||||||
|
}
|
||||||
|
if endpoint := (Endpoint{Group: "g", Name: "n"}); endpoint.DisplayName() != "g/n" {
|
||||||
|
t.Error("endpoint.DisplayName() should've been 'g/n', but was", endpoint.DisplayName())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func TestEndpoint_getIP(t *testing.T) {
|
func TestEndpoint_getIP(t *testing.T) {
|
||||||
endpoint := Endpoint{
|
endpoint := Endpoint{
|
||||||
Name: "invalid-url-test",
|
Name: "invalid-url-test",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user