-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy path17_environmentCleanUp.mjs
More file actions
58 lines (49 loc) · 1.8 KB
/
Copy path17_environmentCleanUp.mjs
File metadata and controls
58 lines (49 loc) · 1.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
import { describe, it, beforeEach } from 'node:test';
import assert from 'node:assert/strict';
import { setTimeout } from 'node:timers/promises';
import { req } from '../utils/request.mjs';
import { timestamp } from '../utils/timestamp.mjs';
describe('17. Environment Clean Up', { skip: process.platform === 'win32' }, () => {
beforeEach(timestamp);
//Environment Clean Up Folder
it('drop schema northnwd', async () => {
await req()
.send({ operation: 'drop_schema', schema: 'northnwd' })
.expect((r) => assert.ok(r.body.message.includes('successfully delete'), r.text))
.expect(200);
await setTimeout(1000);
});
it('VALIDATION Check Schema not found.', () => {
return req()
.send({ operation: 'describe_all' })
.expect((r) => assert.ok(!r.body.hasOwnProperty('northnwd'), r.text))
.expect(200);
});
it('drop schema dev', () => {
return req()
.send({ operation: 'drop_schema', schema: 'dev' })
.expect((r) => assert.ok(r.body.message.includes('successfully delete'), r.text))
.expect(200);
});
it('drop schema other', () => {
return req()
.send({ operation: 'drop_schema', schema: 'other' })
.expect((r) => assert.ok(r.body.message.includes('successfully delete'), r.text))
.expect(200);
});
it('drop schema another', () => {
return req()
.send({ operation: 'drop_schema', schema: 'another' })
.expect((r) => assert.ok(r.body.message.includes('successfully delete'), r.text))
.expect(200);
});
it('drop schema call', () => {
return req()
.send({ operation: 'drop_schema', schema: 'call' })
.expect((r) => assert.ok(r.body.message.includes('successfully delete'), r.text))
.expect(200);
});
it('drop schema test_delete_before (disabled)', () => {
return req().send({ operation: 'drop_schema', schema: 'test_delete_before' }).expect(200);
});
});