@@ -244,11 +244,11 @@ func TestAuthorizeAllEndpoints(t *testing.T) {
244
244
"POST:/api/v2/csp/reports" : {NoAuthorize : true },
245
245
"GET:/api/v2/entitlements" : {NoAuthorize : true },
246
246
247
- "GET:/%40{user}/{workspacename }/apps/{application}/*" : {
247
+ "GET:/%40{user}/{workspacename_and_agent }/apps/{application}/*" : {
248
248
AssertAction : rbac .ActionRead ,
249
249
AssertObject : workspaceRBACObj ,
250
250
},
251
- "GET:/@{user}/{workspacename }/apps/{application}/*" : {
251
+ "GET:/@{user}/{workspacename_and_agent }/apps/{application}/*" : {
252
252
AssertAction : rbac .ActionRead ,
253
253
AssertObject : workspaceRBACObj ,
254
254
},
@@ -508,6 +508,7 @@ func TestAuthorizeAllEndpoints(t *testing.T) {
508
508
route = strings .ReplaceAll (route , "{workspace}" , workspace .ID .String ())
509
509
route = strings .ReplaceAll (route , "{workspacebuild}" , workspace .LatestBuild .ID .String ())
510
510
route = strings .ReplaceAll (route , "{workspacename}" , workspace .Name )
511
+ route = strings .ReplaceAll (route , "{workspacename_and_agent}" , workspace .Name + "." + workspaceResources [0 ].Agents [0 ].Name )
511
512
route = strings .ReplaceAll (route , "{workspacebuildname}" , workspace .LatestBuild .Name )
512
513
route = strings .ReplaceAll (route , "{workspaceagent}" , workspaceResources [0 ].Agents [0 ].ID .String ())
513
514
route = strings .ReplaceAll (route , "{buildnumber}" , strconv .FormatInt (int64 (workspace .LatestBuild .BuildNumber ), 10 ))
0 commit comments