diff --git a/consul/catalog_endpoint_test.go b/consul/catalog_endpoint_test.go index 9c4e86ea9a..e2674f12b9 100644 --- a/consul/catalog_endpoint_test.go +++ b/consul/catalog_endpoint_test.go @@ -50,7 +50,6 @@ func TestCatalogRegister_ACLDeny(t *testing.T) { c.ACLDatacenter = "dc1" c.ACLMasterToken = "root" c.ACLDefaultPolicy = "deny" - c.ACLToken = "root" }) defer os.RemoveAll(dir1) defer s1.Shutdown() @@ -93,6 +92,12 @@ func TestCatalogRegister_ACLDeny(t *testing.T) { if err == nil || !strings.Contains(err.Error(), permissionDenied) { t.Fatalf("err: %v", err) } + + argR.Service.Service = "foo" + err = client.Call("Catalog.Register", &argR, &outR) + if err != nil { + t.Fatalf("err: %v", err) + } } func TestCatalogRegister_ForwardLeader(t *testing.T) { @@ -775,6 +780,6 @@ func TestCatalogRegister_FailedCase1(t *testing.T) { var testRegisterRules = ` service "foo" { - policy = "read" + policy = "write" } `