fix(build): add Node types to tsconfig and update build dependencies for tsbuild 4.4.x
This commit is contained in:
@@ -14,17 +14,27 @@ let testSmartbucket: smartbucket.SmartBucket;
|
||||
|
||||
// Setup: Create test bucket
|
||||
tap.test('should create valid smartbucket and bucket', async () => {
|
||||
const accessKey = await testQenv.getEnvVarOnDemand('S3_ACCESSKEY');
|
||||
const accessSecret = await testQenv.getEnvVarOnDemand('S3_SECRETKEY');
|
||||
const endpoint = await testQenv.getEnvVarOnDemand('S3_ENDPOINT');
|
||||
const port = await testQenv.getEnvVarOnDemand('S3_PORT');
|
||||
const bucketName = await testQenv.getEnvVarOnDemand('S3_BUCKET');
|
||||
|
||||
if (!accessKey || !accessSecret || !endpoint || !port || !bucketName) {
|
||||
throw new Error('Missing S3 test configuration.');
|
||||
}
|
||||
|
||||
testSmartbucket = new smartbucket.SmartBucket({
|
||||
accessKey: await testQenv.getEnvVarOnDemand('S3_ACCESSKEY'),
|
||||
accessSecret: await testQenv.getEnvVarOnDemand('S3_SECRETKEY'),
|
||||
endpoint: await testQenv.getEnvVarOnDemand('S3_ENDPOINT'),
|
||||
port: parseInt(await testQenv.getEnvVarOnDemand('S3_PORT')),
|
||||
accessKey,
|
||||
accessSecret,
|
||||
endpoint,
|
||||
port: Number.parseInt(port, 10),
|
||||
useSsl: false,
|
||||
});
|
||||
|
||||
testBucket = await smartbucket.Bucket.getBucketByName(
|
||||
testSmartbucket,
|
||||
await testQenv.getEnvVarOnDemand('S3_BUCKET')
|
||||
bucketName
|
||||
);
|
||||
expect(testBucket).toBeInstanceOf(smartbucket.Bucket);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user