chore(cloudly): update api dependency and stabilize tests

This commit is contained in:
2026-05-24 01:30:32 +00:00
parent 304767a75c
commit e7d3140f7a
7 changed files with 733 additions and 63 deletions
+8 -1
View File
@@ -1,3 +1,6 @@
import * as fs from 'node:fs/promises';
import * as path from 'node:path';
import { Qenv } from '@push.rocks/qenv';
import { SmartNetwork } from '@push.rocks/smartnetwork';
import { tap } from '@git.zone/tstest/tapbundle';
@@ -58,7 +61,11 @@ export const testCloudlyConfig: cloudly.ICloudlyConfig = {
})(),
};
await tapNodeTools.testFileProvider.getDockerAlpineImageAsLocalTarball();
const alpineImageTarballPath = path.join(process.cwd(), '.nogit/testfiles/alpine.tar');
const existingAlpineImageTarball = await fs.stat(alpineImageTarballPath).catch(() => undefined);
if (!existingAlpineImageTarball?.isFile() || existingAlpineImageTarball.size === 0) {
await tapNodeTools.testFileProvider.getDockerAlpineImageAsLocalTarball();
}
export const createCloudly = async () => {
const cloudlyInstance = new cloudly.Cloudly(testCloudlyConfig);
+2 -2
View File
@@ -463,10 +463,10 @@ tap.test('should upload an image version', async () => {
});
tap.test('should stop the apiclient', async (toolsArg) => {
await toolsArg.delayFor(10000);
await helpers.stopCloudly();
await testClient.stop();
await testCloudly.stop();
await helpers.stopCloudly();
toolsArg.delayFor(1000).then(() => process.exit());
})
export default tap.start();