mirror of
https://github.com/status-im/consul.git
synced 2025-01-10 13:55:55 +00:00
Add tests to remove service/check without an ID
This commit is contained in:
parent
401bc71cb2
commit
9316596e25
@ -247,6 +247,11 @@ func TestAgent_RemoveService(t *testing.T) {
|
||||
t.Fatalf("should have errored")
|
||||
}
|
||||
|
||||
// Remove without an ID
|
||||
if err := agent.RemoveService("", false); err == nil {
|
||||
t.Fatalf("should have errored")
|
||||
}
|
||||
|
||||
// Removing a service with a single check works
|
||||
{
|
||||
srv := &structs.NodeService{
|
||||
@ -406,6 +411,11 @@ func TestAgent_RemoveCheck(t *testing.T) {
|
||||
t.Fatalf("err: %v", err)
|
||||
}
|
||||
|
||||
// Remove without an ID
|
||||
if err := agent.RemoveCheck("", false); err == nil {
|
||||
t.Fatalf("should have errored")
|
||||
}
|
||||
|
||||
health := &structs.HealthCheck{
|
||||
Node: "foo",
|
||||
CheckID: "mem",
|
||||
|
Loading…
x
Reference in New Issue
Block a user