aboutsummaryrefslogtreecommitdiffstats
path: root/bridge/gitlab/import_test.go
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2020-02-09 01:31:00 +0100
committerGitHub <noreply@github.com>2020-02-09 01:31:00 +0100
commit9e1a987b4d94dc5c2115423ede5954d4faf1d342 (patch)
treee30bb28d55444a7d1e66c8fa8b8ba7d413805473 /bridge/gitlab/import_test.go
parent97bc5ccd229b7b438262a84e3c42783b4d4a82af (diff)
parent9b1aaa032d36e1ac05504916e359f767d1622d9d (diff)
downloadgit-bug-9e1a987b4d94dc5c2115423ede5954d4faf1d342.tar.gz
Merge pull request #294 from MichaelMure/cred-metadata
Cred metadata
Diffstat (limited to 'bridge/gitlab/import_test.go')
-rw-r--r--bridge/gitlab/import_test.go11
1 files changed, 5 insertions, 6 deletions
diff --git a/bridge/gitlab/import_test.go b/bridge/gitlab/import_test.go
index 1e2f5d50..3c0caa55 100644
--- a/bridge/gitlab/import_test.go
+++ b/bridge/gitlab/import_test.go
@@ -21,6 +21,7 @@ import (
func TestImport(t *testing.T) {
author := identity.NewIdentity("Amine Hilaly", "hilalyamine@gmail.com")
+
tests := []struct {
name string
url string
@@ -94,13 +95,11 @@ func TestImport(t *testing.T) {
t.Skip("Env var GITLAB_PROJECT_ID missing")
}
- err = author.Commit(repo)
- require.NoError(t, err)
-
- err = identity.SetUserIdentity(repo, author)
- require.NoError(t, err)
+ login := "test-identity"
+ author.SetMetadata(metaKeyGitlabLogin, login)
- token := auth.NewToken(author.Id(), envToken, target)
+ token := auth.NewToken(envToken, target)
+ token.SetMetadata(metaKeyGitlabLogin, login)
err = auth.Store(repo, token)
require.NoError(t, err)