diff --git a/tests/integration/api_actions_artifact_test.go b/tests/integration/api_actions_artifact_test.go index 7063d99340..2e35d4390a 100644 --- a/tests/integration/api_actions_artifact_test.go +++ b/tests/integration/api_actions_artifact_test.go @@ -126,7 +126,7 @@ func TestActionsArtifactDownload(t *testing.T) { } } assert.NotNil(t, artifactIdx) - assert.Equal(t, listResp.Value[artifactIdx].Name, "artifact-download") + assert.Equal(t, "artifact-download", listResp.Value[artifactIdx].Name) assert.Contains(t, listResp.Value[artifactIdx].FileContainerResourceURL, "/api/actions_pipeline/_apis/pipelines/workflows/791/artifacts") idx := strings.Index(listResp.Value[artifactIdx].FileContainerResourceURL, "/api/actions_pipeline/_apis/pipelines/") diff --git a/tests/test_utils.go b/tests/test_utils.go index 052fdb3224..89016f9f64 100644 --- a/tests/test_utils.go +++ b/tests/test_utils.go @@ -226,13 +226,13 @@ func cancelProcesses(t testing.TB, delay time.Duration) { func PrepareArtifactsStorage(t testing.TB) { // prepare actions artifacts directory and files - assert.NoError(t, storage.Clean(storage.ActionsArtifacts)) + require.NoError(t, storage.Clean(storage.ActionsArtifacts)) s, err := storage.NewStorage(setting.LocalStorageType, &setting.Storage{ Path: filepath.Join(filepath.Dir(setting.AppPath), "tests", "testdata", "data", "artifacts"), }) - assert.NoError(t, err) - assert.NoError(t, s.IterateObjects("", func(p string, obj storage.Object) error { + require.NoError(t, err) + require.NoError(t, s.IterateObjects("", func(p string, obj storage.Object) error { _, err = storage.Copy(storage.ActionsArtifacts, p, s, p) return err }))