-
Notifications
You must be signed in to change notification settings - Fork 131
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
19 additions
and
2 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 |
---|---|---|
|
@@ -44,7 +44,7 @@ test.serial('Verify package, token and repository access', async t => { | |
t.true(github.isDone()); | ||
}); | ||
|
||
test.serial('Verify package, token and repository access and custom URL', async t => { | ||
test.serial('Verify package, token and repository access and custom URL with prefix', async t => { | ||
const owner = 'test_user'; | ||
const repo = 'test_repo'; | ||
process.env.GH_TOKEN = 'github_token'; | ||
|
@@ -66,6 +66,23 @@ test.serial('Verify package, token and repository access and custom URL', async | |
t.deepEqual(t.context.log.args[0], ['Verify GitHub authentication (%s)', 'https://othertesturl.com:9090/prefix']); | ||
}); | ||
|
||
test.serial('Verify package, token and repository access and custom URL without prefix', async t => { | ||
const owner = 'test_user'; | ||
const repo = 'test_repo'; | ||
process.env.GH_TOKEN = 'github_token'; | ||
const githubUrl = 'https://othertesturl.com:9090'; | ||
const github = authenticate({githubUrl}) | ||
.get(`/repos/${owner}/${repo}`) | ||
.reply(200, {permissions: {push: true}}); | ||
|
||
await t.notThrows( | ||
verify({githubUrl}, {repositoryUrl: `[email protected]:${owner}/${repo}.git`}, t.context.logger) | ||
); | ||
|
||
t.true(github.isDone()); | ||
t.deepEqual(t.context.log.args[0], ['Verify GitHub authentication (%s)', 'https://othertesturl.com:9090']); | ||
}); | ||
|
||
test.serial('Verify package, token and repository with environment variables', async t => { | ||
const owner = 'test_user'; | ||
const repo = 'test_repo'; | ||
|