Skip to content

Commit a80581f

Browse files
#1703: fix test cases for clone-command
1 parent d274caa commit a80581f

File tree

4 files changed

+83
-7
lines changed

4 files changed

+83
-7
lines changed

test/general.test.js

+7-7
Original file line numberDiff line numberDiff line change
@@ -1443,7 +1443,7 @@ describe('GENERAL', () => {
14431443
);
14441444
assert.deepEqual(
14451445
await testUtils.getActualDeployJson('testExisting_automation', 'automation'),
1446-
await testUtils.getExpectedJson('9999999', 'automation', 'retrieve'),
1446+
await testUtils.getExpectedJson('9999999', 'automation', 'clone'),
14471447
'returned deployment file was not equal expected'
14481448
);
14491449

@@ -1453,14 +1453,14 @@ describe('GENERAL', () => {
14531453
1,
14541454
'only one query expected'
14551455
);
1456-
// assert.deepEqual(
1457-
// await testUtils.getActualDeployJson('testExisting_query', 'query'),
1458-
// await testUtils.getExpectedJson('9999999', 'query', 'get'),
1459-
// 'returned deployment JSON was not equal expected'
1460-
// );
1456+
assert.deepEqual(
1457+
await testUtils.getActualDeployJson('testExisting_query', 'query'),
1458+
await testUtils.getExpectedJson('9999999', 'query', 'clone'),
1459+
'returned deployment JSON was not equal expected'
1460+
);
14611461
expect(
14621462
await testUtils.getActualDeployFile('testExisting_query', 'query', 'sql')
1463-
).to.equal(await testUtils.getExpectedFile('9999999', 'query', 'get', 'sql'));
1463+
).to.equal(await testUtils.getExpectedFile('9999999', 'query', 'clone', 'sql'));
14641464

14651465
assert.equal(
14661466
testUtils.getAPIHistoryLength() - expectedApiCallsRetrieve,
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
{
2+
"description": "bla bla",
3+
"key": "testExisting_automation",
4+
"name": "testExisting_automation",
5+
"r__folder_Path": "my automations",
6+
"schedule": {
7+
"endDate": "2022-07-30T00:00:00",
8+
"icalRecur": "FREQ=DAILY;COUNT=1;INTERVAL=1",
9+
"startDate": "2022-07-30T00:00:00",
10+
"timezoneName": "W. Europe Standard Time"
11+
},
12+
"status": "PausedSchedule",
13+
"steps": [
14+
{
15+
"activities": [
16+
{
17+
"r__key": "testExisting_dataExtract",
18+
"r__type": "dataExtract"
19+
},
20+
{
21+
"r__key": "testExisting_emailSend",
22+
"r__type": "emailSend"
23+
},
24+
{
25+
"r__key": "testExisting_fileTransfer",
26+
"r__type": "fileTransfer"
27+
},
28+
{
29+
"r__key": "testExisting_importFile",
30+
"r__type": "importFile"
31+
},
32+
{
33+
"r__key": "testExisting_query",
34+
"r__type": "query"
35+
},
36+
{
37+
"r__key": "testExisting_script",
38+
"r__type": "script"
39+
},
40+
{
41+
"r__key": "testExisting_39f6a488-20eb-4ba0-b0b9",
42+
"r__type": "verification"
43+
}
44+
],
45+
"name": ""
46+
}
47+
],
48+
"type": "scheduled",
49+
"notifications": [
50+
{
51+
"email": ["[email protected]"],
52+
"message": "",
53+
"type": "Complete"
54+
},
55+
{
56+
"email": ["[email protected]"],
57+
"message": "test",
58+
"type": "Error"
59+
}
60+
]
61+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"name": "testExisting_query",
3+
"key": "testExisting_query",
4+
"description": "bla bla",
5+
"targetUpdateTypeName": "Overwrite",
6+
"r__dataExtension_key": "testExisting_dataExtension",
7+
"r__folder_Path": "Query"
8+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
SELECT
2+
SubscriberKey AS testField,
3+
TRIM(last_name) AS name
4+
FROM
5+
_Subscribers
6+
WHERE
7+
country IN ('test')

0 commit comments

Comments
 (0)