fix(core): update
This commit is contained in:
parent
5886283002
commit
9a2cb56094
16
test/test.cloudly.ts
Normal file
16
test/test.cloudly.ts
Normal file
@ -0,0 +1,16 @@
|
||||
process.env["NODE_TLS_REJECT_UNAUTHORIZED"] = '0';
|
||||
import { tap, expect } from '@pushrocks/tapbundle';
|
||||
|
||||
import * as cloudlyConnectorMod from '../ts/connector.cloudly/cloudlyconnector';
|
||||
|
||||
tap.test('should be able to announce a container to cloudly', async () => {
|
||||
const cloudlyConnector = new cloudlyConnectorMod.CloudlyConnector(null);
|
||||
await cloudlyConnector.announceDockerContainer({
|
||||
registryUrl: 'registry.losssless.com',
|
||||
tag: 'testcontainer',
|
||||
version: 'x.x.x',
|
||||
labels: []
|
||||
}, 'cloudly.lossless.one')
|
||||
});
|
||||
|
||||
tap.start();
|
@ -14,9 +14,10 @@ export class CloudlyConnector {
|
||||
}
|
||||
|
||||
public async announceDockerContainer(
|
||||
optionsArg: plugins.tsclass.container.IContainer
|
||||
optionsArg: plugins.tsclass.container.IContainer,
|
||||
testCloudlyUrlArg?: string
|
||||
) {
|
||||
const cloudlyUrl = this.npmciRef.npmciConfig.getConfig().urlCloudly;
|
||||
const cloudlyUrl = testCloudlyUrlArg || this.npmciRef.npmciConfig.getConfig().urlCloudly;
|
||||
if (!cloudlyUrl) {
|
||||
logger.log(
|
||||
'warn',
|
||||
|
Loading…
Reference in New Issue
Block a user