mirror of
https://codeberg.org/davrot/forgejo.git
synced 2025-05-31 03:00:03 +02:00
chore: Fix a few lint errors
- Adjust `PrepareArtifactsStorage` to use `require.NoError` instead of `assert.NoError` - Adjust `TestActionsArtifactDownload` to have the proper order of `assert.Equal` arguments. Signed-off-by: Gergely Nagy <forgejo@gergo.csillger.hu>
This commit is contained in:
parent
268276d4a7
commit
ae6292ba38
2 changed files with 4 additions and 4 deletions
|
@ -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
|
||||
}))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue