@@ -351,7 +351,7 @@ func TestActionsArtifactV4RunDownloadSinglePublicApi(t *testing.T) {
351351 token := getTokenForLoggedInUser (t , session , auth_model .AccessTokenScopeWriteRepository )
352352
353353 // confirm artifact upload via rest api
354- req := NewRequestWithBody (t , "GET" , fmt .Sprintf ("/api/v1/repos/%s/actions/run /792/artifacts?name=artifact-v4-download" , repo .FullName ()), nil ).
354+ req := NewRequestWithBody (t , "GET" , fmt .Sprintf ("/api/v1/repos/%s/actions/runs /792/artifacts?name=artifact-v4-download" , repo .FullName ()), nil ).
355355 AddTokenAuth (token )
356356 resp := MakeRequest (t , req , http .StatusOK )
357357 var listResp api.ActionArtifactsResponse
@@ -363,7 +363,12 @@ func TestActionsArtifactV4RunDownloadSinglePublicApi(t *testing.T) {
363363 req = NewRequestWithBody (t , "GET" , listResp .Entries [0 ].ArchiveDownloadURL , nil ).
364364 AddTokenAuth (token )
365365
366+ resp = MakeRequest (t , req , http .StatusFound )
367+
368+ req = NewRequestWithBody (t , "GET" , resp .Header ().Get ("Location" ), nil ).
369+ AddTokenAuth (token )
366370 resp = MakeRequest (t , req , http .StatusOK )
371+
367372 body := strings .Repeat ("D" , 1024 )
368373 assert .Equal (t , body , resp .Body .String ())
369374}
@@ -389,6 +394,10 @@ func TestActionsArtifactV4DownloadSinglePublicApi(t *testing.T) {
389394 req = NewRequestWithBody (t , "GET" , listResp .Entries [0 ].ArchiveDownloadURL , nil ).
390395 AddTokenAuth (token )
391396
397+ resp = MakeRequest (t , req , http .StatusFound )
398+
399+ req = NewRequestWithBody (t , "GET" , resp .Header ().Get ("Location" ), nil ).
400+ AddTokenAuth (token )
392401 resp = MakeRequest (t , req , http .StatusOK )
393402 body := strings .Repeat ("D" , 1024 )
394403 assert .Equal (t , body , resp .Body .String ())
@@ -411,8 +420,8 @@ func TestActionsArtifactV4ListAndGetPublicApi(t *testing.T) {
411420 assert .NoError (t , err )
412421
413422 for _ , artifact := range listResp .Entries {
414- assert .Contains (t , fmt .Sprintf ("/api/v1/repos/%s/actions/artifacts/%d" , repo .FullName (), artifact .ID ), artifact . URL )
415- assert .Contains (t , fmt .Sprintf ("/api/v1/repos/%s/actions/artifacts/%d/zip" , repo .FullName (), artifact .ID ), artifact . ArchiveDownloadURL )
423+ assert .Contains (t , artifact . URL , fmt .Sprintf ("/api/v1/repos/%s/actions/artifacts/%d" , repo .FullName (), artifact .ID ))
424+ assert .Contains (t , artifact . ArchiveDownloadURL , fmt .Sprintf ("/api/v1/repos/%s/actions/artifacts/%d/zip" , repo .FullName (), artifact .ID ))
416425 req = NewRequestWithBody (t , "GET" , listResp .Entries [0 ].URL , nil ).
417426 AddTokenAuth (token )
418427
0 commit comments