smartbucket/test/test.ts

27 lines
758 B
TypeScript
Raw Normal View History

2019-07-07 08:48:24 +00:00
import { expect, tap } from '@pushrocks/tapbundle';
2019-10-15 12:16:28 +00:00
import { Qenv } from '@pushrocks/qenv';
2018-09-14 16:07:20 +00:00
import * as smartbucket from '../ts/index';
2018-03-30 17:42:14 +00:00
2019-10-15 12:16:28 +00:00
const testQenv = new Qenv('./', './.nogit/');
let testSmartbucket: smartbucket.SmartBucket;
tap.test('should create a valid smartbucket', async () => {
testSmartbucket = new smartbucket.SmartBucket({
accessKey: testQenv.getEnvVarOnDemand('S3_KEY'),
accessSecret: testQenv.getEnvVarOnDemand('S3_SECRET'),
endpoint: 'ams3.digitaloceanspaces.com'
});
});
tap.skip.test('should create a bucket', async () => {
await testSmartbucket.createBucket('smartbucket');
});
tap.skip.test('should remove testbucket', async () => {
await testSmartbucket.removeBucket('pushrocks-smartbucket');
2018-09-14 16:07:20 +00:00
});
2018-03-30 17:42:14 +00:00
2018-09-14 16:07:20 +00:00
tap.start();