Skip to content

Commit eaf7a21

Browse files
committed
chore: fetching workspaces by username requires site user.read perms
1 parent 9fe5b71 commit eaf7a21

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

enterprise/coderd/workspaces_test.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,11 +289,17 @@ func TestCreateUserWorkspace(t *testing.T) {
289289

290290
ctx = testutil.Context(t, testutil.WaitLong*1000) // Reset the context to avoid timeouts.
291291

292-
_, err = creator.CreateUserWorkspace(ctx, adminID.ID.String(), codersdk.CreateWorkspaceRequest{
292+
wrk, err := creator.CreateUserWorkspace(ctx, adminID.ID.String(), codersdk.CreateWorkspaceRequest{
293293
TemplateID: template.ID,
294294
Name: "workspace",
295295
})
296296
require.NoError(t, err)
297+
coderdtest.AwaitWorkspaceBuildJobCompleted(t, admin, wrk.LatestBuild.ID)
298+
299+
_, err = creator.WorkspaceByOwnerAndName(ctx, adminID.Username, wrk.Name, codersdk.WorkspaceOptions{
300+
IncludeDeleted: false,
301+
})
302+
require.NoError(t, err)
297303
})
298304

299305
// Asserting some authz calls when creating a workspace.

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy