-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(package): update url-join to version 4.0.0
- Loading branch information
1 parent
111e894
commit 9cf0a55
Showing
2 changed files
with
20 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -79,7 +79,7 @@ test.serial('Verify token and repository access (group_access 40)', async t => { | |
t.true(gitlab.isDone()); | ||
}); | ||
|
||
test.serial('Verify token and repository access and custom URL', async t => { | ||
test.serial('Verify token and repository access and custom URL with prefix', async t => { | ||
const owner = 'test_user'; | ||
const repo = 'test_repo'; | ||
process.env.GL_TOKEN = 'gitlab_token'; | ||
|
@@ -101,6 +101,23 @@ test.serial('Verify token and repository access and custom URL', async t => { | |
t.deepEqual(t.context.log.args[0], ['Verify GitLab authentication (%s)', 'https://othertesturl.com:9090/prefix']); | ||
}); | ||
|
||
test.serial('Verify token and repository access and custom URL without prefix', async t => { | ||
const owner = 'test_user'; | ||
const repo = 'test_repo'; | ||
process.env.GL_TOKEN = 'gitlab_token'; | ||
const gitlabUrl = 'https://othertesturl.com:9090'; | ||
const gitlab = authenticate({gitlabUrl}) | ||
.get(`/projects/${owner}%2F${repo}`) | ||
.reply(200, {permissions: {project_access: {access_level: 40}}}); | ||
|
||
await t.notThrows( | ||
verify({gitlabUrl}, {repositoryUrl: `[email protected]:${owner}/${repo}.git`}, t.context.logger) | ||
); | ||
|
||
t.true(gitlab.isDone()); | ||
t.deepEqual(t.context.log.args[0], ['Verify GitLab authentication (%s)', 'https://othertesturl.com:9090/api/v4']); | ||
}); | ||
|
||
test.serial('Verify token and repository access with subgroup git URL', async t => { | ||
const repoUri = 'orga/subgroup/test_user/test_repo'; | ||
process.env.GL_TOKEN = 'gitlab_token'; | ||
|
@@ -160,7 +177,7 @@ test.serial('Verify token and repository access with empty gitlabApiPathPrefix', | |
); | ||
|
||
t.true(gitlab.isDone()); | ||
t.deepEqual(t.context.log.args[0], ['Verify GitLab authentication (%s)', 'https://othertesturl.com:9090/']); | ||
t.deepEqual(t.context.log.args[0], ['Verify GitLab authentication (%s)', 'https://othertesturl.com:9090']); | ||
}); | ||
|
||
test.serial('Verify token and repository with environment variables', async t => { | ||
|