mirror of
				https://github.com/docker/build-push-action.git
				synced 2025-10-31 14:30:54 +00:00 
			
		
		
		
	Use csv-parse lib to parse outputs
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
		
					parent
					
						
							
								695ef9e5a5
							
						
					
				
			
			
				commit
				
					
						bf051e6237
					
				
			
		
					 7 changed files with 1350 additions and 17 deletions
				
			
		|  | @ -30,6 +30,66 @@ describe('getImageID', () => { | |||
|   }); | ||||
| }); | ||||
| 
 | ||||
| describe('isLocalOrTarExporter', () => { | ||||
|   // prettier-ignore
 | ||||
|   test.each([ | ||||
|     [ | ||||
|       [ | ||||
|         'type=registry,ref=user/app', | ||||
|       ], | ||||
|       false | ||||
|     ], | ||||
|     [ | ||||
|       [ | ||||
|         'type=docker', | ||||
|       ], | ||||
|       false | ||||
|     ], | ||||
|     [ | ||||
|       [ | ||||
|         'type=local,dest=./release-out' | ||||
|       ], | ||||
|       true | ||||
|     ], | ||||
|     [ | ||||
|       [ | ||||
|         'type=tar,dest=/tmp/image.tar' | ||||
|       ], | ||||
|       true | ||||
|     ], | ||||
|     [ | ||||
|       [ | ||||
|         'type=docker', | ||||
|         'type=tar,dest=/tmp/image.tar' | ||||
|       ], | ||||
|       true | ||||
|     ], | ||||
|     [ | ||||
|       [ | ||||
|         '"type=tar","dest=/tmp/image.tar"' | ||||
|       ], | ||||
|       true | ||||
|     ], | ||||
|     [ | ||||
|       [ | ||||
|         '" type= local" , dest=./release-out' | ||||
|       ], | ||||
|       true | ||||
|     ], | ||||
|     [ | ||||
|       [ | ||||
|         '.' | ||||
|       ], | ||||
|       false | ||||
|     ], | ||||
|   ])( | ||||
|     'given %p returns %p', | ||||
|     async (outputs: Array<string>, expected: boolean) => { | ||||
|       expect(buildx.isLocalOrTarExporter(outputs)).toEqual(expected); | ||||
|     } | ||||
|   ); | ||||
| }); | ||||
| 
 | ||||
| describe('getVersion', () => { | ||||
|   it('valid', async () => { | ||||
|     await exec.exec('docker', ['buildx', 'version']); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue