We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 95af679 commit cecb89dCopy full SHA for cecb89d
models/repo/mirror_ssh_keypair_test.go
@@ -11,6 +11,7 @@ import (
11
repo_model "code.gitea.io/gitea/models/repo"
12
"code.gitea.io/gitea/models/unittest"
13
"code.gitea.io/gitea/modules/setting"
14
+ "code.gitea.io/gitea/modules/util"
15
16
"github.com/stretchr/testify/assert"
17
"github.com/stretchr/testify/require"
@@ -59,7 +60,7 @@ func TestMirrorSSHKeypair(t *testing.T) {
59
60
61
// Test retrieving non-existent keypair
62
_, err = repo_model.GetMirrorSSHKeypairByOwner(db.DefaultContext, 999)
- assert.True(t, db.IsErrNotExist(err))
63
+ assert.ErrorIs(t, err, util.ErrNotExist)
64
})
65
66
t.Run("GetDecryptedPrivateKey", func(t *testing.T) {
@@ -98,7 +99,7 @@ func TestMirrorSSHKeypair(t *testing.T) {
98
99
100
// Verify it's gone
101
_, err = repo_model.GetMirrorSSHKeypairByOwner(db.DefaultContext, 5)
102
103
104
105
t.Run("RegenerateMirrorSSHKeypair", func(t *testing.T) {
0 commit comments