@itentialopensource/adapter-aws_cloudformation 0.1.4 → 0.2.2
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 +53 -0
- package/BROKER.md +199 -0
- package/CALLS.md +620 -0
- package/CHANGELOG.md +3 -26
- package/CODE_OF_CONDUCT.md +12 -17
- package/CONTRIBUTING.md +3 -148
- package/ENHANCE.md +69 -0
- package/PROPERTIES.md +641 -0
- package/README.md +239 -507
- package/SUMMARY.md +9 -0
- package/TROUBLESHOOT.md +47 -0
- package/adapter.js +4031 -1143
- package/adapterBase.js +843 -397
- package/changelogs/CHANGELOG.md +48 -0
- package/entities/.generic/action.json +110 -5
- package/entities/.generic/schema.json +6 -1
- package/entities/.system/action.json +1 -1
- package/entities/Account/action.json +42 -0
- package/entities/Account/mockdatafiles/describePublisher-default.xml +6 -0
- package/entities/Account/mockdatafiles/registerPublisher-default.xml +6 -0
- package/entities/Account/schema.json +3 -1
- package/entities/ChangeSet/action.json +21 -0
- package/entities/ChangeSet/mockdatafiles/describeChangeSetHooks-default.xml +6 -0
- package/entities/ChangeSet/schema.json +2 -1
- package/entities/Organization/action.json +67 -0
- package/entities/Organization/mockdatafiles/activateOrganizationsAccess-default.xml +6 -0
- package/entities/Organization/mockdatafiles/deactivateOrganizationsAccess-default.xml +6 -0
- package/entities/Organization/mockdatafiles/describeOrganizationsAccess-default.xml +8 -0
- package/entities/Organization/schema.json +21 -0
- package/entities/Resource/action.json +21 -0
- package/entities/Resource/mockdatafiles/recordHandlerProgress-default.xml +6 -0
- package/entities/Resource/schema.json +2 -1
- package/entities/Stack/action.json +42 -0
- package/entities/Stack/mockdatafiles/importStacksToStackSet-default.xml +6 -0
- package/entities/Stack/mockdatafiles/rollbackStack-default.xml +6 -0
- package/entities/Stack/schema.json +3 -1
- package/entities/Type/action.json +126 -0
- package/entities/Type/mockdatafiles/activateType-default.xml +6 -0
- package/entities/Type/mockdatafiles/batchDescribeTypeConfigurations-default.xml +6 -0
- package/entities/Type/mockdatafiles/deactivateType-default.xml +6 -0
- package/entities/Type/mockdatafiles/publishType-default.xml +6 -0
- package/entities/Type/mockdatafiles/setTypeConfiguration-default.xml +6 -0
- package/entities/Type/mockdatafiles/testType-default.xml +6 -0
- package/entities/Type/schema.json +7 -1
- package/error.json +12 -0
- package/metadata.json +44 -0
- package/package.json +28 -23
- package/pronghorn.json +8808 -1451
- package/propertiesDecorators.json +14 -0
- package/propertiesSchema.json +844 -8
- package/refs?service=git-upload-pack +0 -0
- package/report/adapter-openapi.json +25034 -0
- package/report/adapter-openapi.yaml +22498 -0
- package/report/adapterInfo.json +10 -0
- package/report/updateReport1691507502657.json +120 -0
- package/report/updateReport1692202523445.json +120 -0
- package/report/updateReport1694461395239.json +120 -0
- package/report/updateReport1698420779793.json +120 -0
- package/sampleProperties.json +158 -6
- package/storage/metrics.json +1141 -0
- package/test/integration/adapterTestBasicGet.js +4 -6
- package/test/integration/adapterTestConnectivity.js +91 -42
- package/test/integration/adapterTestIntegration.js +541 -108
- package/test/unit/adapterBaseTestUnit.js +393 -310
- package/test/unit/adapterTestUnit.js +1272 -222
- package/utils/adapterInfo.js +206 -0
- package/utils/addAuth.js +94 -0
- package/utils/artifactize.js +1 -1
- package/utils/basicGet.js +1 -14
- package/utils/checkMigrate.js +1 -1
- package/utils/entitiesToDB.js +179 -0
- package/utils/findPath.js +1 -1
- package/utils/methodDocumentor.js +273 -0
- package/utils/modify.js +14 -16
- package/utils/packModificationScript.js +2 -2
- package/utils/patches2bundledDeps.js +90 -0
- package/utils/pre-commit.sh +5 -0
- package/utils/removeHooks.js +20 -0
- package/utils/taskMover.js +309 -0
- package/utils/tbScript.js +129 -53
- package/utils/tbUtils.js +152 -35
- package/utils/testRunner.js +17 -17
- package/utils/troubleshootingAdapter.js +10 -31
- package/workflows/README.md +0 -3
|
@@ -7,23 +7,21 @@
|
|
|
7
7
|
/* eslint import/no-dynamic-require: warn */
|
|
8
8
|
/* eslint import/no-unresolved: warn */
|
|
9
9
|
|
|
10
|
-
const mocha = require('mocha');
|
|
11
10
|
const path = require('path');
|
|
12
11
|
const assert = require('assert');
|
|
12
|
+
const mocha = require('mocha');
|
|
13
13
|
const itParam = require('mocha-param');
|
|
14
14
|
|
|
15
15
|
const utils = require('../../utils/tbUtils');
|
|
16
16
|
const basicGet = require('../../utils/basicGet');
|
|
17
|
-
const { name } = require('../../package');
|
|
17
|
+
const { name } = require('../../package.json');
|
|
18
18
|
const { methods } = require('../../pronghorn.json');
|
|
19
19
|
|
|
20
20
|
const getPronghornProps = (iapDir) => {
|
|
21
|
-
const { Discovery } = require('@itential/itential-utils');
|
|
22
21
|
console.log('Retrieving properties.json file...');
|
|
23
22
|
const rawProps = require(path.join(iapDir, 'properties.json'));
|
|
24
23
|
console.log('Decrypting properties...');
|
|
25
|
-
const
|
|
26
|
-
const pronghornProps = utils.decryptProperties(rawProps, path.join(__dirname, '..'), discovery);
|
|
24
|
+
const pronghornProps = utils.decryptProperties(rawProps, iapDir);
|
|
27
25
|
console.log('Found properties.\n');
|
|
28
26
|
return pronghornProps;
|
|
29
27
|
};
|
|
@@ -34,7 +32,7 @@ describe('[integration] Adapter BasicGET Test', () => {
|
|
|
34
32
|
context('Testing GET calls without query parameters', () => {
|
|
35
33
|
before(async () => {
|
|
36
34
|
const iapDir = path.join(__dirname, '../../../../../');
|
|
37
|
-
if (!utils.
|
|
35
|
+
if (!utils.areWeUnderIAPinstallationDirectory()) {
|
|
38
36
|
const sampleProperties = require('../../sampleProperties.json');
|
|
39
37
|
const adapter = { properties: sampleProperties };
|
|
40
38
|
a = basicGet.getAdapterInstance(adapter);
|
|
@@ -3,9 +3,12 @@
|
|
|
3
3
|
/* global describe it context before after */
|
|
4
4
|
/* eslint no-unused-vars: warn */
|
|
5
5
|
|
|
6
|
-
const mocha = require('mocha');
|
|
7
6
|
const assert = require('assert');
|
|
8
|
-
const
|
|
7
|
+
const http = require('http');
|
|
8
|
+
const https = require('https');
|
|
9
|
+
const mocha = require('mocha');
|
|
10
|
+
const ping = require('ping');
|
|
11
|
+
const dnsLookup = require('dns-lookup-promise');
|
|
9
12
|
|
|
10
13
|
let host;
|
|
11
14
|
process.argv.forEach((val) => {
|
|
@@ -16,78 +19,124 @@ process.argv.forEach((val) => {
|
|
|
16
19
|
|
|
17
20
|
describe('[integration] Adapter Test', () => {
|
|
18
21
|
context(`Testing network connection on ${host}`, () => {
|
|
19
|
-
before(() => {
|
|
20
|
-
diagnostics.setTestURL(host);
|
|
21
|
-
});
|
|
22
|
-
|
|
23
22
|
after((done) => {
|
|
24
23
|
done();
|
|
25
24
|
});
|
|
26
25
|
|
|
27
26
|
it('DNS resolve', (done) => {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
27
|
+
dnsLookup(host)
|
|
28
|
+
.then((addresses) => {
|
|
29
|
+
try {
|
|
30
|
+
assert.ok(addresses.length > 0);
|
|
31
|
+
done();
|
|
32
|
+
} catch (error) {
|
|
33
|
+
done(error);
|
|
34
|
+
}
|
|
35
|
+
})
|
|
36
|
+
.catch((err) => {
|
|
37
|
+
done(err);
|
|
38
|
+
});
|
|
36
39
|
});
|
|
37
40
|
|
|
38
41
|
it('Responds to ping', (done) => {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
42
|
+
ping.promise.probe(host)
|
|
43
|
+
.then((result) => {
|
|
44
|
+
try {
|
|
45
|
+
assert.ok(result.alive);
|
|
46
|
+
done();
|
|
47
|
+
} catch (error) {
|
|
48
|
+
done(error);
|
|
49
|
+
}
|
|
50
|
+
})
|
|
51
|
+
.catch((err) => {
|
|
52
|
+
done(err);
|
|
53
|
+
});
|
|
47
54
|
});
|
|
48
55
|
|
|
49
56
|
it('Support HTTP on port 80', (done) => {
|
|
50
|
-
|
|
57
|
+
const requestOptions = {
|
|
58
|
+
host,
|
|
59
|
+
port: 80,
|
|
60
|
+
method: 'HEAD'
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
const req = http.request(requestOptions, (res) => {
|
|
51
64
|
try {
|
|
52
|
-
assert.
|
|
65
|
+
assert.ok(res.statusCode >= 200 && res.statusCode < 400);
|
|
53
66
|
done();
|
|
54
67
|
} catch (error) {
|
|
55
68
|
done(error);
|
|
56
69
|
}
|
|
57
70
|
});
|
|
71
|
+
|
|
72
|
+
req.on('error', (err) => {
|
|
73
|
+
done(err);
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
req.end();
|
|
58
77
|
});
|
|
59
78
|
|
|
60
79
|
it('Support HTTPS on port 443', (done) => {
|
|
61
|
-
|
|
80
|
+
const requestOptions = {
|
|
81
|
+
host,
|
|
82
|
+
port: 443,
|
|
83
|
+
method: 'HEAD'
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
const req = https.request(requestOptions, (res) => {
|
|
62
87
|
try {
|
|
63
|
-
assert.
|
|
88
|
+
assert.ok(res.statusCode >= 200 && res.statusCode < 400);
|
|
64
89
|
done();
|
|
65
90
|
} catch (error) {
|
|
66
91
|
done(error);
|
|
67
92
|
}
|
|
68
93
|
});
|
|
94
|
+
|
|
95
|
+
req.on('error', (err) => {
|
|
96
|
+
done(err);
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
req.end();
|
|
69
100
|
});
|
|
70
101
|
|
|
71
102
|
it('Support IPv4', (done) => {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
103
|
+
const options = {
|
|
104
|
+
family: 4,
|
|
105
|
+
hints: dnsLookup.ADDRCONFIG
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
dnsLookup.lookup(host, options)
|
|
109
|
+
.then((address, family) => {
|
|
110
|
+
try {
|
|
111
|
+
assert.ok(address !== null && family === 4);
|
|
112
|
+
done();
|
|
113
|
+
} catch (error) {
|
|
114
|
+
done(error);
|
|
115
|
+
}
|
|
116
|
+
})
|
|
117
|
+
.catch((err) => {
|
|
118
|
+
done(err);
|
|
119
|
+
});
|
|
80
120
|
});
|
|
81
121
|
|
|
82
122
|
it('Support IPv6', (done) => {
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
123
|
+
const options = {
|
|
124
|
+
family: 6,
|
|
125
|
+
hints: dnsLookup.ADDRCONFIG
|
|
126
|
+
};
|
|
127
|
+
|
|
128
|
+
dnsLookup.lookup(host, options)
|
|
129
|
+
.then((address, family) => {
|
|
130
|
+
try {
|
|
131
|
+
assert.ok(address !== null && family === 6);
|
|
132
|
+
done();
|
|
133
|
+
} catch (error) {
|
|
134
|
+
done(error);
|
|
135
|
+
}
|
|
136
|
+
})
|
|
137
|
+
.catch((err) => {
|
|
138
|
+
done(err);
|
|
139
|
+
});
|
|
91
140
|
});
|
|
92
141
|
});
|
|
93
142
|
});
|