aboutsummaryrefslogtreecommitdiffstats
path: root/services/migrations/onedev_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'services/migrations/onedev_test.go')
-rw-r--r--services/migrations/onedev_test.go36
1 files changed, 11 insertions, 25 deletions
diff --git a/services/migrations/onedev_test.go b/services/migrations/onedev_test.go
index 59b7cae5fe..55ae7da1fc 100644
--- a/services/migrations/onedev_test.go
+++ b/services/migrations/onedev_test.go
@@ -74,11 +74,8 @@ func TestOneDevDownloadRepo(t *testing.T) {
Name: "Improvement",
},
},
- Context: onedevIssueContext{
- foreignID: 398,
- localID: 4,
- IsPullRequest: false,
- },
+ ForeignIndex: 398,
+ Context: onedevIssueContext{IsPullRequest: false},
},
{
Number: 3,
@@ -94,20 +91,15 @@ func TestOneDevDownloadRepo(t *testing.T) {
Name: "New Feature",
},
},
- Context: onedevIssueContext{
- foreignID: 397,
- localID: 3,
- IsPullRequest: false,
- },
+ ForeignIndex: 397,
+ Context: onedevIssueContext{IsPullRequest: false},
},
}, issues)
- comments, _, err := downloader.GetComments(base.GetCommentOptions{
- Context: onedevIssueContext{
- foreignID: 398,
- localID: 4,
- IsPullRequest: false,
- },
+ comments, _, err := downloader.GetComments(&base.Issue{
+ Number: 4,
+ ForeignIndex: 398,
+ Context: onedevIssueContext{IsPullRequest: false},
})
assert.NoError(t, err)
assertCommentsEqual(t, []*base.Comment{
@@ -141,18 +133,12 @@ func TestOneDevDownloadRepo(t *testing.T) {
SHA: "f32b0a9dfd09a60f616f29158f772cedd89942d2",
RepoName: "go-gitea-test_repo",
},
- Context: onedevIssueContext{
- foreignID: 186,
- localID: 5,
- IsPullRequest: true,
- },
+ ForeignIndex: 186,
+ Context: onedevIssueContext{IsPullRequest: true},
},
}, prs)
- rvs, err := downloader.GetReviews(onedevIssueContext{
- foreignID: 186,
- localID: 5,
- })
+ rvs, err := downloader.GetReviews(&base.PullRequest{Number: 5, ForeignIndex: 186})
assert.NoError(t, err)
assertReviewsEqual(t, []*base.Review{
{