From 3fd9fbeece631780a972a1672f41a11222ccb93e Mon Sep 17 00:00:00 2001 From: Piotr Kazmierczak <470696+pkazmierczak@users.noreply.github.com> Date: Wed, 21 Dec 2022 15:19:09 +0100 Subject: [PATCH] fix failing UpsertBindingRules unit test (#15604) UpsertBindingRules RPC changed in eacecb8, validation happens after the ID check now, because we don't want validation to fail for update payloads which may contain incomplete objects. --- nomad/acl_endpoint_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/nomad/acl_endpoint_test.go b/nomad/acl_endpoint_test.go index b13a19ddd..d9c4517c1 100644 --- a/nomad/acl_endpoint_test.go +++ b/nomad/acl_endpoint_test.go @@ -3147,6 +3147,7 @@ func TestACL_UpsertBindingRules(t *testing.T) { // Create another ACL binding rule that will fail validation. Attempting to // upsert this ensures the handler is triggering the validation function. aclBindingRule2 := mock.ACLBindingRule() + aclBindingRule2.ID = "" aclBindingRule2.BindType = "" aclBindingRuleReq5 := &structs.ACLBindingRulesUpsertRequest{