| 
									
										
										
										
											2022-10-11 14:26:42 +02:00
										 |  |  | process.env['NODE_TLS_REJECT_UNAUTHORIZED'] = '0'; | 
					
						
							| 
									
										
										
										
											2023-07-12 15:35:38 +02:00
										 |  |  | import { tap, expect } from '@push.rocks/tapbundle'; | 
					
						
							| 
									
										
										
										
											2022-01-18 18:10:27 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-10-09 18:15:37 +02:00
										 |  |  | import * as cloudlyConnectorMod from '../ts/connector.cloudly/cloudlyconnector.js'; | 
					
						
							| 
									
										
										
										
											2022-01-18 18:10:27 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | tap.test('should be able to announce a container to cloudly', async () => { | 
					
						
							|  |  |  |   const cloudlyConnector = new cloudlyConnectorMod.CloudlyConnector(null); | 
					
						
							| 
									
										
										
										
											2022-10-11 14:26:42 +02:00
										 |  |  |   await cloudlyConnector.announceDockerContainer( | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |       registryUrl: 'registry.losssless.com', | 
					
						
							|  |  |  |       tag: 'testcontainer', | 
					
						
							|  |  |  |       version: 'x.x.x', | 
					
						
							|  |  |  |       labels: [], | 
					
						
							|  |  |  |     }, | 
					
						
							|  |  |  |     'cloudly.lossless.one' | 
					
						
							|  |  |  |   ); | 
					
						
							| 
									
										
										
										
											2022-01-18 18:10:27 +01:00
										 |  |  | }); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-10-09 18:15:37 +02:00
										 |  |  | tap.test('should close the program despite socket timeout', async (toolsArg) => { | 
					
						
							|  |  |  |   // TODO: remove when unreffed timeouts in webrequest have been solved.
 | 
					
						
							|  |  |  |   toolsArg.delayFor(0).then(() => { | 
					
						
							|  |  |  |     process.exit(); | 
					
						
							| 
									
										
										
										
											2022-10-11 14:26:42 +02:00
										 |  |  |   }); | 
					
						
							|  |  |  | }); | 
					
						
							| 
									
										
										
										
											2022-10-09 18:15:37 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-10-11 14:26:42 +02:00
										 |  |  | tap.start(); |