test: remove unnecessary dbauthz.AsSystemRestricted calls in tests (#22663)

This commit is contained in:
Danielle Maywood
2026-03-05 20:29:49 +00:00
committed by GitHub
parent 25dac6e5f7
commit f91475cd51
11 changed files with 24 additions and 41 deletions
+1 -2
View File
@@ -1334,8 +1334,7 @@ func TestTemplateUpdatePrebuilds(t *testing.T) {
}).Do()
// Mark the prebuilt workspace's agent as ready so the prebuild can be claimed
// nolint:gocritic
agentCtx := dbauthz.AsSystemRestricted(testutil.Context(t, testutil.WaitLong))
agentCtx := testutil.Context(t, testutil.WaitLong)
agent, err := db.GetAuthenticatedWorkspaceAgentAndBuildByAuthToken(agentCtx, uuid.MustParse(workspaceBuild.AgentToken))
require.NoError(t, err)
err = db.UpdateWorkspaceAgentLifecycleStateByID(agentCtx, database.UpdateWorkspaceAgentLifecycleStateByIDParams{