Skip to content

Commit

Permalink
fix: security ut tenants sort (#751)
Browse files Browse the repository at this point in the history
  • Loading branch information
baerwang authored Aug 22, 2023
1 parent 93834f8 commit cae8667
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/security/tenant_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@ func TestSimpleTenantManager(t *testing.T) {
tm.PutCluster("fake-tenant", "fake-cluster")
tm.PutUser("fake-tenant", &config.User{Username: "fake-user"})
tm.PutUser("arana-tenant", &config.User{Username: "arana-user"})
assert.Equal(t, tm.GetTenants(), []string{"fake-tenant", "arana-tenant"})
tenants = tm.GetTenants()
assert.Len(t, tenants, 2)
assert.Contains(t, tenants, "fake-tenant", "arana-tenant")

var (
user *config.User
Expand Down

0 comments on commit cae8667

Please sign in to comment.