2025-10-26 17:44:43 +00:00
|
|
|
// Disable TLS certificate validation for testing
|
|
|
|
|
Deno.env.set('NODE_TLS_REJECT_UNAUTHORIZED', '0');
|
2025-12-14 01:42:14 +00:00
|
|
|
Deno.env.set('SZCI_TEST', 'true');
|
|
|
|
|
Deno.env.set('CI_REPOSITORY_URL', 'https://yyyyyy:xxxxxxxx@gitlab.com/mygroup/myrepo.git');
|
2022-01-18 18:10:27 +01:00
|
|
|
|
2025-10-26 17:44:43 +00:00
|
|
|
import { CloudlyConnector } from '../ts/connector.cloudly/cloudlyconnector.ts';
|
2025-12-14 01:42:14 +00:00
|
|
|
import { Szci } from '../ts/szci.classes.szci.ts';
|
2022-01-18 18:10:27 +01:00
|
|
|
|
2025-12-14 01:42:14 +00:00
|
|
|
Deno.test({
|
|
|
|
|
name: 'should be able to announce a container to cloudly',
|
|
|
|
|
sanitizeResources: false,
|
|
|
|
|
sanitizeOps: false,
|
|
|
|
|
fn: async () => {
|
|
|
|
|
// Create a proper Szci instance for the connector
|
|
|
|
|
const szciInstance = new Szci();
|
|
|
|
|
await szciInstance.start();
|
|
|
|
|
|
|
|
|
|
const cloudlyConnector = new CloudlyConnector(szciInstance);
|
|
|
|
|
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
|
|
|
});
|