@itentialopensource/adapter-google_drive 0.1.1 → 0.3.0
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/AUTH.md +39 -0
- package/BROKER.md +199 -0
- package/CALLS.md +169 -0
- package/CHANGELOG.md +17 -2
- package/CODE_OF_CONDUCT.md +12 -17
- package/CONTRIBUTING.md +88 -74
- package/ENHANCE.md +69 -0
- package/PROPERTIES.md +641 -0
- package/README.md +222 -572
- package/SUMMARY.md +9 -0
- package/SYSTEMINFO.md +11 -0
- package/TROUBLESHOOT.md +47 -0
- package/adapter.js +289 -470
- package/adapterBase.js +1006 -252
- package/entities/.generic/action.json +105 -0
- package/entities/.generic/schema.json +6 -1
- package/error.json +6 -0
- package/package.json +10 -6
- package/pronghorn.json +642 -570
- package/propertiesDecorators.json +14 -0
- package/propertiesSchema.json +421 -0
- package/refs?service=git-upload-pack +0 -0
- package/report/adapterInfo.json +10 -0
- package/report/updateReport1653999170460.json +120 -0
- package/sampleProperties.json +90 -1
- package/test/integration/adapterTestBasicGet.js +1 -1
- package/test/integration/adapterTestIntegration.js +900 -1267
- package/test/unit/adapterBaseTestUnit.js +30 -25
- package/test/unit/adapterTestUnit.js +90 -177
- package/utils/adapterInfo.js +206 -0
- package/utils/entitiesToDB.js +12 -57
- package/utils/pre-commit.sh +3 -0
- package/utils/tbScript.js +35 -20
- package/utils/tbUtils.js +49 -31
- package/utils/testRunner.js +16 -16
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
// Set globals
|
|
4
4
|
/* global describe it log pronghornProps */
|
|
5
5
|
/* eslint no-unused-vars: warn */
|
|
6
|
+
/* eslint no-underscore-dangle: warn */
|
|
7
|
+
/* eslint import/no-dynamic-require:warn */
|
|
6
8
|
|
|
7
9
|
// include required items for testing & logging
|
|
8
10
|
const assert = require('assert');
|
|
@@ -14,27 +16,38 @@ const { expect } = require('chai');
|
|
|
14
16
|
const { use } = require('chai');
|
|
15
17
|
const td = require('testdouble');
|
|
16
18
|
const util = require('util');
|
|
17
|
-
const pronghorn = require('../../pronghorn.json');
|
|
18
19
|
|
|
19
|
-
pronghorn.methodsByName = pronghorn.methods.reduce((result, meth) => ({ ...result, [meth.name]: meth }), {});
|
|
20
20
|
const anything = td.matchers.anything();
|
|
21
21
|
|
|
22
22
|
// stub and attemptTimeout are used throughout the code so set them here
|
|
23
23
|
let logLevel = 'none';
|
|
24
|
-
const stub = true;
|
|
25
24
|
const isRapidFail = false;
|
|
26
25
|
const isSaveMockData = false;
|
|
27
|
-
|
|
26
|
+
|
|
27
|
+
// read in the properties from the sampleProperties files
|
|
28
|
+
let adaptdir = __dirname;
|
|
29
|
+
if (adaptdir.endsWith('/test/integration')) {
|
|
30
|
+
adaptdir = adaptdir.substring(0, adaptdir.length - 17);
|
|
31
|
+
} else if (adaptdir.endsWith('/test/unit')) {
|
|
32
|
+
adaptdir = adaptdir.substring(0, adaptdir.length - 10);
|
|
33
|
+
}
|
|
34
|
+
const samProps = require(`${adaptdir}/sampleProperties.json`).properties;
|
|
28
35
|
|
|
29
36
|
// these variables can be changed to run in integrated mode so easier to set them here
|
|
30
37
|
// always check these in with bogus data!!!
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
+
samProps.stub = true;
|
|
39
|
+
samProps.host = 'replace.hostorip.here';
|
|
40
|
+
samProps.authentication.username = 'username';
|
|
41
|
+
samProps.authentication.password = 'password';
|
|
42
|
+
samProps.protocol = 'http';
|
|
43
|
+
samProps.port = 80;
|
|
44
|
+
samProps.ssl.enabled = false;
|
|
45
|
+
samProps.ssl.accept_invalid_cert = false;
|
|
46
|
+
if (samProps.request.attempt_timeout < 30000) {
|
|
47
|
+
samProps.request.attempt_timeout = 30000;
|
|
48
|
+
}
|
|
49
|
+
const attemptTimeout = samProps.request.attempt_timeout;
|
|
50
|
+
const { stub } = samProps;
|
|
38
51
|
|
|
39
52
|
// these are the adapter properties. You generally should not need to alter
|
|
40
53
|
// any of these after they are initially set up
|
|
@@ -46,102 +59,7 @@ global.pronghornProps = {
|
|
|
46
59
|
adapters: [{
|
|
47
60
|
id: 'Test-google_drive',
|
|
48
61
|
type: 'GoogleDrive',
|
|
49
|
-
properties:
|
|
50
|
-
host,
|
|
51
|
-
port,
|
|
52
|
-
base_path: '/drive/v3',
|
|
53
|
-
version: '',
|
|
54
|
-
cache_location: 'none',
|
|
55
|
-
encode_pathvars: true,
|
|
56
|
-
save_metric: false,
|
|
57
|
-
stub,
|
|
58
|
-
protocol,
|
|
59
|
-
authentication: {
|
|
60
|
-
auth_method: 'no_authentication',
|
|
61
|
-
username,
|
|
62
|
-
password,
|
|
63
|
-
token: '',
|
|
64
|
-
invalid_token_error: 401,
|
|
65
|
-
token_timeout: -1,
|
|
66
|
-
token_cache: 'local',
|
|
67
|
-
auth_field: 'header.headers.Authorization',
|
|
68
|
-
auth_field_format: 'Bearer {token}',
|
|
69
|
-
auth_logging: false,
|
|
70
|
-
client_id: '',
|
|
71
|
-
client_secret: '',
|
|
72
|
-
grant_type: ''
|
|
73
|
-
},
|
|
74
|
-
healthcheck: {
|
|
75
|
-
type: 'intermittent',
|
|
76
|
-
frequency: 600000,
|
|
77
|
-
query_object: {}
|
|
78
|
-
},
|
|
79
|
-
throttle: {
|
|
80
|
-
throttle_enabled: false,
|
|
81
|
-
number_pronghorns: 1,
|
|
82
|
-
sync_async: 'sync',
|
|
83
|
-
max_in_queue: 1000,
|
|
84
|
-
concurrent_max: 1,
|
|
85
|
-
expire_timeout: 0,
|
|
86
|
-
avg_runtime: 200,
|
|
87
|
-
priorities: [
|
|
88
|
-
{
|
|
89
|
-
value: 0,
|
|
90
|
-
percent: 100
|
|
91
|
-
}
|
|
92
|
-
]
|
|
93
|
-
},
|
|
94
|
-
request: {
|
|
95
|
-
number_redirects: 0,
|
|
96
|
-
number_retries: 3,
|
|
97
|
-
limit_retry_error: [0],
|
|
98
|
-
failover_codes: [],
|
|
99
|
-
attempt_timeout: attemptTimeout,
|
|
100
|
-
global_request: {
|
|
101
|
-
payload: {},
|
|
102
|
-
uriOptions: {},
|
|
103
|
-
addlHeaders: {},
|
|
104
|
-
authData: {}
|
|
105
|
-
},
|
|
106
|
-
healthcheck_on_timeout: true,
|
|
107
|
-
return_raw: true,
|
|
108
|
-
archiving: false,
|
|
109
|
-
return_request: false
|
|
110
|
-
},
|
|
111
|
-
proxy: {
|
|
112
|
-
enabled: false,
|
|
113
|
-
host: '',
|
|
114
|
-
port: 1,
|
|
115
|
-
protocol: 'http',
|
|
116
|
-
username: '',
|
|
117
|
-
password: ''
|
|
118
|
-
},
|
|
119
|
-
ssl: {
|
|
120
|
-
ecdhCurve: '',
|
|
121
|
-
enabled: sslenable,
|
|
122
|
-
accept_invalid_cert: sslinvalid,
|
|
123
|
-
ca_file: '',
|
|
124
|
-
key_file: '',
|
|
125
|
-
cert_file: '',
|
|
126
|
-
secure_protocol: '',
|
|
127
|
-
ciphers: ''
|
|
128
|
-
},
|
|
129
|
-
mongo: {
|
|
130
|
-
host: '',
|
|
131
|
-
port: 0,
|
|
132
|
-
database: '',
|
|
133
|
-
username: '',
|
|
134
|
-
password: '',
|
|
135
|
-
replSet: '',
|
|
136
|
-
db_ssl: {
|
|
137
|
-
enabled: false,
|
|
138
|
-
accept_invalid_cert: false,
|
|
139
|
-
ca_file: '',
|
|
140
|
-
key_file: '',
|
|
141
|
-
cert_file: ''
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
}
|
|
62
|
+
properties: samProps
|
|
145
63
|
}]
|
|
146
64
|
}
|
|
147
65
|
};
|
|
@@ -425,36 +343,28 @@ describe('[integration] Google_drive Adapter Test', () => {
|
|
|
425
343
|
-----------------------------------------------------------------------
|
|
426
344
|
-----------------------------------------------------------------------
|
|
427
345
|
*/
|
|
428
|
-
let skipCount = 0;
|
|
429
|
-
|
|
430
346
|
describe('#driveAboutGet - errors', () => {
|
|
431
347
|
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
runCommonAsserts(data, error);
|
|
441
|
-
}
|
|
442
|
-
saveMockData('About', 'driveAboutGet', 'default', data);
|
|
443
|
-
done();
|
|
444
|
-
} catch (err) {
|
|
445
|
-
log.error(`Test Failure: ${err}`);
|
|
446
|
-
done(err);
|
|
348
|
+
try {
|
|
349
|
+
a.driveAboutGet(null, null, null, null, null, null, null, (data, error) => {
|
|
350
|
+
try {
|
|
351
|
+
if (stub) {
|
|
352
|
+
const displayE = 'Error 400 received on request';
|
|
353
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-google_drive-connectorRest-handleEndResponse', displayE);
|
|
354
|
+
} else {
|
|
355
|
+
runCommonAsserts(data, error);
|
|
447
356
|
}
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
357
|
+
saveMockData('About', 'driveAboutGet', 'default', data);
|
|
358
|
+
done();
|
|
359
|
+
} catch (err) {
|
|
360
|
+
log.error(`Test Failure: ${err}`);
|
|
361
|
+
done(err);
|
|
362
|
+
}
|
|
363
|
+
});
|
|
364
|
+
} catch (error) {
|
|
365
|
+
log.error(`Adapter Exception: ${error}`);
|
|
366
|
+
done(error);
|
|
367
|
+
}
|
|
458
368
|
}).timeout(attemptTimeout);
|
|
459
369
|
});
|
|
460
370
|
|
|
@@ -473,94 +383,76 @@ describe('[integration] Google_drive Adapter Test', () => {
|
|
|
473
383
|
};
|
|
474
384
|
describe('#driveChangesWatch - errors', () => {
|
|
475
385
|
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
runCommonAsserts(data, error);
|
|
485
|
-
}
|
|
486
|
-
saveMockData('Changes', 'driveChangesWatch', 'default', data);
|
|
487
|
-
done();
|
|
488
|
-
} catch (err) {
|
|
489
|
-
log.error(`Test Failure: ${err}`);
|
|
490
|
-
done(err);
|
|
386
|
+
try {
|
|
387
|
+
a.driveChangesWatch(null, null, null, null, null, null, null, changesPageToken, null, null, null, null, null, null, null, null, null, null, null, null, changesDriveChangesWatchBodyParam, (data, error) => {
|
|
388
|
+
try {
|
|
389
|
+
if (stub) {
|
|
390
|
+
const displayE = 'Error 400 received on request';
|
|
391
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-google_drive-connectorRest-handleEndResponse', displayE);
|
|
392
|
+
} else {
|
|
393
|
+
runCommonAsserts(data, error);
|
|
491
394
|
}
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
395
|
+
saveMockData('Changes', 'driveChangesWatch', 'default', data);
|
|
396
|
+
done();
|
|
397
|
+
} catch (err) {
|
|
398
|
+
log.error(`Test Failure: ${err}`);
|
|
399
|
+
done(err);
|
|
400
|
+
}
|
|
401
|
+
});
|
|
402
|
+
} catch (error) {
|
|
403
|
+
log.error(`Adapter Exception: ${error}`);
|
|
404
|
+
done(error);
|
|
405
|
+
}
|
|
502
406
|
}).timeout(attemptTimeout);
|
|
503
407
|
});
|
|
504
408
|
|
|
505
409
|
describe('#driveChangesList - errors', () => {
|
|
506
410
|
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
runCommonAsserts(data, error);
|
|
516
|
-
}
|
|
517
|
-
saveMockData('Changes', 'driveChangesList', 'default', data);
|
|
518
|
-
done();
|
|
519
|
-
} catch (err) {
|
|
520
|
-
log.error(`Test Failure: ${err}`);
|
|
521
|
-
done(err);
|
|
411
|
+
try {
|
|
412
|
+
a.driveChangesList(null, null, null, null, null, null, null, changesPageToken, null, null, null, null, null, null, null, null, null, null, null, null, (data, error) => {
|
|
413
|
+
try {
|
|
414
|
+
if (stub) {
|
|
415
|
+
const displayE = 'Error 400 received on request';
|
|
416
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-google_drive-connectorRest-handleEndResponse', displayE);
|
|
417
|
+
} else {
|
|
418
|
+
runCommonAsserts(data, error);
|
|
522
419
|
}
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
420
|
+
saveMockData('Changes', 'driveChangesList', 'default', data);
|
|
421
|
+
done();
|
|
422
|
+
} catch (err) {
|
|
423
|
+
log.error(`Test Failure: ${err}`);
|
|
424
|
+
done(err);
|
|
425
|
+
}
|
|
426
|
+
});
|
|
427
|
+
} catch (error) {
|
|
428
|
+
log.error(`Adapter Exception: ${error}`);
|
|
429
|
+
done(error);
|
|
430
|
+
}
|
|
533
431
|
}).timeout(attemptTimeout);
|
|
534
432
|
});
|
|
535
433
|
|
|
536
434
|
describe('#driveChangesGetStartPageToken - errors', () => {
|
|
537
435
|
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
runCommonAsserts(data, error);
|
|
547
|
-
}
|
|
548
|
-
saveMockData('Changes', 'driveChangesGetStartPageToken', 'default', data);
|
|
549
|
-
done();
|
|
550
|
-
} catch (err) {
|
|
551
|
-
log.error(`Test Failure: ${err}`);
|
|
552
|
-
done(err);
|
|
436
|
+
try {
|
|
437
|
+
a.driveChangesGetStartPageToken(null, null, null, null, null, null, null, null, null, null, null, (data, error) => {
|
|
438
|
+
try {
|
|
439
|
+
if (stub) {
|
|
440
|
+
const displayE = 'Error 400 received on request';
|
|
441
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-google_drive-connectorRest-handleEndResponse', displayE);
|
|
442
|
+
} else {
|
|
443
|
+
runCommonAsserts(data, error);
|
|
553
444
|
}
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
445
|
+
saveMockData('Changes', 'driveChangesGetStartPageToken', 'default', data);
|
|
446
|
+
done();
|
|
447
|
+
} catch (err) {
|
|
448
|
+
log.error(`Test Failure: ${err}`);
|
|
449
|
+
done(err);
|
|
450
|
+
}
|
|
451
|
+
});
|
|
452
|
+
} catch (error) {
|
|
453
|
+
log.error(`Adapter Exception: ${error}`);
|
|
454
|
+
done(error);
|
|
455
|
+
}
|
|
564
456
|
}).timeout(attemptTimeout);
|
|
565
457
|
});
|
|
566
458
|
|
|
@@ -578,32 +470,26 @@ describe('[integration] Google_drive Adapter Test', () => {
|
|
|
578
470
|
};
|
|
579
471
|
describe('#driveChannelsStop - errors', () => {
|
|
580
472
|
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
runCommonAsserts(data, error);
|
|
590
|
-
}
|
|
591
|
-
saveMockData('Channels', 'driveChannelsStop', 'default', data);
|
|
592
|
-
done();
|
|
593
|
-
} catch (err) {
|
|
594
|
-
log.error(`Test Failure: ${err}`);
|
|
595
|
-
done(err);
|
|
473
|
+
try {
|
|
474
|
+
a.driveChannelsStop(null, null, null, null, null, null, null, channelsDriveChannelsStopBodyParam, (data, error) => {
|
|
475
|
+
try {
|
|
476
|
+
if (stub) {
|
|
477
|
+
const displayE = 'Error 400 received on request';
|
|
478
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-google_drive-connectorRest-handleEndResponse', displayE);
|
|
479
|
+
} else {
|
|
480
|
+
runCommonAsserts(data, error);
|
|
596
481
|
}
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
482
|
+
saveMockData('Channels', 'driveChannelsStop', 'default', data);
|
|
483
|
+
done();
|
|
484
|
+
} catch (err) {
|
|
485
|
+
log.error(`Test Failure: ${err}`);
|
|
486
|
+
done(err);
|
|
487
|
+
}
|
|
488
|
+
});
|
|
489
|
+
} catch (error) {
|
|
490
|
+
log.error(`Adapter Exception: ${error}`);
|
|
491
|
+
done(error);
|
|
492
|
+
}
|
|
607
493
|
}).timeout(attemptTimeout);
|
|
608
494
|
});
|
|
609
495
|
|
|
@@ -653,126 +539,102 @@ describe('[integration] Google_drive Adapter Test', () => {
|
|
|
653
539
|
};
|
|
654
540
|
describe('#driveDrivesCreate - errors', () => {
|
|
655
541
|
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
runCommonAsserts(data, error);
|
|
665
|
-
}
|
|
666
|
-
saveMockData('Drives', 'driveDrivesCreate', 'default', data);
|
|
667
|
-
done();
|
|
668
|
-
} catch (err) {
|
|
669
|
-
log.error(`Test Failure: ${err}`);
|
|
670
|
-
done(err);
|
|
542
|
+
try {
|
|
543
|
+
a.driveDrivesCreate(null, null, null, null, null, null, null, drivesRequestId, drivesDriveDrivesCreateBodyParam, (data, error) => {
|
|
544
|
+
try {
|
|
545
|
+
if (stub) {
|
|
546
|
+
const displayE = 'Error 400 received on request';
|
|
547
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-google_drive-connectorRest-handleEndResponse', displayE);
|
|
548
|
+
} else {
|
|
549
|
+
runCommonAsserts(data, error);
|
|
671
550
|
}
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
551
|
+
saveMockData('Drives', 'driveDrivesCreate', 'default', data);
|
|
552
|
+
done();
|
|
553
|
+
} catch (err) {
|
|
554
|
+
log.error(`Test Failure: ${err}`);
|
|
555
|
+
done(err);
|
|
556
|
+
}
|
|
557
|
+
});
|
|
558
|
+
} catch (error) {
|
|
559
|
+
log.error(`Adapter Exception: ${error}`);
|
|
560
|
+
done(error);
|
|
561
|
+
}
|
|
682
562
|
}).timeout(attemptTimeout);
|
|
683
563
|
});
|
|
684
564
|
|
|
685
565
|
const drivesDriveId = 'fakedata';
|
|
686
566
|
describe('#driveDrivesHide - errors', () => {
|
|
687
567
|
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
runCommonAsserts(data, error);
|
|
697
|
-
}
|
|
698
|
-
saveMockData('Drives', 'driveDrivesHide', 'default', data);
|
|
699
|
-
done();
|
|
700
|
-
} catch (err) {
|
|
701
|
-
log.error(`Test Failure: ${err}`);
|
|
702
|
-
done(err);
|
|
568
|
+
try {
|
|
569
|
+
a.driveDrivesHide(null, null, null, null, null, null, null, drivesDriveId, (data, error) => {
|
|
570
|
+
try {
|
|
571
|
+
if (stub) {
|
|
572
|
+
const displayE = 'Error 400 received on request';
|
|
573
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-google_drive-connectorRest-handleEndResponse', displayE);
|
|
574
|
+
} else {
|
|
575
|
+
runCommonAsserts(data, error);
|
|
703
576
|
}
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
577
|
+
saveMockData('Drives', 'driveDrivesHide', 'default', data);
|
|
578
|
+
done();
|
|
579
|
+
} catch (err) {
|
|
580
|
+
log.error(`Test Failure: ${err}`);
|
|
581
|
+
done(err);
|
|
582
|
+
}
|
|
583
|
+
});
|
|
584
|
+
} catch (error) {
|
|
585
|
+
log.error(`Adapter Exception: ${error}`);
|
|
586
|
+
done(error);
|
|
587
|
+
}
|
|
714
588
|
}).timeout(attemptTimeout);
|
|
715
589
|
});
|
|
716
590
|
|
|
717
591
|
describe('#driveDrivesUnhide - errors', () => {
|
|
718
592
|
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
runCommonAsserts(data, error);
|
|
728
|
-
}
|
|
729
|
-
saveMockData('Drives', 'driveDrivesUnhide', 'default', data);
|
|
730
|
-
done();
|
|
731
|
-
} catch (err) {
|
|
732
|
-
log.error(`Test Failure: ${err}`);
|
|
733
|
-
done(err);
|
|
593
|
+
try {
|
|
594
|
+
a.driveDrivesUnhide(null, null, null, null, null, null, null, drivesDriveId, (data, error) => {
|
|
595
|
+
try {
|
|
596
|
+
if (stub) {
|
|
597
|
+
const displayE = 'Error 400 received on request';
|
|
598
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-google_drive-connectorRest-handleEndResponse', displayE);
|
|
599
|
+
} else {
|
|
600
|
+
runCommonAsserts(data, error);
|
|
734
601
|
}
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
602
|
+
saveMockData('Drives', 'driveDrivesUnhide', 'default', data);
|
|
603
|
+
done();
|
|
604
|
+
} catch (err) {
|
|
605
|
+
log.error(`Test Failure: ${err}`);
|
|
606
|
+
done(err);
|
|
607
|
+
}
|
|
608
|
+
});
|
|
609
|
+
} catch (error) {
|
|
610
|
+
log.error(`Adapter Exception: ${error}`);
|
|
611
|
+
done(error);
|
|
612
|
+
}
|
|
745
613
|
}).timeout(attemptTimeout);
|
|
746
614
|
});
|
|
747
615
|
|
|
748
616
|
describe('#driveDrivesList - errors', () => {
|
|
749
617
|
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
runCommonAsserts(data, error);
|
|
759
|
-
}
|
|
760
|
-
saveMockData('Drives', 'driveDrivesList', 'default', data);
|
|
761
|
-
done();
|
|
762
|
-
} catch (err) {
|
|
763
|
-
log.error(`Test Failure: ${err}`);
|
|
764
|
-
done(err);
|
|
618
|
+
try {
|
|
619
|
+
a.driveDrivesList(null, null, null, null, null, null, null, null, null, null, null, (data, error) => {
|
|
620
|
+
try {
|
|
621
|
+
if (stub) {
|
|
622
|
+
const displayE = 'Error 400 received on request';
|
|
623
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-google_drive-connectorRest-handleEndResponse', displayE);
|
|
624
|
+
} else {
|
|
625
|
+
runCommonAsserts(data, error);
|
|
765
626
|
}
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
627
|
+
saveMockData('Drives', 'driveDrivesList', 'default', data);
|
|
628
|
+
done();
|
|
629
|
+
} catch (err) {
|
|
630
|
+
log.error(`Test Failure: ${err}`);
|
|
631
|
+
done(err);
|
|
632
|
+
}
|
|
633
|
+
});
|
|
634
|
+
} catch (error) {
|
|
635
|
+
log.error(`Adapter Exception: ${error}`);
|
|
636
|
+
done(error);
|
|
637
|
+
}
|
|
776
638
|
}).timeout(attemptTimeout);
|
|
777
639
|
});
|
|
778
640
|
|
|
@@ -821,63 +683,51 @@ describe('[integration] Google_drive Adapter Test', () => {
|
|
|
821
683
|
};
|
|
822
684
|
describe('#driveDrivesUpdate - errors', () => {
|
|
823
685
|
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
runCommonAsserts(data, error);
|
|
833
|
-
}
|
|
834
|
-
saveMockData('Drives', 'driveDrivesUpdate', 'default', data);
|
|
835
|
-
done();
|
|
836
|
-
} catch (err) {
|
|
837
|
-
log.error(`Test Failure: ${err}`);
|
|
838
|
-
done(err);
|
|
686
|
+
try {
|
|
687
|
+
a.driveDrivesUpdate(null, null, null, null, null, null, null, drivesDriveId, null, drivesDriveDrivesUpdateBodyParam, (data, error) => {
|
|
688
|
+
try {
|
|
689
|
+
if (stub) {
|
|
690
|
+
const displayE = 'Error 400 received on request';
|
|
691
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-google_drive-connectorRest-handleEndResponse', displayE);
|
|
692
|
+
} else {
|
|
693
|
+
runCommonAsserts(data, error);
|
|
839
694
|
}
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
695
|
+
saveMockData('Drives', 'driveDrivesUpdate', 'default', data);
|
|
696
|
+
done();
|
|
697
|
+
} catch (err) {
|
|
698
|
+
log.error(`Test Failure: ${err}`);
|
|
699
|
+
done(err);
|
|
700
|
+
}
|
|
701
|
+
});
|
|
702
|
+
} catch (error) {
|
|
703
|
+
log.error(`Adapter Exception: ${error}`);
|
|
704
|
+
done(error);
|
|
705
|
+
}
|
|
850
706
|
}).timeout(attemptTimeout);
|
|
851
707
|
});
|
|
852
708
|
|
|
853
709
|
describe('#driveDrivesGet - errors', () => {
|
|
854
710
|
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
runCommonAsserts(data, error);
|
|
864
|
-
}
|
|
865
|
-
saveMockData('Drives', 'driveDrivesGet', 'default', data);
|
|
866
|
-
done();
|
|
867
|
-
} catch (err) {
|
|
868
|
-
log.error(`Test Failure: ${err}`);
|
|
869
|
-
done(err);
|
|
711
|
+
try {
|
|
712
|
+
a.driveDrivesGet(null, null, null, null, null, null, null, drivesDriveId, null, (data, error) => {
|
|
713
|
+
try {
|
|
714
|
+
if (stub) {
|
|
715
|
+
const displayE = 'Error 400 received on request';
|
|
716
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-google_drive-connectorRest-handleEndResponse', displayE);
|
|
717
|
+
} else {
|
|
718
|
+
runCommonAsserts(data, error);
|
|
870
719
|
}
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
720
|
+
saveMockData('Drives', 'driveDrivesGet', 'default', data);
|
|
721
|
+
done();
|
|
722
|
+
} catch (err) {
|
|
723
|
+
log.error(`Test Failure: ${err}`);
|
|
724
|
+
done(err);
|
|
725
|
+
}
|
|
726
|
+
});
|
|
727
|
+
} catch (error) {
|
|
728
|
+
log.error(`Adapter Exception: ${error}`);
|
|
729
|
+
done(error);
|
|
730
|
+
}
|
|
881
731
|
}).timeout(attemptTimeout);
|
|
882
732
|
});
|
|
883
733
|
|
|
@@ -1107,32 +957,26 @@ describe('[integration] Google_drive Adapter Test', () => {
|
|
|
1107
957
|
};
|
|
1108
958
|
describe('#driveFilesCreate - errors', () => {
|
|
1109
959
|
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
runCommonAsserts(data, error);
|
|
1119
|
-
}
|
|
1120
|
-
saveMockData('Files', 'driveFilesCreate', 'default', data);
|
|
1121
|
-
done();
|
|
1122
|
-
} catch (err) {
|
|
1123
|
-
log.error(`Test Failure: ${err}`);
|
|
1124
|
-
done(err);
|
|
960
|
+
try {
|
|
961
|
+
a.driveFilesCreate(null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, filesDriveFilesCreateBodyParam, (data, error) => {
|
|
962
|
+
try {
|
|
963
|
+
if (stub) {
|
|
964
|
+
const displayE = 'Error 400 received on request';
|
|
965
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-google_drive-connectorRest-handleEndResponse', displayE);
|
|
966
|
+
} else {
|
|
967
|
+
runCommonAsserts(data, error);
|
|
1125
968
|
}
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
969
|
+
saveMockData('Files', 'driveFilesCreate', 'default', data);
|
|
970
|
+
done();
|
|
971
|
+
} catch (err) {
|
|
972
|
+
log.error(`Test Failure: ${err}`);
|
|
973
|
+
done(err);
|
|
974
|
+
}
|
|
975
|
+
});
|
|
976
|
+
} catch (error) {
|
|
977
|
+
log.error(`Adapter Exception: ${error}`);
|
|
978
|
+
done(error);
|
|
979
|
+
}
|
|
1136
980
|
}).timeout(attemptTimeout);
|
|
1137
981
|
});
|
|
1138
982
|
|
|
@@ -1363,32 +1207,26 @@ describe('[integration] Google_drive Adapter Test', () => {
|
|
|
1363
1207
|
};
|
|
1364
1208
|
describe('#driveFilesCopy - errors', () => {
|
|
1365
1209
|
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
runCommonAsserts(data, error);
|
|
1375
|
-
}
|
|
1376
|
-
saveMockData('Files', 'driveFilesCopy', 'default', data);
|
|
1377
|
-
done();
|
|
1378
|
-
} catch (err) {
|
|
1379
|
-
log.error(`Test Failure: ${err}`);
|
|
1380
|
-
done(err);
|
|
1210
|
+
try {
|
|
1211
|
+
a.driveFilesCopy(null, null, null, null, null, null, null, filesFileId, null, null, null, null, null, null, null, filesDriveFilesCopyBodyParam, (data, error) => {
|
|
1212
|
+
try {
|
|
1213
|
+
if (stub) {
|
|
1214
|
+
const displayE = 'Error 400 received on request';
|
|
1215
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-google_drive-connectorRest-handleEndResponse', displayE);
|
|
1216
|
+
} else {
|
|
1217
|
+
runCommonAsserts(data, error);
|
|
1381
1218
|
}
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1219
|
+
saveMockData('Files', 'driveFilesCopy', 'default', data);
|
|
1220
|
+
done();
|
|
1221
|
+
} catch (err) {
|
|
1222
|
+
log.error(`Test Failure: ${err}`);
|
|
1223
|
+
done(err);
|
|
1224
|
+
}
|
|
1225
|
+
});
|
|
1226
|
+
} catch (error) {
|
|
1227
|
+
log.error(`Adapter Exception: ${error}`);
|
|
1228
|
+
done(error);
|
|
1229
|
+
}
|
|
1392
1230
|
}).timeout(attemptTimeout);
|
|
1393
1231
|
});
|
|
1394
1232
|
|
|
@@ -1406,94 +1244,76 @@ describe('[integration] Google_drive Adapter Test', () => {
|
|
|
1406
1244
|
};
|
|
1407
1245
|
describe('#driveFilesWatch - errors', () => {
|
|
1408
1246
|
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
runCommonAsserts(data, error);
|
|
1418
|
-
}
|
|
1419
|
-
saveMockData('Files', 'driveFilesWatch', 'default', data);
|
|
1420
|
-
done();
|
|
1421
|
-
} catch (err) {
|
|
1422
|
-
log.error(`Test Failure: ${err}`);
|
|
1423
|
-
done(err);
|
|
1247
|
+
try {
|
|
1248
|
+
a.driveFilesWatch(null, null, null, null, null, null, null, filesFileId, null, null, null, null, filesDriveFilesWatchBodyParam, (data, error) => {
|
|
1249
|
+
try {
|
|
1250
|
+
if (stub) {
|
|
1251
|
+
const displayE = 'Error 400 received on request';
|
|
1252
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-google_drive-connectorRest-handleEndResponse', displayE);
|
|
1253
|
+
} else {
|
|
1254
|
+
runCommonAsserts(data, error);
|
|
1424
1255
|
}
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1256
|
+
saveMockData('Files', 'driveFilesWatch', 'default', data);
|
|
1257
|
+
done();
|
|
1258
|
+
} catch (err) {
|
|
1259
|
+
log.error(`Test Failure: ${err}`);
|
|
1260
|
+
done(err);
|
|
1261
|
+
}
|
|
1262
|
+
});
|
|
1263
|
+
} catch (error) {
|
|
1264
|
+
log.error(`Adapter Exception: ${error}`);
|
|
1265
|
+
done(error);
|
|
1266
|
+
}
|
|
1435
1267
|
}).timeout(attemptTimeout);
|
|
1436
1268
|
});
|
|
1437
1269
|
|
|
1438
1270
|
describe('#driveFilesList - errors', () => {
|
|
1439
1271
|
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
}
|
|
1461
|
-
} else {
|
|
1462
|
-
log.error('driveFilesList task is false, skipping test');
|
|
1463
|
-
skipCount += 1;
|
|
1464
|
-
done();
|
|
1465
|
-
}// end if task
|
|
1272
|
+
try {
|
|
1273
|
+
a.driveFilesList(null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, (data, error) => {
|
|
1274
|
+
try {
|
|
1275
|
+
if (stub) {
|
|
1276
|
+
const displayE = 'Error 400 received on request';
|
|
1277
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-google_drive-connectorRest-handleEndResponse', displayE);
|
|
1278
|
+
} else {
|
|
1279
|
+
runCommonAsserts(data, error);
|
|
1280
|
+
}
|
|
1281
|
+
saveMockData('Files', 'driveFilesList', 'default', data);
|
|
1282
|
+
done();
|
|
1283
|
+
} catch (err) {
|
|
1284
|
+
log.error(`Test Failure: ${err}`);
|
|
1285
|
+
done(err);
|
|
1286
|
+
}
|
|
1287
|
+
});
|
|
1288
|
+
} catch (error) {
|
|
1289
|
+
log.error(`Adapter Exception: ${error}`);
|
|
1290
|
+
done(error);
|
|
1291
|
+
}
|
|
1466
1292
|
}).timeout(attemptTimeout);
|
|
1467
1293
|
});
|
|
1468
1294
|
|
|
1469
1295
|
describe('#driveFilesGenerateIds - errors', () => {
|
|
1470
1296
|
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
runCommonAsserts(data, error);
|
|
1480
|
-
}
|
|
1481
|
-
saveMockData('Files', 'driveFilesGenerateIds', 'default', data);
|
|
1482
|
-
done();
|
|
1483
|
-
} catch (err) {
|
|
1484
|
-
log.error(`Test Failure: ${err}`);
|
|
1485
|
-
done(err);
|
|
1297
|
+
try {
|
|
1298
|
+
a.driveFilesGenerateIds(null, null, null, null, null, null, null, null, null, null, (data, error) => {
|
|
1299
|
+
try {
|
|
1300
|
+
if (stub) {
|
|
1301
|
+
const displayE = 'Error 400 received on request';
|
|
1302
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-google_drive-connectorRest-handleEndResponse', displayE);
|
|
1303
|
+
} else {
|
|
1304
|
+
runCommonAsserts(data, error);
|
|
1486
1305
|
}
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1306
|
+
saveMockData('Files', 'driveFilesGenerateIds', 'default', data);
|
|
1307
|
+
done();
|
|
1308
|
+
} catch (err) {
|
|
1309
|
+
log.error(`Test Failure: ${err}`);
|
|
1310
|
+
done(err);
|
|
1311
|
+
}
|
|
1312
|
+
});
|
|
1313
|
+
} catch (error) {
|
|
1314
|
+
log.error(`Adapter Exception: ${error}`);
|
|
1315
|
+
done(error);
|
|
1316
|
+
}
|
|
1497
1317
|
}).timeout(attemptTimeout);
|
|
1498
1318
|
});
|
|
1499
1319
|
|
|
@@ -1723,95 +1543,77 @@ describe('[integration] Google_drive Adapter Test', () => {
|
|
|
1723
1543
|
};
|
|
1724
1544
|
describe('#driveFilesUpdate - errors', () => {
|
|
1725
1545
|
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
runCommonAsserts(data, error);
|
|
1735
|
-
}
|
|
1736
|
-
saveMockData('Files', 'driveFilesUpdate', 'default', data);
|
|
1737
|
-
done();
|
|
1738
|
-
} catch (err) {
|
|
1739
|
-
log.error(`Test Failure: ${err}`);
|
|
1740
|
-
done(err);
|
|
1546
|
+
try {
|
|
1547
|
+
a.driveFilesUpdate(null, null, null, null, null, null, null, filesFileId, null, null, null, null, null, null, null, null, null, filesDriveFilesUpdateBodyParam, (data, error) => {
|
|
1548
|
+
try {
|
|
1549
|
+
if (stub) {
|
|
1550
|
+
const displayE = 'Error 400 received on request';
|
|
1551
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-google_drive-connectorRest-handleEndResponse', displayE);
|
|
1552
|
+
} else {
|
|
1553
|
+
runCommonAsserts(data, error);
|
|
1741
1554
|
}
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1555
|
+
saveMockData('Files', 'driveFilesUpdate', 'default', data);
|
|
1556
|
+
done();
|
|
1557
|
+
} catch (err) {
|
|
1558
|
+
log.error(`Test Failure: ${err}`);
|
|
1559
|
+
done(err);
|
|
1560
|
+
}
|
|
1561
|
+
});
|
|
1562
|
+
} catch (error) {
|
|
1563
|
+
log.error(`Adapter Exception: ${error}`);
|
|
1564
|
+
done(error);
|
|
1565
|
+
}
|
|
1752
1566
|
}).timeout(attemptTimeout);
|
|
1753
1567
|
});
|
|
1754
1568
|
|
|
1755
1569
|
describe('#driveFilesGet - errors', () => {
|
|
1756
1570
|
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
runCommonAsserts(data, error);
|
|
1766
|
-
}
|
|
1767
|
-
saveMockData('Files', 'driveFilesGet', 'default', data);
|
|
1768
|
-
done();
|
|
1769
|
-
} catch (err) {
|
|
1770
|
-
log.error(`Test Failure: ${err}`);
|
|
1771
|
-
done(err);
|
|
1571
|
+
try {
|
|
1572
|
+
a.driveFilesGet(null, null, null, null, null, null, null, filesFileId, null, null, null, null, (data, error) => {
|
|
1573
|
+
try {
|
|
1574
|
+
if (stub) {
|
|
1575
|
+
const displayE = 'Error 400 received on request';
|
|
1576
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-google_drive-connectorRest-handleEndResponse', displayE);
|
|
1577
|
+
} else {
|
|
1578
|
+
runCommonAsserts(data, error);
|
|
1772
1579
|
}
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1580
|
+
saveMockData('Files', 'driveFilesGet', 'default', data);
|
|
1581
|
+
done();
|
|
1582
|
+
} catch (err) {
|
|
1583
|
+
log.error(`Test Failure: ${err}`);
|
|
1584
|
+
done(err);
|
|
1585
|
+
}
|
|
1586
|
+
});
|
|
1587
|
+
} catch (error) {
|
|
1588
|
+
log.error(`Adapter Exception: ${error}`);
|
|
1589
|
+
done(error);
|
|
1590
|
+
}
|
|
1783
1591
|
}).timeout(attemptTimeout);
|
|
1784
1592
|
});
|
|
1785
1593
|
|
|
1786
1594
|
const filesMimeType = 'fakedata';
|
|
1787
1595
|
describe('#driveFilesExport - errors', () => {
|
|
1788
1596
|
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
runCommonAsserts(data, error);
|
|
1798
|
-
}
|
|
1799
|
-
saveMockData('Files', 'driveFilesExport', 'default', data);
|
|
1800
|
-
done();
|
|
1801
|
-
} catch (err) {
|
|
1802
|
-
log.error(`Test Failure: ${err}`);
|
|
1803
|
-
done(err);
|
|
1597
|
+
try {
|
|
1598
|
+
a.driveFilesExport(null, null, null, null, null, null, null, filesFileId, filesMimeType, (data, error) => {
|
|
1599
|
+
try {
|
|
1600
|
+
if (stub) {
|
|
1601
|
+
const displayE = 'Error 400 received on request';
|
|
1602
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-google_drive-connectorRest-handleEndResponse', displayE);
|
|
1603
|
+
} else {
|
|
1604
|
+
runCommonAsserts(data, error);
|
|
1804
1605
|
}
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1606
|
+
saveMockData('Files', 'driveFilesExport', 'default', data);
|
|
1607
|
+
done();
|
|
1608
|
+
} catch (err) {
|
|
1609
|
+
log.error(`Test Failure: ${err}`);
|
|
1610
|
+
done(err);
|
|
1611
|
+
}
|
|
1612
|
+
});
|
|
1613
|
+
} catch (error) {
|
|
1614
|
+
log.error(`Adapter Exception: ${error}`);
|
|
1615
|
+
done(error);
|
|
1616
|
+
}
|
|
1815
1617
|
}).timeout(attemptTimeout);
|
|
1816
1618
|
});
|
|
1817
1619
|
|
|
@@ -1861,63 +1663,51 @@ describe('[integration] Google_drive Adapter Test', () => {
|
|
|
1861
1663
|
};
|
|
1862
1664
|
describe('#driveCommentsCreate - errors', () => {
|
|
1863
1665
|
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
runCommonAsserts(data, error);
|
|
1873
|
-
}
|
|
1874
|
-
saveMockData('Comments', 'driveCommentsCreate', 'default', data);
|
|
1875
|
-
done();
|
|
1876
|
-
} catch (err) {
|
|
1877
|
-
log.error(`Test Failure: ${err}`);
|
|
1878
|
-
done(err);
|
|
1666
|
+
try {
|
|
1667
|
+
a.driveCommentsCreate(null, null, null, null, null, null, null, commentsFileId, commentsDriveCommentsCreateBodyParam, (data, error) => {
|
|
1668
|
+
try {
|
|
1669
|
+
if (stub) {
|
|
1670
|
+
const displayE = 'Error 400 received on request';
|
|
1671
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-google_drive-connectorRest-handleEndResponse', displayE);
|
|
1672
|
+
} else {
|
|
1673
|
+
runCommonAsserts(data, error);
|
|
1879
1674
|
}
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1675
|
+
saveMockData('Comments', 'driveCommentsCreate', 'default', data);
|
|
1676
|
+
done();
|
|
1677
|
+
} catch (err) {
|
|
1678
|
+
log.error(`Test Failure: ${err}`);
|
|
1679
|
+
done(err);
|
|
1680
|
+
}
|
|
1681
|
+
});
|
|
1682
|
+
} catch (error) {
|
|
1683
|
+
log.error(`Adapter Exception: ${error}`);
|
|
1684
|
+
done(error);
|
|
1685
|
+
}
|
|
1890
1686
|
}).timeout(attemptTimeout);
|
|
1891
1687
|
});
|
|
1892
1688
|
|
|
1893
1689
|
describe('#driveCommentsList - errors', () => {
|
|
1894
1690
|
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
runCommonAsserts(data, error);
|
|
1904
|
-
}
|
|
1905
|
-
saveMockData('Comments', 'driveCommentsList', 'default', data);
|
|
1906
|
-
done();
|
|
1907
|
-
} catch (err) {
|
|
1908
|
-
log.error(`Test Failure: ${err}`);
|
|
1909
|
-
done(err);
|
|
1691
|
+
try {
|
|
1692
|
+
a.driveCommentsList(null, null, null, null, null, null, null, commentsFileId, null, null, null, null, (data, error) => {
|
|
1693
|
+
try {
|
|
1694
|
+
if (stub) {
|
|
1695
|
+
const displayE = 'Error 400 received on request';
|
|
1696
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-google_drive-connectorRest-handleEndResponse', displayE);
|
|
1697
|
+
} else {
|
|
1698
|
+
runCommonAsserts(data, error);
|
|
1910
1699
|
}
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1700
|
+
saveMockData('Comments', 'driveCommentsList', 'default', data);
|
|
1701
|
+
done();
|
|
1702
|
+
} catch (err) {
|
|
1703
|
+
log.error(`Test Failure: ${err}`);
|
|
1704
|
+
done(err);
|
|
1705
|
+
}
|
|
1706
|
+
});
|
|
1707
|
+
} catch (error) {
|
|
1708
|
+
log.error(`Adapter Exception: ${error}`);
|
|
1709
|
+
done(error);
|
|
1710
|
+
}
|
|
1921
1711
|
}).timeout(attemptTimeout);
|
|
1922
1712
|
});
|
|
1923
1713
|
|
|
@@ -1967,63 +1757,51 @@ describe('[integration] Google_drive Adapter Test', () => {
|
|
|
1967
1757
|
};
|
|
1968
1758
|
describe('#driveCommentsUpdate - errors', () => {
|
|
1969
1759
|
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
runCommonAsserts(data, error);
|
|
1979
|
-
}
|
|
1980
|
-
saveMockData('Comments', 'driveCommentsUpdate', 'default', data);
|
|
1981
|
-
done();
|
|
1982
|
-
} catch (err) {
|
|
1983
|
-
log.error(`Test Failure: ${err}`);
|
|
1984
|
-
done(err);
|
|
1760
|
+
try {
|
|
1761
|
+
a.driveCommentsUpdate(null, null, null, null, null, null, null, commentsFileId, commentsCommentId, commentsDriveCommentsUpdateBodyParam, (data, error) => {
|
|
1762
|
+
try {
|
|
1763
|
+
if (stub) {
|
|
1764
|
+
const displayE = 'Error 400 received on request';
|
|
1765
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-google_drive-connectorRest-handleEndResponse', displayE);
|
|
1766
|
+
} else {
|
|
1767
|
+
runCommonAsserts(data, error);
|
|
1985
1768
|
}
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1769
|
+
saveMockData('Comments', 'driveCommentsUpdate', 'default', data);
|
|
1770
|
+
done();
|
|
1771
|
+
} catch (err) {
|
|
1772
|
+
log.error(`Test Failure: ${err}`);
|
|
1773
|
+
done(err);
|
|
1774
|
+
}
|
|
1775
|
+
});
|
|
1776
|
+
} catch (error) {
|
|
1777
|
+
log.error(`Adapter Exception: ${error}`);
|
|
1778
|
+
done(error);
|
|
1779
|
+
}
|
|
1996
1780
|
}).timeout(attemptTimeout);
|
|
1997
1781
|
});
|
|
1998
1782
|
|
|
1999
1783
|
describe('#driveCommentsGet - errors', () => {
|
|
2000
1784
|
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
runCommonAsserts(data, error);
|
|
2010
|
-
}
|
|
2011
|
-
saveMockData('Comments', 'driveCommentsGet', 'default', data);
|
|
2012
|
-
done();
|
|
2013
|
-
} catch (err) {
|
|
2014
|
-
log.error(`Test Failure: ${err}`);
|
|
2015
|
-
done(err);
|
|
1785
|
+
try {
|
|
1786
|
+
a.driveCommentsGet(null, null, null, null, null, null, null, commentsFileId, commentsCommentId, null, (data, error) => {
|
|
1787
|
+
try {
|
|
1788
|
+
if (stub) {
|
|
1789
|
+
const displayE = 'Error 400 received on request';
|
|
1790
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-google_drive-connectorRest-handleEndResponse', displayE);
|
|
1791
|
+
} else {
|
|
1792
|
+
runCommonAsserts(data, error);
|
|
2016
1793
|
}
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
1794
|
+
saveMockData('Comments', 'driveCommentsGet', 'default', data);
|
|
1795
|
+
done();
|
|
1796
|
+
} catch (err) {
|
|
1797
|
+
log.error(`Test Failure: ${err}`);
|
|
1798
|
+
done(err);
|
|
1799
|
+
}
|
|
1800
|
+
});
|
|
1801
|
+
} catch (error) {
|
|
1802
|
+
log.error(`Adapter Exception: ${error}`);
|
|
1803
|
+
done(error);
|
|
1804
|
+
}
|
|
2027
1805
|
}).timeout(attemptTimeout);
|
|
2028
1806
|
});
|
|
2029
1807
|
|
|
@@ -2049,63 +1827,51 @@ describe('[integration] Google_drive Adapter Test', () => {
|
|
|
2049
1827
|
};
|
|
2050
1828
|
describe('#driveRepliesCreate - errors', () => {
|
|
2051
1829
|
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
runCommonAsserts(data, error);
|
|
2061
|
-
}
|
|
2062
|
-
saveMockData('Replies', 'driveRepliesCreate', 'default', data);
|
|
2063
|
-
done();
|
|
2064
|
-
} catch (err) {
|
|
2065
|
-
log.error(`Test Failure: ${err}`);
|
|
2066
|
-
done(err);
|
|
1830
|
+
try {
|
|
1831
|
+
a.driveRepliesCreate(null, null, null, null, null, null, null, repliesFileId, repliesCommentId, repliesDriveRepliesCreateBodyParam, (data, error) => {
|
|
1832
|
+
try {
|
|
1833
|
+
if (stub) {
|
|
1834
|
+
const displayE = 'Error 400 received on request';
|
|
1835
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-google_drive-connectorRest-handleEndResponse', displayE);
|
|
1836
|
+
} else {
|
|
1837
|
+
runCommonAsserts(data, error);
|
|
2067
1838
|
}
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
1839
|
+
saveMockData('Replies', 'driveRepliesCreate', 'default', data);
|
|
1840
|
+
done();
|
|
1841
|
+
} catch (err) {
|
|
1842
|
+
log.error(`Test Failure: ${err}`);
|
|
1843
|
+
done(err);
|
|
1844
|
+
}
|
|
1845
|
+
});
|
|
1846
|
+
} catch (error) {
|
|
1847
|
+
log.error(`Adapter Exception: ${error}`);
|
|
1848
|
+
done(error);
|
|
1849
|
+
}
|
|
2078
1850
|
}).timeout(attemptTimeout);
|
|
2079
1851
|
});
|
|
2080
1852
|
|
|
2081
1853
|
describe('#driveRepliesList - errors', () => {
|
|
2082
1854
|
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
runCommonAsserts(data, error);
|
|
2092
|
-
}
|
|
2093
|
-
saveMockData('Replies', 'driveRepliesList', 'default', data);
|
|
2094
|
-
done();
|
|
2095
|
-
} catch (err) {
|
|
2096
|
-
log.error(`Test Failure: ${err}`);
|
|
2097
|
-
done(err);
|
|
1855
|
+
try {
|
|
1856
|
+
a.driveRepliesList(null, null, null, null, null, null, null, repliesFileId, repliesCommentId, null, null, null, (data, error) => {
|
|
1857
|
+
try {
|
|
1858
|
+
if (stub) {
|
|
1859
|
+
const displayE = 'Error 400 received on request';
|
|
1860
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-google_drive-connectorRest-handleEndResponse', displayE);
|
|
1861
|
+
} else {
|
|
1862
|
+
runCommonAsserts(data, error);
|
|
2098
1863
|
}
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
1864
|
+
saveMockData('Replies', 'driveRepliesList', 'default', data);
|
|
1865
|
+
done();
|
|
1866
|
+
} catch (err) {
|
|
1867
|
+
log.error(`Test Failure: ${err}`);
|
|
1868
|
+
done(err);
|
|
1869
|
+
}
|
|
1870
|
+
});
|
|
1871
|
+
} catch (error) {
|
|
1872
|
+
log.error(`Adapter Exception: ${error}`);
|
|
1873
|
+
done(error);
|
|
1874
|
+
}
|
|
2109
1875
|
}).timeout(attemptTimeout);
|
|
2110
1876
|
});
|
|
2111
1877
|
|
|
@@ -2130,63 +1896,51 @@ describe('[integration] Google_drive Adapter Test', () => {
|
|
|
2130
1896
|
};
|
|
2131
1897
|
describe('#driveRepliesUpdate - errors', () => {
|
|
2132
1898
|
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
runCommonAsserts(data, error);
|
|
2142
|
-
}
|
|
2143
|
-
saveMockData('Replies', 'driveRepliesUpdate', 'default', data);
|
|
2144
|
-
done();
|
|
2145
|
-
} catch (err) {
|
|
2146
|
-
log.error(`Test Failure: ${err}`);
|
|
2147
|
-
done(err);
|
|
1899
|
+
try {
|
|
1900
|
+
a.driveRepliesUpdate(null, null, null, null, null, null, null, repliesFileId, repliesCommentId, repliesReplyId, repliesDriveRepliesUpdateBodyParam, (data, error) => {
|
|
1901
|
+
try {
|
|
1902
|
+
if (stub) {
|
|
1903
|
+
const displayE = 'Error 400 received on request';
|
|
1904
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-google_drive-connectorRest-handleEndResponse', displayE);
|
|
1905
|
+
} else {
|
|
1906
|
+
runCommonAsserts(data, error);
|
|
2148
1907
|
}
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
1908
|
+
saveMockData('Replies', 'driveRepliesUpdate', 'default', data);
|
|
1909
|
+
done();
|
|
1910
|
+
} catch (err) {
|
|
1911
|
+
log.error(`Test Failure: ${err}`);
|
|
1912
|
+
done(err);
|
|
1913
|
+
}
|
|
1914
|
+
});
|
|
1915
|
+
} catch (error) {
|
|
1916
|
+
log.error(`Adapter Exception: ${error}`);
|
|
1917
|
+
done(error);
|
|
1918
|
+
}
|
|
2159
1919
|
}).timeout(attemptTimeout);
|
|
2160
1920
|
});
|
|
2161
1921
|
|
|
2162
1922
|
describe('#driveRepliesGet - errors', () => {
|
|
2163
1923
|
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
runCommonAsserts(data, error);
|
|
2173
|
-
}
|
|
2174
|
-
saveMockData('Replies', 'driveRepliesGet', 'default', data);
|
|
2175
|
-
done();
|
|
2176
|
-
} catch (err) {
|
|
2177
|
-
log.error(`Test Failure: ${err}`);
|
|
2178
|
-
done(err);
|
|
1924
|
+
try {
|
|
1925
|
+
a.driveRepliesGet(null, null, null, null, null, null, null, repliesFileId, repliesCommentId, repliesReplyId, null, (data, error) => {
|
|
1926
|
+
try {
|
|
1927
|
+
if (stub) {
|
|
1928
|
+
const displayE = 'Error 400 received on request';
|
|
1929
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-google_drive-connectorRest-handleEndResponse', displayE);
|
|
1930
|
+
} else {
|
|
1931
|
+
runCommonAsserts(data, error);
|
|
2179
1932
|
}
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
1933
|
+
saveMockData('Replies', 'driveRepliesGet', 'default', data);
|
|
1934
|
+
done();
|
|
1935
|
+
} catch (err) {
|
|
1936
|
+
log.error(`Test Failure: ${err}`);
|
|
1937
|
+
done(err);
|
|
1938
|
+
}
|
|
1939
|
+
});
|
|
1940
|
+
} catch (error) {
|
|
1941
|
+
log.error(`Adapter Exception: ${error}`);
|
|
1942
|
+
done(error);
|
|
1943
|
+
}
|
|
2190
1944
|
}).timeout(attemptTimeout);
|
|
2191
1945
|
});
|
|
2192
1946
|
|
|
@@ -2224,63 +1978,51 @@ describe('[integration] Google_drive Adapter Test', () => {
|
|
|
2224
1978
|
};
|
|
2225
1979
|
describe('#drivePermissionsCreate - errors', () => {
|
|
2226
1980
|
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
runCommonAsserts(data, error);
|
|
2236
|
-
}
|
|
2237
|
-
saveMockData('Permissions', 'drivePermissionsCreate', 'default', data);
|
|
2238
|
-
done();
|
|
2239
|
-
} catch (err) {
|
|
2240
|
-
log.error(`Test Failure: ${err}`);
|
|
2241
|
-
done(err);
|
|
1981
|
+
try {
|
|
1982
|
+
a.drivePermissionsCreate(null, null, null, null, null, null, null, permissionsFileId, null, null, null, null, null, null, null, null, permissionsDrivePermissionsCreateBodyParam, (data, error) => {
|
|
1983
|
+
try {
|
|
1984
|
+
if (stub) {
|
|
1985
|
+
const displayE = 'Error 400 received on request';
|
|
1986
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-google_drive-connectorRest-handleEndResponse', displayE);
|
|
1987
|
+
} else {
|
|
1988
|
+
runCommonAsserts(data, error);
|
|
2242
1989
|
}
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
1990
|
+
saveMockData('Permissions', 'drivePermissionsCreate', 'default', data);
|
|
1991
|
+
done();
|
|
1992
|
+
} catch (err) {
|
|
1993
|
+
log.error(`Test Failure: ${err}`);
|
|
1994
|
+
done(err);
|
|
1995
|
+
}
|
|
1996
|
+
});
|
|
1997
|
+
} catch (error) {
|
|
1998
|
+
log.error(`Adapter Exception: ${error}`);
|
|
1999
|
+
done(error);
|
|
2000
|
+
}
|
|
2253
2001
|
}).timeout(attemptTimeout);
|
|
2254
2002
|
});
|
|
2255
2003
|
|
|
2256
2004
|
describe('#drivePermissionsList - errors', () => {
|
|
2257
2005
|
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
runCommonAsserts(data, error);
|
|
2267
|
-
}
|
|
2268
|
-
saveMockData('Permissions', 'drivePermissionsList', 'default', data);
|
|
2269
|
-
done();
|
|
2270
|
-
} catch (err) {
|
|
2271
|
-
log.error(`Test Failure: ${err}`);
|
|
2272
|
-
done(err);
|
|
2006
|
+
try {
|
|
2007
|
+
a.drivePermissionsList(null, null, null, null, null, null, null, permissionsFileId, null, null, null, null, null, null, (data, error) => {
|
|
2008
|
+
try {
|
|
2009
|
+
if (stub) {
|
|
2010
|
+
const displayE = 'Error 400 received on request';
|
|
2011
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-google_drive-connectorRest-handleEndResponse', displayE);
|
|
2012
|
+
} else {
|
|
2013
|
+
runCommonAsserts(data, error);
|
|
2273
2014
|
}
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2015
|
+
saveMockData('Permissions', 'drivePermissionsList', 'default', data);
|
|
2016
|
+
done();
|
|
2017
|
+
} catch (err) {
|
|
2018
|
+
log.error(`Test Failure: ${err}`);
|
|
2019
|
+
done(err);
|
|
2020
|
+
}
|
|
2021
|
+
});
|
|
2022
|
+
} catch (error) {
|
|
2023
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2024
|
+
done(error);
|
|
2025
|
+
}
|
|
2284
2026
|
}).timeout(attemptTimeout);
|
|
2285
2027
|
});
|
|
2286
2028
|
|
|
@@ -2318,95 +2060,77 @@ describe('[integration] Google_drive Adapter Test', () => {
|
|
|
2318
2060
|
};
|
|
2319
2061
|
describe('#drivePermissionsUpdate - errors', () => {
|
|
2320
2062
|
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
runCommonAsserts(data, error);
|
|
2330
|
-
}
|
|
2331
|
-
saveMockData('Permissions', 'drivePermissionsUpdate', 'default', data);
|
|
2332
|
-
done();
|
|
2333
|
-
} catch (err) {
|
|
2334
|
-
log.error(`Test Failure: ${err}`);
|
|
2335
|
-
done(err);
|
|
2063
|
+
try {
|
|
2064
|
+
a.drivePermissionsUpdate(null, null, null, null, null, null, null, permissionsFileId, permissionsPermissionId, null, null, null, null, null, permissionsDrivePermissionsUpdateBodyParam, (data, error) => {
|
|
2065
|
+
try {
|
|
2066
|
+
if (stub) {
|
|
2067
|
+
const displayE = 'Error 400 received on request';
|
|
2068
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-google_drive-connectorRest-handleEndResponse', displayE);
|
|
2069
|
+
} else {
|
|
2070
|
+
runCommonAsserts(data, error);
|
|
2336
2071
|
}
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
|
|
2072
|
+
saveMockData('Permissions', 'drivePermissionsUpdate', 'default', data);
|
|
2073
|
+
done();
|
|
2074
|
+
} catch (err) {
|
|
2075
|
+
log.error(`Test Failure: ${err}`);
|
|
2076
|
+
done(err);
|
|
2077
|
+
}
|
|
2078
|
+
});
|
|
2079
|
+
} catch (error) {
|
|
2080
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2081
|
+
done(error);
|
|
2082
|
+
}
|
|
2347
2083
|
}).timeout(attemptTimeout);
|
|
2348
2084
|
});
|
|
2349
2085
|
|
|
2350
2086
|
describe('#drivePermissionsGet - errors', () => {
|
|
2351
2087
|
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
runCommonAsserts(data, error);
|
|
2361
|
-
}
|
|
2362
|
-
saveMockData('Permissions', 'drivePermissionsGet', 'default', data);
|
|
2363
|
-
done();
|
|
2364
|
-
} catch (err) {
|
|
2365
|
-
log.error(`Test Failure: ${err}`);
|
|
2366
|
-
done(err);
|
|
2088
|
+
try {
|
|
2089
|
+
a.drivePermissionsGet(null, null, null, null, null, null, null, permissionsFileId, permissionsPermissionId, null, null, null, (data, error) => {
|
|
2090
|
+
try {
|
|
2091
|
+
if (stub) {
|
|
2092
|
+
const displayE = 'Error 400 received on request';
|
|
2093
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-google_drive-connectorRest-handleEndResponse', displayE);
|
|
2094
|
+
} else {
|
|
2095
|
+
runCommonAsserts(data, error);
|
|
2367
2096
|
}
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2097
|
+
saveMockData('Permissions', 'drivePermissionsGet', 'default', data);
|
|
2098
|
+
done();
|
|
2099
|
+
} catch (err) {
|
|
2100
|
+
log.error(`Test Failure: ${err}`);
|
|
2101
|
+
done(err);
|
|
2102
|
+
}
|
|
2103
|
+
});
|
|
2104
|
+
} catch (error) {
|
|
2105
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2106
|
+
done(error);
|
|
2107
|
+
}
|
|
2378
2108
|
}).timeout(attemptTimeout);
|
|
2379
2109
|
});
|
|
2380
2110
|
|
|
2381
2111
|
const revisionsFileId = 'fakedata';
|
|
2382
2112
|
describe('#driveRevisionsList - errors', () => {
|
|
2383
2113
|
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
2384
|
-
|
|
2385
|
-
|
|
2386
|
-
|
|
2387
|
-
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
runCommonAsserts(data, error);
|
|
2393
|
-
}
|
|
2394
|
-
saveMockData('Revisions', 'driveRevisionsList', 'default', data);
|
|
2395
|
-
done();
|
|
2396
|
-
} catch (err) {
|
|
2397
|
-
log.error(`Test Failure: ${err}`);
|
|
2398
|
-
done(err);
|
|
2114
|
+
try {
|
|
2115
|
+
a.driveRevisionsList(null, null, null, null, null, null, null, revisionsFileId, null, null, (data, error) => {
|
|
2116
|
+
try {
|
|
2117
|
+
if (stub) {
|
|
2118
|
+
const displayE = 'Error 400 received on request';
|
|
2119
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-google_drive-connectorRest-handleEndResponse', displayE);
|
|
2120
|
+
} else {
|
|
2121
|
+
runCommonAsserts(data, error);
|
|
2399
2122
|
}
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2123
|
+
saveMockData('Revisions', 'driveRevisionsList', 'default', data);
|
|
2124
|
+
done();
|
|
2125
|
+
} catch (err) {
|
|
2126
|
+
log.error(`Test Failure: ${err}`);
|
|
2127
|
+
done(err);
|
|
2128
|
+
}
|
|
2129
|
+
});
|
|
2130
|
+
} catch (error) {
|
|
2131
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2132
|
+
done(error);
|
|
2133
|
+
}
|
|
2410
2134
|
}).timeout(attemptTimeout);
|
|
2411
2135
|
});
|
|
2412
2136
|
|
|
@@ -2436,63 +2160,51 @@ describe('[integration] Google_drive Adapter Test', () => {
|
|
|
2436
2160
|
};
|
|
2437
2161
|
describe('#driveRevisionsUpdate - errors', () => {
|
|
2438
2162
|
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
|
|
2445
|
-
|
|
2446
|
-
|
|
2447
|
-
runCommonAsserts(data, error);
|
|
2448
|
-
}
|
|
2449
|
-
saveMockData('Revisions', 'driveRevisionsUpdate', 'default', data);
|
|
2450
|
-
done();
|
|
2451
|
-
} catch (err) {
|
|
2452
|
-
log.error(`Test Failure: ${err}`);
|
|
2453
|
-
done(err);
|
|
2163
|
+
try {
|
|
2164
|
+
a.driveRevisionsUpdate(null, null, null, null, null, null, null, revisionsFileId, revisionsRevisionId, revisionsDriveRevisionsUpdateBodyParam, (data, error) => {
|
|
2165
|
+
try {
|
|
2166
|
+
if (stub) {
|
|
2167
|
+
const displayE = 'Error 400 received on request';
|
|
2168
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-google_drive-connectorRest-handleEndResponse', displayE);
|
|
2169
|
+
} else {
|
|
2170
|
+
runCommonAsserts(data, error);
|
|
2454
2171
|
}
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
|
|
2464
|
-
|
|
2172
|
+
saveMockData('Revisions', 'driveRevisionsUpdate', 'default', data);
|
|
2173
|
+
done();
|
|
2174
|
+
} catch (err) {
|
|
2175
|
+
log.error(`Test Failure: ${err}`);
|
|
2176
|
+
done(err);
|
|
2177
|
+
}
|
|
2178
|
+
});
|
|
2179
|
+
} catch (error) {
|
|
2180
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2181
|
+
done(error);
|
|
2182
|
+
}
|
|
2465
2183
|
}).timeout(attemptTimeout);
|
|
2466
2184
|
});
|
|
2467
2185
|
|
|
2468
2186
|
describe('#driveRevisionsGet - errors', () => {
|
|
2469
2187
|
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
runCommonAsserts(data, error);
|
|
2479
|
-
}
|
|
2480
|
-
saveMockData('Revisions', 'driveRevisionsGet', 'default', data);
|
|
2481
|
-
done();
|
|
2482
|
-
} catch (err) {
|
|
2483
|
-
log.error(`Test Failure: ${err}`);
|
|
2484
|
-
done(err);
|
|
2188
|
+
try {
|
|
2189
|
+
a.driveRevisionsGet(null, null, null, null, null, null, null, revisionsFileId, revisionsRevisionId, null, (data, error) => {
|
|
2190
|
+
try {
|
|
2191
|
+
if (stub) {
|
|
2192
|
+
const displayE = 'Error 400 received on request';
|
|
2193
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-google_drive-connectorRest-handleEndResponse', displayE);
|
|
2194
|
+
} else {
|
|
2195
|
+
runCommonAsserts(data, error);
|
|
2485
2196
|
}
|
|
2486
|
-
|
|
2487
|
-
|
|
2488
|
-
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
|
|
2495
|
-
|
|
2197
|
+
saveMockData('Revisions', 'driveRevisionsGet', 'default', data);
|
|
2198
|
+
done();
|
|
2199
|
+
} catch (err) {
|
|
2200
|
+
log.error(`Test Failure: ${err}`);
|
|
2201
|
+
done(err);
|
|
2202
|
+
}
|
|
2203
|
+
});
|
|
2204
|
+
} catch (error) {
|
|
2205
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2206
|
+
done(error);
|
|
2207
|
+
}
|
|
2496
2208
|
}).timeout(attemptTimeout);
|
|
2497
2209
|
});
|
|
2498
2210
|
|
|
@@ -2542,63 +2254,51 @@ describe('[integration] Google_drive Adapter Test', () => {
|
|
|
2542
2254
|
};
|
|
2543
2255
|
describe('#driveTeamdrivesCreate - errors', () => {
|
|
2544
2256
|
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
2545
|
-
|
|
2546
|
-
|
|
2547
|
-
|
|
2548
|
-
|
|
2549
|
-
|
|
2550
|
-
|
|
2551
|
-
|
|
2552
|
-
|
|
2553
|
-
runCommonAsserts(data, error);
|
|
2554
|
-
}
|
|
2555
|
-
saveMockData('Teamdrives', 'driveTeamdrivesCreate', 'default', data);
|
|
2556
|
-
done();
|
|
2557
|
-
} catch (err) {
|
|
2558
|
-
log.error(`Test Failure: ${err}`);
|
|
2559
|
-
done(err);
|
|
2257
|
+
try {
|
|
2258
|
+
a.driveTeamdrivesCreate(null, null, null, null, null, null, null, teamdrivesRequestId, teamdrivesDriveTeamdrivesCreateBodyParam, (data, error) => {
|
|
2259
|
+
try {
|
|
2260
|
+
if (stub) {
|
|
2261
|
+
const displayE = 'Error 400 received on request';
|
|
2262
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-google_drive-connectorRest-handleEndResponse', displayE);
|
|
2263
|
+
} else {
|
|
2264
|
+
runCommonAsserts(data, error);
|
|
2560
2265
|
}
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
|
|
2569
|
-
|
|
2570
|
-
|
|
2266
|
+
saveMockData('Teamdrives', 'driveTeamdrivesCreate', 'default', data);
|
|
2267
|
+
done();
|
|
2268
|
+
} catch (err) {
|
|
2269
|
+
log.error(`Test Failure: ${err}`);
|
|
2270
|
+
done(err);
|
|
2271
|
+
}
|
|
2272
|
+
});
|
|
2273
|
+
} catch (error) {
|
|
2274
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2275
|
+
done(error);
|
|
2276
|
+
}
|
|
2571
2277
|
}).timeout(attemptTimeout);
|
|
2572
2278
|
});
|
|
2573
2279
|
|
|
2574
2280
|
describe('#driveTeamdrivesList - errors', () => {
|
|
2575
2281
|
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
2576
|
-
|
|
2577
|
-
|
|
2578
|
-
|
|
2579
|
-
|
|
2580
|
-
|
|
2581
|
-
|
|
2582
|
-
|
|
2583
|
-
|
|
2584
|
-
runCommonAsserts(data, error);
|
|
2585
|
-
}
|
|
2586
|
-
saveMockData('Teamdrives', 'driveTeamdrivesList', 'default', data);
|
|
2587
|
-
done();
|
|
2588
|
-
} catch (err) {
|
|
2589
|
-
log.error(`Test Failure: ${err}`);
|
|
2590
|
-
done(err);
|
|
2282
|
+
try {
|
|
2283
|
+
a.driveTeamdrivesList(null, null, null, null, null, null, null, null, null, null, null, (data, error) => {
|
|
2284
|
+
try {
|
|
2285
|
+
if (stub) {
|
|
2286
|
+
const displayE = 'Error 400 received on request';
|
|
2287
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-google_drive-connectorRest-handleEndResponse', displayE);
|
|
2288
|
+
} else {
|
|
2289
|
+
runCommonAsserts(data, error);
|
|
2591
2290
|
}
|
|
2592
|
-
|
|
2593
|
-
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
|
|
2291
|
+
saveMockData('Teamdrives', 'driveTeamdrivesList', 'default', data);
|
|
2292
|
+
done();
|
|
2293
|
+
} catch (err) {
|
|
2294
|
+
log.error(`Test Failure: ${err}`);
|
|
2295
|
+
done(err);
|
|
2296
|
+
}
|
|
2297
|
+
});
|
|
2298
|
+
} catch (error) {
|
|
2299
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2300
|
+
done(error);
|
|
2301
|
+
}
|
|
2602
2302
|
}).timeout(attemptTimeout);
|
|
2603
2303
|
});
|
|
2604
2304
|
|
|
@@ -2648,319 +2348,252 @@ describe('[integration] Google_drive Adapter Test', () => {
|
|
|
2648
2348
|
};
|
|
2649
2349
|
describe('#driveTeamdrivesUpdate - errors', () => {
|
|
2650
2350
|
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
2651
|
-
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
|
|
2656
|
-
|
|
2657
|
-
|
|
2658
|
-
|
|
2659
|
-
runCommonAsserts(data, error);
|
|
2660
|
-
}
|
|
2661
|
-
saveMockData('Teamdrives', 'driveTeamdrivesUpdate', 'default', data);
|
|
2662
|
-
done();
|
|
2663
|
-
} catch (err) {
|
|
2664
|
-
log.error(`Test Failure: ${err}`);
|
|
2665
|
-
done(err);
|
|
2351
|
+
try {
|
|
2352
|
+
a.driveTeamdrivesUpdate(null, null, null, null, null, null, null, teamdrivesTeamDriveId, null, teamdrivesDriveTeamdrivesUpdateBodyParam, (data, error) => {
|
|
2353
|
+
try {
|
|
2354
|
+
if (stub) {
|
|
2355
|
+
const displayE = 'Error 400 received on request';
|
|
2356
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-google_drive-connectorRest-handleEndResponse', displayE);
|
|
2357
|
+
} else {
|
|
2358
|
+
runCommonAsserts(data, error);
|
|
2666
2359
|
}
|
|
2667
|
-
|
|
2668
|
-
|
|
2669
|
-
|
|
2670
|
-
|
|
2671
|
-
|
|
2672
|
-
|
|
2673
|
-
|
|
2674
|
-
|
|
2675
|
-
|
|
2676
|
-
|
|
2360
|
+
saveMockData('Teamdrives', 'driveTeamdrivesUpdate', 'default', data);
|
|
2361
|
+
done();
|
|
2362
|
+
} catch (err) {
|
|
2363
|
+
log.error(`Test Failure: ${err}`);
|
|
2364
|
+
done(err);
|
|
2365
|
+
}
|
|
2366
|
+
});
|
|
2367
|
+
} catch (error) {
|
|
2368
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2369
|
+
done(error);
|
|
2370
|
+
}
|
|
2677
2371
|
}).timeout(attemptTimeout);
|
|
2678
2372
|
});
|
|
2679
2373
|
|
|
2680
2374
|
describe('#driveTeamdrivesGet - errors', () => {
|
|
2681
2375
|
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
2682
|
-
|
|
2683
|
-
|
|
2684
|
-
|
|
2685
|
-
|
|
2686
|
-
|
|
2687
|
-
|
|
2688
|
-
|
|
2689
|
-
|
|
2690
|
-
runCommonAsserts(data, error);
|
|
2691
|
-
}
|
|
2692
|
-
saveMockData('Teamdrives', 'driveTeamdrivesGet', 'default', data);
|
|
2693
|
-
done();
|
|
2694
|
-
} catch (err) {
|
|
2695
|
-
log.error(`Test Failure: ${err}`);
|
|
2696
|
-
done(err);
|
|
2376
|
+
try {
|
|
2377
|
+
a.driveTeamdrivesGet(null, null, null, null, null, null, null, teamdrivesTeamDriveId, null, (data, error) => {
|
|
2378
|
+
try {
|
|
2379
|
+
if (stub) {
|
|
2380
|
+
const displayE = 'Error 400 received on request';
|
|
2381
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-google_drive-connectorRest-handleEndResponse', displayE);
|
|
2382
|
+
} else {
|
|
2383
|
+
runCommonAsserts(data, error);
|
|
2697
2384
|
}
|
|
2698
|
-
|
|
2699
|
-
|
|
2700
|
-
|
|
2701
|
-
|
|
2702
|
-
|
|
2703
|
-
|
|
2704
|
-
|
|
2705
|
-
|
|
2706
|
-
|
|
2707
|
-
|
|
2385
|
+
saveMockData('Teamdrives', 'driveTeamdrivesGet', 'default', data);
|
|
2386
|
+
done();
|
|
2387
|
+
} catch (err) {
|
|
2388
|
+
log.error(`Test Failure: ${err}`);
|
|
2389
|
+
done(err);
|
|
2390
|
+
}
|
|
2391
|
+
});
|
|
2392
|
+
} catch (error) {
|
|
2393
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2394
|
+
done(error);
|
|
2395
|
+
}
|
|
2708
2396
|
}).timeout(attemptTimeout);
|
|
2709
2397
|
});
|
|
2710
2398
|
|
|
2711
2399
|
describe('#driveDrivesDelete - errors', () => {
|
|
2712
2400
|
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
2713
|
-
|
|
2714
|
-
|
|
2715
|
-
|
|
2716
|
-
|
|
2717
|
-
|
|
2718
|
-
|
|
2719
|
-
|
|
2720
|
-
|
|
2721
|
-
runCommonAsserts(data, error);
|
|
2722
|
-
}
|
|
2723
|
-
saveMockData('Drives', 'driveDrivesDelete', 'default', data);
|
|
2724
|
-
done();
|
|
2725
|
-
} catch (err) {
|
|
2726
|
-
log.error(`Test Failure: ${err}`);
|
|
2727
|
-
done(err);
|
|
2401
|
+
try {
|
|
2402
|
+
a.driveDrivesDelete(null, null, null, null, null, null, null, drivesDriveId, (data, error) => {
|
|
2403
|
+
try {
|
|
2404
|
+
if (stub) {
|
|
2405
|
+
const displayE = 'Error 400 received on request';
|
|
2406
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-google_drive-connectorRest-handleEndResponse', displayE);
|
|
2407
|
+
} else {
|
|
2408
|
+
runCommonAsserts(data, error);
|
|
2728
2409
|
}
|
|
2729
|
-
|
|
2730
|
-
|
|
2731
|
-
|
|
2732
|
-
|
|
2733
|
-
|
|
2734
|
-
|
|
2735
|
-
|
|
2736
|
-
|
|
2737
|
-
|
|
2738
|
-
|
|
2410
|
+
saveMockData('Drives', 'driveDrivesDelete', 'default', data);
|
|
2411
|
+
done();
|
|
2412
|
+
} catch (err) {
|
|
2413
|
+
log.error(`Test Failure: ${err}`);
|
|
2414
|
+
done(err);
|
|
2415
|
+
}
|
|
2416
|
+
});
|
|
2417
|
+
} catch (error) {
|
|
2418
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2419
|
+
done(error);
|
|
2420
|
+
}
|
|
2739
2421
|
}).timeout(attemptTimeout);
|
|
2740
2422
|
});
|
|
2741
2423
|
|
|
2742
2424
|
describe('#driveFilesEmptyTrash - errors', () => {
|
|
2743
2425
|
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
2744
|
-
|
|
2745
|
-
|
|
2746
|
-
|
|
2747
|
-
|
|
2748
|
-
|
|
2749
|
-
|
|
2750
|
-
|
|
2751
|
-
|
|
2752
|
-
runCommonAsserts(data, error);
|
|
2753
|
-
}
|
|
2754
|
-
saveMockData('Files', 'driveFilesEmptyTrash', 'default', data);
|
|
2755
|
-
done();
|
|
2756
|
-
} catch (err) {
|
|
2757
|
-
log.error(`Test Failure: ${err}`);
|
|
2758
|
-
done(err);
|
|
2426
|
+
try {
|
|
2427
|
+
a.driveFilesEmptyTrash(null, null, null, null, null, null, null, null, (data, error) => {
|
|
2428
|
+
try {
|
|
2429
|
+
if (stub) {
|
|
2430
|
+
const displayE = 'Error 400 received on request';
|
|
2431
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-google_drive-connectorRest-handleEndResponse', displayE);
|
|
2432
|
+
} else {
|
|
2433
|
+
runCommonAsserts(data, error);
|
|
2759
2434
|
}
|
|
2760
|
-
|
|
2761
|
-
|
|
2762
|
-
|
|
2763
|
-
|
|
2764
|
-
|
|
2765
|
-
|
|
2766
|
-
|
|
2767
|
-
|
|
2768
|
-
|
|
2769
|
-
|
|
2435
|
+
saveMockData('Files', 'driveFilesEmptyTrash', 'default', data);
|
|
2436
|
+
done();
|
|
2437
|
+
} catch (err) {
|
|
2438
|
+
log.error(`Test Failure: ${err}`);
|
|
2439
|
+
done(err);
|
|
2440
|
+
}
|
|
2441
|
+
});
|
|
2442
|
+
} catch (error) {
|
|
2443
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2444
|
+
done(error);
|
|
2445
|
+
}
|
|
2770
2446
|
}).timeout(attemptTimeout);
|
|
2771
2447
|
});
|
|
2772
2448
|
|
|
2773
2449
|
describe('#driveFilesDelete - errors', () => {
|
|
2774
2450
|
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
2775
|
-
|
|
2776
|
-
|
|
2777
|
-
|
|
2778
|
-
|
|
2779
|
-
|
|
2780
|
-
|
|
2781
|
-
|
|
2782
|
-
|
|
2783
|
-
runCommonAsserts(data, error);
|
|
2784
|
-
}
|
|
2785
|
-
saveMockData('Files', 'driveFilesDelete', 'default', data);
|
|
2786
|
-
done();
|
|
2787
|
-
} catch (err) {
|
|
2788
|
-
log.error(`Test Failure: ${err}`);
|
|
2789
|
-
done(err);
|
|
2451
|
+
try {
|
|
2452
|
+
a.driveFilesDelete(null, null, null, null, null, null, null, filesFileId, null, null, null, (data, error) => {
|
|
2453
|
+
try {
|
|
2454
|
+
if (stub) {
|
|
2455
|
+
const displayE = 'Error 400 received on request';
|
|
2456
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-google_drive-connectorRest-handleEndResponse', displayE);
|
|
2457
|
+
} else {
|
|
2458
|
+
runCommonAsserts(data, error);
|
|
2790
2459
|
}
|
|
2791
|
-
|
|
2792
|
-
|
|
2793
|
-
|
|
2794
|
-
|
|
2795
|
-
|
|
2796
|
-
|
|
2797
|
-
|
|
2798
|
-
|
|
2799
|
-
|
|
2800
|
-
|
|
2460
|
+
saveMockData('Files', 'driveFilesDelete', 'default', data);
|
|
2461
|
+
done();
|
|
2462
|
+
} catch (err) {
|
|
2463
|
+
log.error(`Test Failure: ${err}`);
|
|
2464
|
+
done(err);
|
|
2465
|
+
}
|
|
2466
|
+
});
|
|
2467
|
+
} catch (error) {
|
|
2468
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2469
|
+
done(error);
|
|
2470
|
+
}
|
|
2801
2471
|
}).timeout(attemptTimeout);
|
|
2802
2472
|
});
|
|
2803
2473
|
|
|
2804
2474
|
describe('#driveCommentsDelete - errors', () => {
|
|
2805
2475
|
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
2806
|
-
|
|
2807
|
-
|
|
2808
|
-
|
|
2809
|
-
|
|
2810
|
-
|
|
2811
|
-
|
|
2812
|
-
|
|
2813
|
-
|
|
2814
|
-
runCommonAsserts(data, error);
|
|
2815
|
-
}
|
|
2816
|
-
saveMockData('Comments', 'driveCommentsDelete', 'default', data);
|
|
2817
|
-
done();
|
|
2818
|
-
} catch (err) {
|
|
2819
|
-
log.error(`Test Failure: ${err}`);
|
|
2820
|
-
done(err);
|
|
2476
|
+
try {
|
|
2477
|
+
a.driveCommentsDelete(null, null, null, null, null, null, null, commentsFileId, commentsCommentId, (data, error) => {
|
|
2478
|
+
try {
|
|
2479
|
+
if (stub) {
|
|
2480
|
+
const displayE = 'Error 400 received on request';
|
|
2481
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-google_drive-connectorRest-handleEndResponse', displayE);
|
|
2482
|
+
} else {
|
|
2483
|
+
runCommonAsserts(data, error);
|
|
2821
2484
|
}
|
|
2822
|
-
|
|
2823
|
-
|
|
2824
|
-
|
|
2825
|
-
|
|
2826
|
-
|
|
2827
|
-
|
|
2828
|
-
|
|
2829
|
-
|
|
2830
|
-
|
|
2831
|
-
|
|
2485
|
+
saveMockData('Comments', 'driveCommentsDelete', 'default', data);
|
|
2486
|
+
done();
|
|
2487
|
+
} catch (err) {
|
|
2488
|
+
log.error(`Test Failure: ${err}`);
|
|
2489
|
+
done(err);
|
|
2490
|
+
}
|
|
2491
|
+
});
|
|
2492
|
+
} catch (error) {
|
|
2493
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2494
|
+
done(error);
|
|
2495
|
+
}
|
|
2832
2496
|
}).timeout(attemptTimeout);
|
|
2833
2497
|
});
|
|
2834
2498
|
|
|
2835
2499
|
describe('#driveRepliesDelete - errors', () => {
|
|
2836
2500
|
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
2837
|
-
|
|
2838
|
-
|
|
2839
|
-
|
|
2840
|
-
|
|
2841
|
-
|
|
2842
|
-
|
|
2843
|
-
|
|
2844
|
-
|
|
2845
|
-
runCommonAsserts(data, error);
|
|
2846
|
-
}
|
|
2847
|
-
saveMockData('Replies', 'driveRepliesDelete', 'default', data);
|
|
2848
|
-
done();
|
|
2849
|
-
} catch (err) {
|
|
2850
|
-
log.error(`Test Failure: ${err}`);
|
|
2851
|
-
done(err);
|
|
2501
|
+
try {
|
|
2502
|
+
a.driveRepliesDelete(null, null, null, null, null, null, null, repliesFileId, repliesCommentId, repliesReplyId, (data, error) => {
|
|
2503
|
+
try {
|
|
2504
|
+
if (stub) {
|
|
2505
|
+
const displayE = 'Error 400 received on request';
|
|
2506
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-google_drive-connectorRest-handleEndResponse', displayE);
|
|
2507
|
+
} else {
|
|
2508
|
+
runCommonAsserts(data, error);
|
|
2852
2509
|
}
|
|
2853
|
-
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
|
|
2857
|
-
|
|
2858
|
-
|
|
2859
|
-
|
|
2860
|
-
|
|
2861
|
-
|
|
2862
|
-
|
|
2510
|
+
saveMockData('Replies', 'driveRepliesDelete', 'default', data);
|
|
2511
|
+
done();
|
|
2512
|
+
} catch (err) {
|
|
2513
|
+
log.error(`Test Failure: ${err}`);
|
|
2514
|
+
done(err);
|
|
2515
|
+
}
|
|
2516
|
+
});
|
|
2517
|
+
} catch (error) {
|
|
2518
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2519
|
+
done(error);
|
|
2520
|
+
}
|
|
2863
2521
|
}).timeout(attemptTimeout);
|
|
2864
2522
|
});
|
|
2865
2523
|
|
|
2866
2524
|
describe('#drivePermissionsDelete - errors', () => {
|
|
2867
2525
|
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
2868
|
-
|
|
2869
|
-
|
|
2870
|
-
|
|
2871
|
-
|
|
2872
|
-
|
|
2873
|
-
|
|
2874
|
-
|
|
2875
|
-
|
|
2876
|
-
runCommonAsserts(data, error);
|
|
2877
|
-
}
|
|
2878
|
-
saveMockData('Permissions', 'drivePermissionsDelete', 'default', data);
|
|
2879
|
-
done();
|
|
2880
|
-
} catch (err) {
|
|
2881
|
-
log.error(`Test Failure: ${err}`);
|
|
2882
|
-
done(err);
|
|
2526
|
+
try {
|
|
2527
|
+
a.drivePermissionsDelete(null, null, null, null, null, null, null, permissionsFileId, permissionsPermissionId, null, null, null, (data, error) => {
|
|
2528
|
+
try {
|
|
2529
|
+
if (stub) {
|
|
2530
|
+
const displayE = 'Error 400 received on request';
|
|
2531
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-google_drive-connectorRest-handleEndResponse', displayE);
|
|
2532
|
+
} else {
|
|
2533
|
+
runCommonAsserts(data, error);
|
|
2883
2534
|
}
|
|
2884
|
-
|
|
2885
|
-
|
|
2886
|
-
|
|
2887
|
-
|
|
2888
|
-
|
|
2889
|
-
|
|
2890
|
-
|
|
2891
|
-
|
|
2892
|
-
|
|
2893
|
-
|
|
2535
|
+
saveMockData('Permissions', 'drivePermissionsDelete', 'default', data);
|
|
2536
|
+
done();
|
|
2537
|
+
} catch (err) {
|
|
2538
|
+
log.error(`Test Failure: ${err}`);
|
|
2539
|
+
done(err);
|
|
2540
|
+
}
|
|
2541
|
+
});
|
|
2542
|
+
} catch (error) {
|
|
2543
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2544
|
+
done(error);
|
|
2545
|
+
}
|
|
2894
2546
|
}).timeout(attemptTimeout);
|
|
2895
2547
|
});
|
|
2896
2548
|
|
|
2897
2549
|
describe('#driveRevisionsDelete - errors', () => {
|
|
2898
2550
|
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
2899
|
-
|
|
2900
|
-
|
|
2901
|
-
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
|
|
2905
|
-
|
|
2906
|
-
|
|
2907
|
-
runCommonAsserts(data, error);
|
|
2908
|
-
}
|
|
2909
|
-
saveMockData('Revisions', 'driveRevisionsDelete', 'default', data);
|
|
2910
|
-
done();
|
|
2911
|
-
} catch (err) {
|
|
2912
|
-
log.error(`Test Failure: ${err}`);
|
|
2913
|
-
done(err);
|
|
2551
|
+
try {
|
|
2552
|
+
a.driveRevisionsDelete(null, null, null, null, null, null, null, revisionsFileId, revisionsRevisionId, (data, error) => {
|
|
2553
|
+
try {
|
|
2554
|
+
if (stub) {
|
|
2555
|
+
const displayE = 'Error 400 received on request';
|
|
2556
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-google_drive-connectorRest-handleEndResponse', displayE);
|
|
2557
|
+
} else {
|
|
2558
|
+
runCommonAsserts(data, error);
|
|
2914
2559
|
}
|
|
2915
|
-
|
|
2916
|
-
|
|
2917
|
-
|
|
2918
|
-
|
|
2919
|
-
|
|
2920
|
-
|
|
2921
|
-
|
|
2922
|
-
|
|
2923
|
-
|
|
2924
|
-
|
|
2560
|
+
saveMockData('Revisions', 'driveRevisionsDelete', 'default', data);
|
|
2561
|
+
done();
|
|
2562
|
+
} catch (err) {
|
|
2563
|
+
log.error(`Test Failure: ${err}`);
|
|
2564
|
+
done(err);
|
|
2565
|
+
}
|
|
2566
|
+
});
|
|
2567
|
+
} catch (error) {
|
|
2568
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2569
|
+
done(error);
|
|
2570
|
+
}
|
|
2925
2571
|
}).timeout(attemptTimeout);
|
|
2926
2572
|
});
|
|
2927
2573
|
|
|
2928
2574
|
describe('#driveTeamdrivesDelete - errors', () => {
|
|
2929
2575
|
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
2930
|
-
|
|
2931
|
-
|
|
2932
|
-
|
|
2933
|
-
|
|
2934
|
-
|
|
2935
|
-
|
|
2936
|
-
|
|
2937
|
-
|
|
2938
|
-
runCommonAsserts(data, error);
|
|
2939
|
-
}
|
|
2940
|
-
saveMockData('Teamdrives', 'driveTeamdrivesDelete', 'default', data);
|
|
2941
|
-
done();
|
|
2942
|
-
} catch (err) {
|
|
2943
|
-
log.error(`Test Failure: ${err}`);
|
|
2944
|
-
done(err);
|
|
2576
|
+
try {
|
|
2577
|
+
a.driveTeamdrivesDelete(null, null, null, null, null, null, null, teamdrivesTeamDriveId, (data, error) => {
|
|
2578
|
+
try {
|
|
2579
|
+
if (stub) {
|
|
2580
|
+
const displayE = 'Error 400 received on request';
|
|
2581
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-google_drive-connectorRest-handleEndResponse', displayE);
|
|
2582
|
+
} else {
|
|
2583
|
+
runCommonAsserts(data, error);
|
|
2945
2584
|
}
|
|
2946
|
-
|
|
2947
|
-
|
|
2948
|
-
|
|
2949
|
-
|
|
2950
|
-
|
|
2951
|
-
|
|
2952
|
-
|
|
2953
|
-
|
|
2954
|
-
|
|
2955
|
-
|
|
2585
|
+
saveMockData('Teamdrives', 'driveTeamdrivesDelete', 'default', data);
|
|
2586
|
+
done();
|
|
2587
|
+
} catch (err) {
|
|
2588
|
+
log.error(`Test Failure: ${err}`);
|
|
2589
|
+
done(err);
|
|
2590
|
+
}
|
|
2591
|
+
});
|
|
2592
|
+
} catch (error) {
|
|
2593
|
+
log.error(`Adapter Exception: ${error}`);
|
|
2594
|
+
done(error);
|
|
2595
|
+
}
|
|
2956
2596
|
}).timeout(attemptTimeout);
|
|
2957
2597
|
});
|
|
2958
|
-
|
|
2959
|
-
describe('#Skipped test count', () => {
|
|
2960
|
-
it('count skipped tests', (done) => {
|
|
2961
|
-
console.log(`skipped ${skipCount} tests because \x1b[33mtask: false\x1b[0m`);
|
|
2962
|
-
done();
|
|
2963
|
-
});
|
|
2964
|
-
});
|
|
2965
2598
|
});
|
|
2966
2599
|
});
|