Skip to content

Commit 1556911

Browse files
committed
Fix test
1 parent cbd73a5 commit 1556911

File tree

2 files changed

+1
-11
lines changed

2 files changed

+1
-11
lines changed

modules/git/diff.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ func GetAffectedHunksForTwoCommitsSpecialFile(ctx context.Context, repoPath, old
385385
}
386386
// Parse the hunk header
387387
leftLine, leftHunk, rightLine, rightHunk := ParseDiffHunkString(lof)
388-
hunks = append([]*HunkInfo{}, &HunkInfo{
388+
hunks = append(hunks, &HunkInfo{
389389
LeftLine: int64(leftLine),
390390
LeftHunk: int64(leftHunk),
391391
RightLine: int64(rightLine),

tests/integration/pull_review_test.go

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -445,16 +445,6 @@ func Test_ReviewCodeComment(t *testing.T) {
445445
})
446446
assert.NoError(t, err)
447447

448-
diffContent, _, err := git.NewCommand("diff").AddDynamicArguments(pr.MergeBase, pr.GetGitHeadRefName()).RunStdString(
449-
t.Context(), &git.RunOpts{
450-
Dir: repo.RepoPath(),
451-
},
452-
)
453-
assert.NoError(t, err)
454-
fmt.Println("=======")
455-
fmt.Println(diffContent)
456-
fmt.Println("=======")
457-
458448
session := loginUser(t, "user2")
459449
comment := unittest.AssertExistsAndLoadBean(t, &issues_model.Comment{
460450
Type: issues_model.CommentTypeCode,

0 commit comments

Comments
 (0)