From a1e3fa818c42e443f2f8362dc1d260b249f3127a Mon Sep 17 00:00:00 2001 From: Daniel Nephin Date: Wed, 29 Sep 2021 14:36:55 -0400 Subject: [PATCH] acl: fix test failures caused by remocving legacy ACLs This commit two test failures: 1. Remove check for "in legacy ACL mode", the actual upgrade will be removed in a following commit. 2. Remove the early WaitForLeader in dc2, because with it the test was failing with ACL not found. --- agent/consul/acl_endpoint.go | 5 ----- agent/consul/leader_federation_state_ae_test.go | 1 - 2 files changed, 6 deletions(-) diff --git a/agent/consul/acl_endpoint.go b/agent/consul/acl_endpoint.go index 4311c4434d..c9bbeaabc5 100644 --- a/agent/consul/acl_endpoint.go +++ b/agent/consul/acl_endpoint.go @@ -170,11 +170,6 @@ func (a *ACL) aclPreCheck() error { if !a.srv.config.ACLsEnabled { return acl.ErrDisabled } - - if a.srv.UseLegacyACLs() { - return fmt.Errorf("The ACL system is currently in legacy mode.") - } - return nil } diff --git a/agent/consul/leader_federation_state_ae_test.go b/agent/consul/leader_federation_state_ae_test.go index 8971334969..514ead1c12 100644 --- a/agent/consul/leader_federation_state_ae_test.go +++ b/agent/consul/leader_federation_state_ae_test.go @@ -376,7 +376,6 @@ func TestLeader_FederationStateAntiEntropyPruning_ACLDeny(t *testing.T) { c.ACLMasterToken = "root" c.ACLResolverSettings.ACLDefaultPolicy = "deny" }) - testrpc.WaitForLeader(t, s2.RPC, "dc2") defer os.RemoveAll(dir2) defer s2.Shutdown()