@@ -31,7 +31,8 @@ test.afterEach.always(() => {
3131} ) ;
3232
3333test . serial ( 'Default values, reading repositoryUrl from package.json' , async t => {
34- const pkg = { repository :
'[email protected] :owner/module.git' } ; 34+ process . env . GIT_CREDENTIALS = 'user:pass' ;
35+ const pkg = { repository : 'https://package.com/owner/module.git' } ;
3536 // Create a git repository, set the current working directory at the root of the repo
3637 await gitRepo ( ) ;
3738 await gitCommits ( [ 'First' ] ) ;
@@ -44,25 +45,27 @@ test.serial('Default values, reading repositoryUrl from package.json', async t =
4445
4546 // Verify the default options are set
4647 t . is ( options . branch , 'master' ) ;
47- t . is ( options . repositoryUrl , 'git @package.com: owner/module.git' ) ;
48+ t . is ( options . repositoryUrl , 'https://user:pass @package.com/ owner/module.git' ) ;
4849 t . is ( options . tagFormat , `v\${version}` ) ;
4950} ) ;
5051
5152test . serial ( 'Default values, reading repositoryUrl from repo if not set in package.json' , async t => {
53+ process . env . GIT_CREDENTIALS = 'user:pass' ;
5254 // Create a git repository, set the current working directory at the root of the repo
5355 await gitRepo ( ) ;
5456 // Add remote.origin.url config
55- await gitAddConfig ( 'remote.origin.url' , 'git@repo .com: owner/module.git' ) ;
57+ await gitAddConfig ( 'remote.origin.url' , 'https://hostname .com/ owner/module.git' ) ;
5658
5759 const { options} = await t . context . getConfig ( ) ;
5860
5961 // Verify the default options are set
6062 t . is ( options . branch , 'master' ) ;
61- t . is ( options . repositoryUrl , 'git@repo .com: owner/module.git' ) ;
63+ t . is ( options . repositoryUrl , 'https://user:pass@hostname .com/ owner/module.git' ) ;
6264 t . is ( options . tagFormat , `v\${version}` ) ;
6365} ) ;
6466
6567test . serial ( 'Default values, reading repositoryUrl (http url) from package.json if not set in repo' , async t => {
68+ process . env . GIT_CREDENTIALS = 'user:pass' ;
6669 const pkg = { repository : 'https://hostname.com/owner/module.git' } ;
6770 // Create a git repository, set the current working directory at the root of the repo
6871 await gitRepo ( ) ;
@@ -73,7 +76,7 @@ test.serial('Default values, reading repositoryUrl (http url) from package.json
7376
7477 // Verify the default options are set
7578 t . is ( options . branch , 'master' ) ;
76- t . is ( options . repositoryUrl , pkg . repository ) ;
79+ t . is ( options . repositoryUrl , 'https://user:[email protected] /owner/module.git' ) ; 7780 t . is ( options . tagFormat , `v\${version}` ) ;
7881} ) ;
7982
0 commit comments