Skip to content

Commit 2c0784c

Browse files
committed
Rename additional artifact files in override test
1 parent 18ae77b commit 2c0784c

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

tests/integration/api_actions_artifact_test.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ func TestActionsArtifactOverwrite(t *testing.T) {
300300
DecodeJSON(t, resp, &listResp)
301301

302302
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"
304304
req = NewRequest(t, "GET", url).
305305
AddTokenAuth("8061e833a55f6fc0157c98b883e91fcfeeb1a71a")
306306
resp = MakeRequest(t, req, http.StatusOK)
@@ -320,14 +320,14 @@ func TestActionsArtifactOverwrite(t *testing.T) {
320320
// upload same artifact, it uses 4096 B
321321
req := NewRequestWithJSON(t, "POST", "/api/actions_pipeline/_apis/pipelines/workflows/791/artifacts", getUploadArtifactRequest{
322322
Type: "actions_storage",
323-
Name: "artifact",
323+
Name: "artifact-download",
324324
}).AddTokenAuth("8061e833a55f6fc0157c98b883e91fcfeeb1a71a")
325325
resp := MakeRequest(t, req, http.StatusOK)
326326
var uploadResp uploadArtifactResponse
327327
DecodeJSON(t, resp, &uploadResp)
328328

329329
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"
331331
body := strings.Repeat("B", 4096)
332332
req = NewRequestWithBody(t, "PUT", url, strings.NewReader(body)).
333333
AddTokenAuth("8061e833a55f6fc0157c98b883e91fcfeeb1a71a").
@@ -337,7 +337,7 @@ func TestActionsArtifactOverwrite(t *testing.T) {
337337
MakeRequest(t, req, http.StatusOK)
338338

339339
// 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").
341341
AddTokenAuth("8061e833a55f6fc0157c98b883e91fcfeeb1a71a")
342342
MakeRequest(t, req, http.StatusOK)
343343
}
@@ -352,15 +352,15 @@ func TestActionsArtifactOverwrite(t *testing.T) {
352352

353353
var uploadedItem listArtifactsResponseItem
354354
for _, item := range listResp.Value {
355-
if item.Name == "artifact" {
355+
if item.Name == "artifact-download" {
356356
uploadedItem = item
357357
break
358358
}
359359
}
360-
assert.Equal(t, uploadedItem.Name, "artifact")
360+
assert.Equal(t, uploadedItem.Name, "artifact-download")
361361

362362
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"
364364
req = NewRequest(t, "GET", url).
365365
AddTokenAuth("8061e833a55f6fc0157c98b883e91fcfeeb1a71a")
366366
resp = MakeRequest(t, req, http.StatusOK)

0 commit comments

Comments
 (0)