@@ -300,7 +300,7 @@ func TestActionsArtifactOverwrite(t *testing.T) {
300
300
DecodeJSON (t , resp , & listResp )
301
301
302
302
idx := strings .Index (listResp .Value [0 ].FileContainerResourceURL , "/api/actions_pipeline/_apis/pipelines/" )
303
- url := listResp .Value [0 ].FileContainerResourceURL [idx + 1 :] + "?itemPath=artifact"
303
+ url := listResp .Value [0 ].FileContainerResourceURL [idx + 1 :] + "?itemPath=artifact-download "
304
304
req = NewRequest (t , "GET" , url ).
305
305
AddTokenAuth ("8061e833a55f6fc0157c98b883e91fcfeeb1a71a" )
306
306
resp = MakeRequest (t , req , http .StatusOK )
@@ -320,14 +320,14 @@ func TestActionsArtifactOverwrite(t *testing.T) {
320
320
// upload same artifact, it uses 4096 B
321
321
req := NewRequestWithJSON (t , "POST" , "/api/actions_pipeline/_apis/pipelines/workflows/791/artifacts" , getUploadArtifactRequest {
322
322
Type : "actions_storage" ,
323
- Name : "artifact" ,
323
+ Name : "artifact-download " ,
324
324
}).AddTokenAuth ("8061e833a55f6fc0157c98b883e91fcfeeb1a71a" )
325
325
resp := MakeRequest (t , req , http .StatusOK )
326
326
var uploadResp uploadArtifactResponse
327
327
DecodeJSON (t , resp , & uploadResp )
328
328
329
329
idx := strings .Index (uploadResp .FileContainerResourceURL , "/api/actions_pipeline/_apis/pipelines/" )
330
- url := uploadResp .FileContainerResourceURL [idx :] + "?itemPath=artifact/abc.txt"
330
+ url := uploadResp .FileContainerResourceURL [idx :] + "?itemPath=artifact-download /abc.txt"
331
331
body := strings .Repeat ("B" , 4096 )
332
332
req = NewRequestWithBody (t , "PUT" , url , strings .NewReader (body )).
333
333
AddTokenAuth ("8061e833a55f6fc0157c98b883e91fcfeeb1a71a" ).
@@ -337,7 +337,7 @@ func TestActionsArtifactOverwrite(t *testing.T) {
337
337
MakeRequest (t , req , http .StatusOK )
338
338
339
339
// confirm artifact upload
340
- req = NewRequest (t , "PATCH" , "/api/actions_pipeline/_apis/pipelines/workflows/791/artifacts?artifactName=artifact" ).
340
+ req = NewRequest (t , "PATCH" , "/api/actions_pipeline/_apis/pipelines/workflows/791/artifacts?artifactName=artifact-download " ).
341
341
AddTokenAuth ("8061e833a55f6fc0157c98b883e91fcfeeb1a71a" )
342
342
MakeRequest (t , req , http .StatusOK )
343
343
}
@@ -352,15 +352,15 @@ func TestActionsArtifactOverwrite(t *testing.T) {
352
352
353
353
var uploadedItem listArtifactsResponseItem
354
354
for _ , item := range listResp .Value {
355
- if item .Name == "artifact" {
355
+ if item .Name == "artifact-download " {
356
356
uploadedItem = item
357
357
break
358
358
}
359
359
}
360
- assert .Equal (t , uploadedItem .Name , "artifact" )
360
+ assert .Equal (t , uploadedItem .Name , "artifact-download " )
361
361
362
362
idx := strings .Index (uploadedItem .FileContainerResourceURL , "/api/actions_pipeline/_apis/pipelines/" )
363
- url := uploadedItem .FileContainerResourceURL [idx + 1 :] + "?itemPath=artifact"
363
+ url := uploadedItem .FileContainerResourceURL [idx + 1 :] + "?itemPath=artifact-download "
364
364
req = NewRequest (t , "GET" , url ).
365
365
AddTokenAuth ("8061e833a55f6fc0157c98b883e91fcfeeb1a71a" )
366
366
resp = MakeRequest (t , req , http .StatusOK )
0 commit comments