@@ -13,9 +13,9 @@ import (
13
13
"code.gitea.io/gitea/models"
14
14
"code.gitea.io/gitea/modules/context"
15
15
"code.gitea.io/gitea/modules/git"
16
+ repo_module "code.gitea.io/gitea/modules/repository"
16
17
"code.gitea.io/gitea/modules/setting"
17
18
api "code.gitea.io/gitea/modules/structs"
18
- repo_module "code.gitea.io/gitea/modules/repository"
19
19
20
20
"github.com/stretchr/testify/assert"
21
21
)
@@ -72,15 +72,18 @@ func testAPIGetContentsList(t *testing.T, u *url.URL) {
72
72
73
73
// Make a new branch in repo1
74
74
newBranch := "test_branch"
75
- repo_module .CreateNewBranch (user2 , repo1 , repo1 .DefaultBranch , newBranch )
75
+ err := repo_module .CreateNewBranch (user2 , repo1 , repo1 .DefaultBranch , newBranch )
76
+ assert .NoError (t , err )
76
77
// Get the commit ID of the default branch
77
- gitRepo , _ := git .OpenRepository (repo1 .RepoPath ())
78
+ gitRepo , err := git .OpenRepository (repo1 .RepoPath ())
79
+ assert .NoError (t , err )
78
80
defer gitRepo .Close ()
79
81
80
82
commitID , _ := gitRepo .GetBranchCommitID (repo1 .DefaultBranch )
81
83
// Make a new tag in repo1
82
84
newTag := "test_tag"
83
- gitRepo .CreateTag (newTag , commitID )
85
+ err = gitRepo .CreateTag (newTag , commitID )
86
+ assert .NoError (t , err )
84
87
/*** END SETUP ***/
85
88
86
89
// ref is default ref
0 commit comments