Skip to content

Commit

Permalink
Fix PolicyList test
Browse files Browse the repository at this point in the history
  • Loading branch information
jjacobson93 committed Jul 31, 2023
1 parent 96b0861 commit 495162f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion api/acl_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ func TestAPI_ACLPolicy_List(t *testing.T) {

policies, qm, err := acl.PolicyList(nil)
require.NoError(t, err)
require.Len(t, policies, 4)
require.Len(t, policies, 5)
require.NotEqual(t, 0, qm.LastIndex)
require.True(t, qm.KnownLeader)

Expand Down Expand Up @@ -233,6 +233,11 @@ func TestAPI_ACLPolicy_List(t *testing.T) {
policy4, ok := policyMap["00000000-0000-0000-0000-000000000001"]
require.True(t, ok)
require.NotNil(t, policy4)

// make sure the 5th policy is the global read-only
policy5, ok := policyMap["00000000-0000-0000-0000-000000000002"]
require.True(t, ok)
require.NotNil(t, policy5)
}

func prepTokenPolicies(t *testing.T, acl *ACL) (policies []*ACLPolicy) {
Expand Down

0 comments on commit 495162f

Please sign in to comment.