Skip to content

Commit 89ea696

Browse files
committed
test: rbac role test assertion to handle site wide roles
Site wide roles have empty string org_ids
1 parent c86bb5c commit 89ea696

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

integration/integration_test.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,8 @@ func TestIntegration(t *testing.T) {
181181
"workspace_owner.ssh_private_key": `(?s)^.+?BEGIN OPENSSH PRIVATE KEY.+?END OPENSSH PRIVATE KEY.+?$`,
182182
"workspace_owner.ssh_public_key": `(?s)^ssh-ed25519.+$`,
183183
"workspace_owner.login_type": `password`,
184-
"workspace_owner.rbac_roles": `(?is)\[(\{"name":"[a-z0-9-:]+","org_id":"[a-f0-9-]+"\},?)+\]`,
184+
// org_id will either be a uuid or an empty string for site wide roles.
185+
"workspace_owner.rbac_roles": `(?is)\[(\{"name":"[a-z0-9-:]+","org_id":"[a-f0-9-]*"\},?)+\]`,
185186
},
186187
},
187188
{

0 commit comments

Comments
 (0)