Skip to content

Commit 86bdf96

Browse files
committed
Fix test
1 parent 5b6ca87 commit 86bdf96

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/integration/pull_update_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ func TestAPIPullUpdate(t *testing.T) {
2828
user := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2})
2929
org26 := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 26})
3030
pr := createOutdatedPR(t, user, org26)
31+
assert.NoError(t, pr.LoadBaseRepo(t.Context()))
3132

3233
// Test GetDiverging
3334
diffCount, err := gitrepo.GetDivergingCommits(t.Context(), pr.BaseRepo, pr.BaseBranch, pr.GetGitHeadRefName())
@@ -36,7 +37,6 @@ func TestAPIPullUpdate(t *testing.T) {
3637
assert.Equal(t, 1, diffCount.Ahead)
3738
assert.Equal(t, diffCount.Behind, pr.CommitsBehind)
3839
assert.Equal(t, diffCount.Ahead, pr.CommitsAhead)
39-
assert.NoError(t, pr.LoadBaseRepo(t.Context()))
4040
assert.NoError(t, pr.LoadIssue(t.Context()))
4141

4242
session := loginUser(t, "user2")
@@ -62,13 +62,13 @@ func TestAPIPullUpdateByRebase(t *testing.T) {
6262
user := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2})
6363
org26 := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 26})
6464
pr := createOutdatedPR(t, user, org26)
65+
assert.NoError(t, pr.LoadBaseRepo(t.Context()))
6566

6667
// Test GetDiverging
6768
diffCount, err := gitrepo.GetDivergingCommits(t.Context(), pr.BaseRepo, pr.BaseBranch, pr.GetGitHeadRefName())
6869
assert.NoError(t, err)
6970
assert.Equal(t, 1, diffCount.Behind)
7071
assert.Equal(t, 1, diffCount.Ahead)
71-
assert.NoError(t, pr.LoadBaseRepo(t.Context()))
7272
assert.NoError(t, pr.LoadIssue(t.Context()))
7373

7474
session := loginUser(t, "user2")

0 commit comments

Comments
 (0)