@@ -13,6 +13,8 @@ import (
13
13
14
14
issues_model "code.gitea.io/gitea/models/issues"
15
15
"code.gitea.io/gitea/models/unittest"
16
+ "code.gitea.io/gitea/modules/git"
17
+ "code.gitea.io/gitea/modules/test"
16
18
issues_service "code.gitea.io/gitea/services/issue"
17
19
18
20
"github.com/stretchr/testify/assert"
@@ -103,7 +105,22 @@ func TestPullComment(t *testing.T) {
103
105
testCreateBranch (t , session , "user2" , "repo1" , "branch/master" , "test-branch/retarget" , http .StatusSeeOther )
104
106
testRepoFork (t , session , "user2" , "repo1" , "user1" , "repo1" , "" )
105
107
106
- t .Run ("RebaseComment" , func (t * testing.T ) { testPullCommentRebase (t , u , session ) })
107
- t .Run ("RetargetComment" , func (t * testing.T ) { testPullCommentRetarget (t , u , session ) })
108
+ t .Run ("RebaseComment_MergeTree" , func (t * testing.T ) {
109
+ defer test .MockVariableValue (& git .DefaultFeatures ().SupportGitMergeTree , true )()
110
+ testPullCommentRebase (t , u , session )
111
+ })
112
+ t .Run ("RebaseComment_TmpRepo" , func (t * testing.T ) {
113
+ defer test .MockVariableValue (& git .DefaultFeatures ().SupportGitMergeTree , false )()
114
+ testPullCommentRebase (t , u , session )
115
+ })
116
+
117
+ t .Run ("RetargetComment_MergeTree" , func (t * testing.T ) {
118
+ defer test .MockVariableValue (& git .DefaultFeatures ().SupportGitMergeTree , true )()
119
+ testPullCommentRetarget (t , u , session )
120
+ })
121
+ t .Run ("RetargetComment_TmpRepo" , func (t * testing.T ) {
122
+ defer test .MockVariableValue (& git .DefaultFeatures ().SupportGitMergeTree , false )()
123
+ testPullCommentRetarget (t , u , session )
124
+ })
108
125
})
109
126
}
0 commit comments