mirror of https://github.com/status-im/consul.git
Made unit test for AddCheck error check the actual error string
This commit is contained in:
parent
fdc73e744e
commit
1f35aa6ff2
|
@ -1547,8 +1547,9 @@ func TestAgent_AddCheckFailure(t *testing.T) {
|
||||||
ServiceID: "redis",
|
ServiceID: "redis",
|
||||||
Status: api.HealthPassing,
|
Status: api.HealthPassing,
|
||||||
}
|
}
|
||||||
if err := l.AddCheck(chk, ""); err == nil {
|
expectedErr := "ServiceID \"redis\" does not exist"
|
||||||
t.Fatalf("Expected error when adding a check for a non-existent service")
|
if err := l.AddCheck(chk, ""); err == nil || expectedErr != err.Error() {
|
||||||
|
t.Fatalf("Expected error when adding a check for a non-existent service but got %v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue