aboutsummaryrefslogtreecommitdiffstats
path: root/bridge/gitlab/export_test.go
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2020-02-09 22:17:10 +0100
committerMichael Muré <batolettre@gmail.com>2020-02-10 01:22:01 +0100
commitbd7b50bc8638d3b6c776dd974de32a1ea385c835 (patch)
tree9d941dd499a3bffbbba3295c58a6b77b5b6feeca /bridge/gitlab/export_test.go
parent3caffeef4d2ed25d4eb5d4bfd262f4fc3b92561f (diff)
downloadgit-bug-bd7b50bc8638d3b6c776dd974de32a1ea385c835.tar.gz
github/gitlab: many fixes and improvments at the config step
Diffstat (limited to 'bridge/gitlab/export_test.go')
-rw-r--r--bridge/gitlab/export_test.go9
1 files changed, 5 insertions, 4 deletions
diff --git a/bridge/gitlab/export_test.go b/bridge/gitlab/export_test.go
index 1d387655..c97416d8 100644
--- a/bridge/gitlab/export_test.go
+++ b/bridge/gitlab/export_test.go
@@ -164,6 +164,7 @@ func TestPushPull(t *testing.T) {
token := auth.NewToken(envToken, target)
token.SetMetadata(auth.MetaKeyLogin, login)
+ token.SetMetadata(auth.MetaKeyBaseURL, defaultBaseURL)
err = auth.Store(repo, token)
require.NoError(t, err)
@@ -194,7 +195,7 @@ func TestPushPull(t *testing.T) {
exporter := &gitlabExporter{}
err = exporter.Init(backend, core.Configuration{
keyProjectID: strconv.Itoa(projectID),
- keyGitlabBaseUrl: "https://gitlab.com/",
+ keyGitlabBaseUrl: defaultBaseURL,
})
require.NoError(t, err)
@@ -222,7 +223,7 @@ func TestPushPull(t *testing.T) {
importer := &gitlabImporter{}
err = importer.Init(backend, core.Configuration{
keyProjectID: strconv.Itoa(projectID),
- keyGitlabBaseUrl: "https://gitlab.com/",
+ keyGitlabBaseUrl: defaultBaseURL,
})
require.NoError(t, err)
@@ -287,7 +288,7 @@ func generateRepoName() string {
// create repository need a token with scope 'repo'
func createRepository(ctx context.Context, name string, token *auth.Token) (int, error) {
- client, err := buildClient("https://gitlab.com/", token)
+ client, err := buildClient(defaultBaseURL, token)
if err != nil {
return 0, err
}
@@ -307,7 +308,7 @@ func createRepository(ctx context.Context, name string, token *auth.Token) (int,
// delete repository need a token with scope 'delete_repo'
func deleteRepository(ctx context.Context, project int, token *auth.Token) error {
- client, err := buildClient("https://gitlab.com/", token)
+ client, err := buildClient(defaultBaseURL, token)
if err != nil {
return err
}