test: prefix git auth with "x-access-token:" when run in a GitHub Action
This commit is contained in:
		
							parent
							
								
									7e824b2c18
								
							
						
					
					
						commit
						f3f9d1ef58
					
				| @ -244,6 +244,19 @@ test('Return the "https" formatted URL if "gitCredentials" is defined with "BITB | ||||
|   ); | ||||
| }); | ||||
| 
 | ||||
| test('Return the "https" formatted URL if "GITHUB_ACTION" is set', async t => { | ||||
|   const {cwd} = await gitRepo(); | ||||
| 
 | ||||
|   t.is( | ||||
|     await getAuthUrl({ | ||||
|       cwd, | ||||
|       env: {...env, GITHUB_ACTION: 'foo', GITHUB_TOKEN: 'token'}, | ||||
|       options: {branch: 'master', repositoryUrl: 'git@host.null:owner/repo.git'}, | ||||
|     }), | ||||
|     'https://x-access-token:token@host.null/owner/repo.git' | ||||
|   ); | ||||
| }); | ||||
| 
 | ||||
| test('Handle "https" URL with group and subgroup, with "GIT_CREDENTIALS"', async t => { | ||||
|   const {cwd} = await gitRepo(); | ||||
| 
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user