summaryrefslogtreecommitdiffstats
path: root/modules/migrations/github_test.go
diff options
context:
space:
mode:
authorKN4CK3R <admin@oldschoolhack.me>2021-08-22 00:47:45 +0200
committerGitHub <noreply@github.com>2021-08-22 00:47:45 +0200
commitcee5f7c5e2bfe3132d7089a6bffc1a4bfc392e21 (patch)
tree41cf982a5b7a759645238fa7a99446e09761d359 /modules/migrations/github_test.go
parent2d1935acc7b2a6ecc797346625b80caa7e0b5787 (diff)
downloadgitea-cee5f7c5e2bfe3132d7089a6bffc1a4bfc392e21.tar.gz
gitea-cee5f7c5e2bfe3132d7089a6bffc1a4bfc392e21.zip
Add migrate from OneDev (#16356)
* Use context to simplify logic. * Added migration from OneDev. This PR adds [OneDev](https://code.onedev.io/) as migration source. Supported: - [x] Milestones - [x] Issues - [x] Pull Requests - [x] Comments - [x] Reviews - [x] Labels
Diffstat (limited to 'modules/migrations/github_test.go')
-rw-r--r--modules/migrations/github_test.go8
1 files changed, 5 insertions, 3 deletions
diff --git a/modules/migrations/github_test.go b/modules/migrations/github_test.go
index 16d79d200c..4a53f20a76 100644
--- a/modules/migrations/github_test.go
+++ b/modules/migrations/github_test.go
@@ -216,7 +216,7 @@ func TestGitHubDownloadRepo(t *testing.T) {
// downloader.GetComments()
comments, _, err := downloader.GetComments(base.GetCommentOptions{
- IssueNumber: 2,
+ Context: base.BasicIssueContext(2),
})
assert.NoError(t, err)
assertCommentsEqual(t, []*base.Comment{
@@ -286,6 +286,7 @@ func TestGitHubDownloadRepo(t *testing.T) {
Merged: true,
MergedTime: timePtr(time.Date(2019, 11, 12, 21, 39, 27, 0, time.UTC)),
MergeCommitSHA: "f32b0a9dfd09a60f616f29158f772cedd89942d2",
+ Context: base.BasicIssueContext(3),
},
{
Number: 4,
@@ -332,10 +333,11 @@ func TestGitHubDownloadRepo(t *testing.T) {
Content: "+1",
},
},
+ Context: base.BasicIssueContext(4),
},
}, prs)
- reviews, err := downloader.GetReviews(3)
+ reviews, err := downloader.GetReviews(base.BasicIssueContext(3))
assert.NoError(t, err)
assertReviewsEqual(t, []*base.Review{
{
@@ -367,7 +369,7 @@ func TestGitHubDownloadRepo(t *testing.T) {
},
}, reviews)
- reviews, err = downloader.GetReviews(4)
+ reviews, err = downloader.GetReviews(base.BasicIssueContext(4))
assert.NoError(t, err)
assertReviewsEqual(t, []*base.Review{
{