fix(test): Enhance test helpers with dynamic Hetzner token retrieval.

This commit is contained in:
2024-11-06 16:22:38 +01:00
parent 7789348f4e
commit 0eff7c7510
5 changed files with 16 additions and 2 deletions

View File

@ -25,6 +25,13 @@ export const createCloudly = async () => {
mongoDescriptor: await smartmongo.getMongoDescriptor(),
s3Descriptor: await smarts3.getS3Descriptor(),
sslMode: 'none',
...(() => {
if (process.env.NPMCI_SECRET01) {
return {
hetznerToken: process.env.NPMCI_SECRET01
}
}
})()
};
const cloudlyInstance = new cloudly.Cloudly(cloudlyConfig);
return cloudlyInstance;