agent: test service/check deletion with empty ID

This commit is contained in:
Ryan Uber 2015-01-27 21:47:59 -08:00
parent 6d27dc3548
commit 9efda655a1
1 changed files with 14 additions and 0 deletions

View File

@ -573,6 +573,20 @@ func TestAgentAntiEntropy_Check_DeferSync(t *testing.T) {
})
}
func TestAgentAntiEntory_deleteService_fails(t *testing.T) {
l := new(localState)
if err := l.deleteService(""); err == nil {
t.Fatalf("should have failed")
}
}
func TestAgentAntiEntropy_deleteCheck_fails(t *testing.T) {
l := new(localState)
if err := l.deleteCheck(""); err == nil {
t.Fatalf("should have errored")
}
}
var testRegisterRules = `
service "api" {
policy = "write"