aboutsummaryrefslogtreecommitdiffstats
path: root/bridge/gitlab/export_test.go
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2020-02-09 20:08:12 +0100
committerMichael Muré <batolettre@gmail.com>2020-02-09 20:23:38 +0100
commitb3d3612393387c83fa43f908dbb8e2a71068c834 (patch)
treee4609e21dc74e535d45b38cd7d0504681c544160 /bridge/gitlab/export_test.go
parentdca85b309a0a82e9993a345964d0831ab2876fb4 (diff)
parent3caffeef4d2ed25d4eb5d4bfd262f4fc3b92561f (diff)
downloadgit-bug-b3d3612393387c83fa43f908dbb8e2a71068c834.tar.gz
Merge remote-tracking branch 'origin/master' into cheshirekow-jira
Diffstat (limited to 'bridge/gitlab/export_test.go')
-rw-r--r--bridge/gitlab/export_test.go13
1 files changed, 9 insertions, 4 deletions
diff --git a/bridge/gitlab/export_test.go b/bridge/gitlab/export_test.go
index d16defd0..1d387655 100644
--- a/bridge/gitlab/export_test.go
+++ b/bridge/gitlab/export_test.go
@@ -149,8 +149,12 @@ func TestPushPull(t *testing.T) {
require.NoError(t, err)
// set author identity
+ login := "test-identity"
author, err := backend.NewIdentity("test identity", "test@test.org")
require.NoError(t, err)
+ author.SetMetadata(metaKeyGitlabLogin, login)
+ err = author.Commit()
+ require.NoError(t, err)
err = backend.SetUserIdentity(author)
require.NoError(t, err)
@@ -158,12 +162,13 @@ func TestPushPull(t *testing.T) {
defer backend.Close()
interrupt.RegisterCleaner(backend.Close)
- tests := testCases(t, backend)
-
- token := auth.NewToken(author.Id(), envToken, target)
+ token := auth.NewToken(envToken, target)
+ token.SetMetadata(auth.MetaKeyLogin, login)
err = auth.Store(repo, token)
require.NoError(t, err)
+ tests := testCases(t, backend)
+
// generate project name
projectName := generateRepoName()
@@ -260,7 +265,7 @@ func TestPushPull(t *testing.T) {
// verify bug have same number of original operations
require.Len(t, importedBug.Snapshot().Operations, tt.numOpImp)
- // verify bugs are taged with origin=gitlab
+ // verify bugs are tagged with origin=gitlab
issueOrigin, ok := importedBug.Snapshot().GetCreateMetadata(core.MetaKeyOrigin)
require.True(t, ok)
require.Equal(t, issueOrigin, target)