summaryrefslogtreecommitdiffstats
path: root/models/migrations/v1_16/v195_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'models/migrations/v1_16/v195_test.go')
-rw-r--r--models/migrations/v1_16/v195_test.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/models/migrations/v1_16/v195_test.go b/models/migrations/v1_16/v195_test.go
index 428a767157..9a62fc9649 100644
--- a/models/migrations/v1_16/v195_test.go
+++ b/models/migrations/v1_16/v195_test.go
@@ -9,6 +9,7 @@ import (
migration_tests "code.gitea.io/gitea/models/migrations/test"
"github.com/stretchr/testify/assert"
+ "github.com/stretchr/testify/require"
)
func Test_AddTableCommitStatusIndex(t *testing.T) {
@@ -30,7 +31,7 @@ func Test_AddTableCommitStatusIndex(t *testing.T) {
// Run the migration
if err := AddTableCommitStatusIndex(x); err != nil {
- assert.NoError(t, err)
+ require.NoError(t, err)
return
}
@@ -46,12 +47,12 @@ func Test_AddTableCommitStatusIndex(t *testing.T) {
for {
indexes := make([]CommitStatusIndex, 0, batchSize)
err := x.Table("commit_status_index").Limit(batchSize, start).Find(&indexes)
- assert.NoError(t, err)
+ require.NoError(t, err)
for _, idx := range indexes {
var maxIndex int
has, err := x.SQL("SELECT max(`index`) FROM commit_status WHERE repo_id = ? AND sha = ?", idx.RepoID, idx.SHA).Get(&maxIndex)
- assert.NoError(t, err)
+ require.NoError(t, err)
assert.True(t, has)
assert.EqualValues(t, maxIndex, idx.MaxIndex)
}