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. Use the root token in WaitForLeader, because without it the test was
   failing with ACL not found.
This commit is contained in:
Daniel Nephin 2021-09-29 14:36:55 -04:00
parent 8e9773e20b
commit 94be1835b2
2 changed files with 1 additions and 6 deletions

View File

@ -170,11 +170,6 @@ func (a *ACL) aclPreCheck() error {
if !a.srv.config.ACLsEnabled { if !a.srv.config.ACLsEnabled {
return acl.ErrDisabled return acl.ErrDisabled
} }
if a.srv.UseLegacyACLs() {
return fmt.Errorf("The ACL system is currently in legacy mode.")
}
return nil return nil
} }

View File

@ -383,7 +383,7 @@ func TestLeader_FederationStateAntiEntropyPruning_ACLDeny(t *testing.T) {
// Try to join. // Try to join.
joinWAN(t, s2, s1) joinWAN(t, s2, s1)
testrpc.WaitForLeader(t, s1.RPC, "dc1") testrpc.WaitForLeader(t, s1.RPC, "dc1")
testrpc.WaitForLeader(t, s1.RPC, "dc2") testrpc.WaitForLeader(t, s1.RPC, "dc2", testrpc.WithToken("root"))
// Create the ACL token. // Create the ACL token.
opWriteToken, err := upsertTestTokenWithPolicyRules(client, "root", "dc1", `operator = "write"`) opWriteToken, err := upsertTestTokenWithPolicyRules(client, "root", "dc1", `operator = "write"`)