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