Skip to content

Commit 1296ec6

Browse files
committed
Fix linting
1 parent 494dde8 commit 1296ec6

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

tests/integration/api_actions_artifact_test.go

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -118,31 +118,31 @@ func TestActionsArtifactDownload(t *testing.T) {
118118
assert.Equal(t, int64(2), listResp.Count)
119119

120120
// Return list might be in any order. Get one file.
121-
var artifact_idx int
121+
var artifactIdx int
122122
for i, artifact := range listResp.Value {
123123
if artifact.Name == "artifact-download" {
124-
artifact_idx = i
124+
artifactIdx = i
125125
break
126126
}
127127
}
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")
131131

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"
134134
req = NewRequest(t, "GET", url).
135135
AddTokenAuth("8061e833a55f6fc0157c98b883e91fcfeeb1a71a")
136136
resp = MakeRequest(t, req, http.StatusOK)
137137
var downloadResp downloadArtifactResponse
138138
DecodeJSON(t, resp, &downloadResp)
139139
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")
143143

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:]
146146
req = NewRequest(t, "GET", url).
147147
AddTokenAuth("8061e833a55f6fc0157c98b883e91fcfeeb1a71a")
148148
resp = MakeRequest(t, req, http.StatusOK)

0 commit comments

Comments
 (0)