mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Added missing error checks in tests (#7554)
Whenever we assign a value to err, check for it being nil.
This commit is contained in:
committed by
zeripath
parent
54d96c79b5
commit
5e4e7d3df0
@@ -139,6 +139,7 @@ func TestRelease_MirrorDelete(t *testing.T) {
|
||||
assert.True(t, ok)
|
||||
|
||||
count, err := GetReleaseCountByRepoID(mirror.ID, findOptions)
|
||||
assert.NoError(t, err)
|
||||
assert.EqualValues(t, initCount+1, count)
|
||||
|
||||
release, err := GetRelease(repo.ID, "v0.2")
|
||||
@@ -149,5 +150,6 @@ func TestRelease_MirrorDelete(t *testing.T) {
|
||||
assert.True(t, ok)
|
||||
|
||||
count, err = GetReleaseCountByRepoID(mirror.ID, findOptions)
|
||||
assert.NoError(t, err)
|
||||
assert.EqualValues(t, initCount, count)
|
||||
}
|
||||
|
@@ -88,6 +88,7 @@ func TestUpdateRepositoryVisibilityChanged(t *testing.T) {
|
||||
|
||||
// Get sample repo and change visibility
|
||||
repo, err := GetRepositoryByID(9)
|
||||
assert.NoError(t, err)
|
||||
repo.IsPrivate = true
|
||||
|
||||
// Update it
|
||||
|
Reference in New Issue
Block a user