2022-10-11 12:26:42 +00:00
|
|
|
process.env['NODE_TLS_REJECT_UNAUTHORIZED'] = '0';
|
2022-01-18 17:10:27 +00:00
|
|
|
import { tap, expect } from '@pushrocks/tapbundle';
|
|
|
|
|
2022-10-09 16:15:37 +00:00
|
|
|
import * as cloudlyConnectorMod from '../ts/connector.cloudly/cloudlyconnector.js';
|
2022-01-18 17:10:27 +00:00
|
|
|
|
|
|
|
tap.test('should be able to announce a container to cloudly', async () => {
|
|
|
|
const cloudlyConnector = new cloudlyConnectorMod.CloudlyConnector(null);
|
2022-10-11 12:26:42 +00:00
|
|
|
await cloudlyConnector.announceDockerContainer(
|
|
|
|
{
|
|
|
|
registryUrl: 'registry.losssless.com',
|
|
|
|
tag: 'testcontainer',
|
|
|
|
version: 'x.x.x',
|
|
|
|
labels: [],
|
|
|
|
},
|
|
|
|
'cloudly.lossless.one'
|
|
|
|
);
|
2022-01-18 17:10:27 +00:00
|
|
|
});
|
|
|
|
|
2022-10-09 16:15:37 +00: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 12:26:42 +00:00
|
|
|
});
|
|
|
|
});
|
2022-10-09 16:15:37 +00:00
|
|
|
|
2022-10-11 12:26:42 +00:00
|
|
|
tap.start();
|