presidium 0.16.20 → 0.16.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/teardown.js +4 -1
- package/teardown.test.js +6 -5
package/package.json
CHANGED
package/teardown.js
CHANGED
|
@@ -17,7 +17,10 @@ const KinesisStream = require('./KinesisStream')
|
|
|
17
17
|
* ```
|
|
18
18
|
*/
|
|
19
19
|
const teardown = async function (dependency) {
|
|
20
|
-
if (dependency
|
|
20
|
+
if (dependency == null) {
|
|
21
|
+
// noop
|
|
22
|
+
}
|
|
23
|
+
else if (dependency.constructor == DynamoTable) {
|
|
21
24
|
await dependency.delete()
|
|
22
25
|
}
|
|
23
26
|
else if (dependency.constructor == DynamoStream) {
|
package/teardown.test.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
const Test = require('thunk-test')
|
|
2
|
-
const DynamoTable = require('
|
|
3
|
-
const DynamoStream = require('
|
|
4
|
-
const ElasticsearchIndex = require('
|
|
5
|
-
const S3Bucket = require('
|
|
6
|
-
const KinesisStream = require('
|
|
2
|
+
const DynamoTable = require('./DynamoTable')
|
|
3
|
+
const DynamoStream = require('./DynamoStream')
|
|
4
|
+
const ElasticsearchIndex = require('./ElasticsearchIndex')
|
|
5
|
+
const S3Bucket = require('./S3Bucket')
|
|
6
|
+
const KinesisStream = require('./KinesisStream')
|
|
7
7
|
const teardown = require('./teardown')
|
|
8
8
|
|
|
9
9
|
const test = new Test('teardown', async function () {
|
|
@@ -48,6 +48,7 @@ const test = new Test('teardown', async function () {
|
|
|
48
48
|
})
|
|
49
49
|
await myKinesisStream.ready
|
|
50
50
|
|
|
51
|
+
await teardown(null)
|
|
51
52
|
await teardown(myDynamoTable)
|
|
52
53
|
await teardown(myDynamoStream)
|
|
53
54
|
await teardown(myElasticsearchIndex)
|