chore: update cloudly dependency stack
Align Cloudly with the current typedserver, smartconfig, smartstate, and Docker tooling releases so builds and Docker output stay compatible with the upgraded stack.
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
import { Qenv } from '@push.rocks/qenv';
|
||||
import { SmartNetwork } from '@push.rocks/smartnetwork';
|
||||
import { tapNodeTools } from '@git.zone/tstest/tapbundle_node';
|
||||
import { tap } from '@git.zone/tstest/tapbundle';
|
||||
import { TapNodeTools } from '@git.zone/tstest/tapbundle_serverside';
|
||||
|
||||
const tapNodeTools = new TapNodeTools(tap);
|
||||
|
||||
const testQenv = new Qenv('./', './.nogit/');
|
||||
|
||||
@@ -24,10 +27,10 @@ const smartmongo = await tapNodeTools.createSmartmongo();
|
||||
stopFunctions.push(async () => {
|
||||
await smartmongo.stopAndDumpToDir('./.nogit/mongodump');
|
||||
});
|
||||
const smarts3 = await tapNodeTools.createSmarts3();
|
||||
await smarts3.createBucket('cloudly_test_bucket');
|
||||
const smartstorage = await tapNodeTools.createSmartStorage();
|
||||
await smartstorage.createBucket('cloudly_test_bucket');
|
||||
stopFunctions.push(async () => {
|
||||
await smarts3.stop();
|
||||
await smartstorage.stop();
|
||||
});
|
||||
|
||||
export const testCloudlyAdminAccount = {
|
||||
@@ -36,13 +39,12 @@ export const testCloudlyAdminAccount = {
|
||||
};
|
||||
|
||||
export const testCloudlyConfig: cloudly.ICloudlyConfig = {
|
||||
cfToken: await testQenv.getEnvVarOnDemand('CF_TOKEN'),
|
||||
environment: 'integration',
|
||||
letsEncryptEmail: 'test@serve.zone',
|
||||
publicUrl: '127.0.0.1',
|
||||
publicPort: await getPublicPort(),
|
||||
mongoDescriptor: await smartmongo.getMongoDescriptor(),
|
||||
s3Descriptor: await smarts3.getS3Descriptor({
|
||||
s3Descriptor: await smartstorage.getStorageDescriptor({
|
||||
bucketName: 'cloudly_test_bucket'
|
||||
}),
|
||||
sslMode: 'none',
|
||||
|
||||
+13
-7
@@ -7,6 +7,15 @@ import * as cloudlyApiClient from '@serve.zone/api';
|
||||
let testCloudly: cloudly.Cloudly;
|
||||
let testClient: cloudlyApiClient.CloudlyApiClient;
|
||||
|
||||
const logErrorDetails = (errorArg: unknown) => {
|
||||
if (errorArg instanceof Error) {
|
||||
console.error(` - Error message: ${errorArg.message}`);
|
||||
console.error(` - Error stack:`, errorArg.stack);
|
||||
return;
|
||||
}
|
||||
console.error(` - Error:`, errorArg);
|
||||
};
|
||||
|
||||
tap.preTask('should start cloudly', async () => {
|
||||
testCloudly = await helpers.createCloudly();
|
||||
await testCloudly.start();
|
||||
@@ -31,7 +40,7 @@ tap.preTask('should create a new machine user for testing', async () => {
|
||||
console.log(` - Username: ${machineUser.data.username}`);
|
||||
console.log(` - Role: ${machineUser.data.role}`);
|
||||
console.log(` - Token: 'test'`);
|
||||
console.log(` - Token roles: ${machineUser.data.tokens[0].assignedRoles}`);
|
||||
console.log(` - Token roles: ${machineUser.data.tokens?.[0]?.assignedRoles?.join(', ') ?? ''}`);
|
||||
await machineUser.save();
|
||||
console.log('✅ PreTask: First machine user saved successfully');
|
||||
});
|
||||
@@ -78,8 +87,7 @@ tap.test('should get an identity', async () => {
|
||||
expect(identity).toBeTruthy();
|
||||
} catch (error) {
|
||||
console.error('❌ Failed to get identity:');
|
||||
console.error(` - Error message: ${error.message}`);
|
||||
console.error(` - Error stack:`, error.stack);
|
||||
logErrorDetails(error);
|
||||
throw error;
|
||||
}
|
||||
});
|
||||
@@ -378,8 +386,7 @@ tap.test('should create and upload an image', async () => {
|
||||
expect(image).toBeTruthy();
|
||||
} catch (error) {
|
||||
console.error('❌ Failed to create image:');
|
||||
console.error(` - Error message: ${error.message}`);
|
||||
console.error(` - Error stack:`, error.stack);
|
||||
logErrorDetails(error);
|
||||
throw error;
|
||||
}
|
||||
})
|
||||
@@ -398,8 +405,7 @@ tap.test('should upload an image version', async () => {
|
||||
console.log('✅ Image version uploaded successfully');
|
||||
} catch (error) {
|
||||
console.error('❌ Failed to upload image version:');
|
||||
console.error(` - Error message: ${error.message}`);
|
||||
console.error(` - Error stack:`, error.stack);
|
||||
logErrorDetails(error);
|
||||
throw error;
|
||||
}
|
||||
});
|
||||
|
||||
+1
-1
@@ -20,4 +20,4 @@ tap.test('should end the service', async (tools) => {
|
||||
tools.delayFor(1000).then(() => process.exit());
|
||||
});
|
||||
|
||||
tap.start();
|
||||
export default tap.start();
|
||||
|
||||
Reference in New Issue
Block a user