@@ -118,31 +118,31 @@ func TestActionsArtifactDownload(t *testing.T) {
118
118
assert .Equal (t , int64 (2 ), listResp .Count )
119
119
120
120
// Return list might be in any order. Get one file.
121
- var artifact_idx int
121
+ var artifactIdx int
122
122
for i , artifact := range listResp .Value {
123
123
if artifact .Name == "artifact-download" {
124
- artifact_idx = i
124
+ artifactIdx = i
125
125
break
126
126
}
127
127
}
128
- assert .NotNil (t , artifact_idx )
129
- assert .Equal (t , listResp .Value [artifact_idx ].Name , "artifact-download" )
130
- assert .Contains (t , listResp .Value [artifact_idx ].FileContainerResourceURL , "/api/actions_pipeline/_apis/pipelines/workflows/791/artifacts" )
128
+ assert .NotNil (t , artifactIdx )
129
+ assert .Equal (t , listResp .Value [artifactIdx ].Name , "artifact-download" )
130
+ assert .Contains (t , listResp .Value [artifactIdx ].FileContainerResourceURL , "/api/actions_pipeline/_apis/pipelines/workflows/791/artifacts" )
131
131
132
- idx := strings .Index (listResp .Value [artifact_idx ].FileContainerResourceURL , "/api/actions_pipeline/_apis/pipelines/" )
133
- url := listResp .Value [artifact_idx ].FileContainerResourceURL [idx + 1 :] + "?itemPath=artifact-download"
132
+ idx := strings .Index (listResp .Value [artifactIdx ].FileContainerResourceURL , "/api/actions_pipeline/_apis/pipelines/" )
133
+ url := listResp .Value [artifactIdx ].FileContainerResourceURL [idx + 1 :] + "?itemPath=artifact-download"
134
134
req = NewRequest (t , "GET" , url ).
135
135
AddTokenAuth ("8061e833a55f6fc0157c98b883e91fcfeeb1a71a" )
136
136
resp = MakeRequest (t , req , http .StatusOK )
137
137
var downloadResp downloadArtifactResponse
138
138
DecodeJSON (t , resp , & downloadResp )
139
139
assert .Len (t , downloadResp .Value , 1 )
140
- assert .Equal (t , "artifact-download/abc.txt" , downloadResp .Value [artifact_idx ].Path )
141
- assert .Equal (t , "file" , downloadResp .Value [artifact_idx ].ItemType )
142
- assert .Contains (t , downloadResp .Value [artifact_idx ].ContentLocation , "/api/actions_pipeline/_apis/pipelines/workflows/791/artifacts" )
140
+ assert .Equal (t , "artifact-download/abc.txt" , downloadResp .Value [artifactIdx ].Path )
141
+ assert .Equal (t , "file" , downloadResp .Value [artifactIdx ].ItemType )
142
+ assert .Contains (t , downloadResp .Value [artifactIdx ].ContentLocation , "/api/actions_pipeline/_apis/pipelines/workflows/791/artifacts" )
143
143
144
- idx = strings .Index (downloadResp .Value [artifact_idx ].ContentLocation , "/api/actions_pipeline/_apis/pipelines/" )
145
- url = downloadResp .Value [artifact_idx ].ContentLocation [idx :]
144
+ idx = strings .Index (downloadResp .Value [artifactIdx ].ContentLocation , "/api/actions_pipeline/_apis/pipelines/" )
145
+ url = downloadResp .Value [artifactIdx ].ContentLocation [idx :]
146
146
req = NewRequest (t , "GET" , url ).
147
147
AddTokenAuth ("8061e833a55f6fc0157c98b883e91fcfeeb1a71a" )
148
148
resp = MakeRequest (t , req , http .StatusOK )
0 commit comments