Fix lint
This commit is contained in:
parent
3425685a81
commit
17a7982ad5
3 changed files with 7 additions and 6 deletions
|
@ -106,8 +106,8 @@ func TestRenameBranch(t *testing.T) {
|
|||
defer committer.Close()
|
||||
assert.NoError(t, err)
|
||||
assert.NoError(t, git_model.UpdateProtectBranch(ctx, repo1, &git_model.ProtectedBranch{
|
||||
RepoID: repo1.ID,
|
||||
BranchName: "master",
|
||||
RepoID: repo1.ID,
|
||||
RuleName: "master",
|
||||
}, git_model.WhitelistOptions{}))
|
||||
assert.NoError(t, committer.Commit())
|
||||
|
||||
|
@ -132,8 +132,8 @@ func TestRenameBranch(t *testing.T) {
|
|||
assert.Equal(t, int64(1), renamedBranch.RepoID)
|
||||
|
||||
unittest.AssertExistsAndLoadBean(t, &git_model.ProtectedBranch{
|
||||
RepoID: repo1.ID,
|
||||
BranchName: "main",
|
||||
RepoID: repo1.ID,
|
||||
RuleName: "main",
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
@ -55,7 +55,7 @@ func TestBranchRuleMatch(t *testing.T) {
|
|||
}
|
||||
|
||||
for _, kase := range kases {
|
||||
pb := ProtectedBranch{BranchName: kase.Rule}
|
||||
pb := ProtectedBranch{RuleName: kase.Rule}
|
||||
var should, infact string
|
||||
if !kase.ExpectedMatch {
|
||||
should = " not"
|
||||
|
|
|
@ -5,13 +5,14 @@
|
|||
package integration
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"net/http"
|
||||
"net/http/httptest"
|
||||
"net/url"
|
||||
"path"
|
||||
"testing"
|
||||
|
||||
"code.gitea.io/gitea/modules/json"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue