Skip to content

Commit be0dabd

Browse files
committed
Add generated protocol tests
This commit adds the protocol tests generated by the protocol-test-codegen project to the repository. It enables their building and running through the use of new package level commands, build:protocols and test:protocols.
1 parent c627e2f commit be0dabd

File tree

195 files changed

+47947
-3
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

195 files changed

+47947
-3
lines changed

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ jspm_packages
1919
*.tgz
2020
.yarn-integrity
2121

22+
.vscode/launch.json
23+
2224
lerna-debug.log
2325
package-lock.json
2426

@@ -30,3 +32,7 @@ codegen/sdk-codegen/smithy-build.json
3032
.gradle
3133
*/out/
3234
*/*/out/
35+
36+
protocol_tests/*/coverage
37+
protocol_tests/*/dist
38+
protocol_tests/*/types

buildspec.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ phases:
66
nodejs: 10
77
build:
88
commands:
9+
# Fake credentials for protocol tests to get past signing.
10+
- export AWS_ACCESS_KEY_ID=foo
11+
- export AWS_SECRET_ACCESS_KEY=bar
912
- echo Building...
1013
- yarn --frozen-lockfile
1114
- echo Executing unit tests
@@ -14,4 +17,5 @@ phases:
1417
- yarn test:functional
1518
post_build:
1619
commands:
20+
# Run the actual tests.
1721
- ./node_modules/.bin/codecov -f coverage/*.json -t 26989a8c-a2e9-4e6f-844a-35a741240b60

jest.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ const base = require("./jest.config.base.js");
22

33
module.exports = {
44
...base,
5-
projects: ["<rootDir>/packages/*/jest.config.js"],
5+
projects: ["<rootDir>/protocol_tests/*/jest.config.js", "<rootDir>/packages/*/jest.config.js"],
66
testPathIgnorePatterns: ["/node_modules/", "<rootDir>/clients/client-.*"],
77
coveragePathIgnorePatterns: [
88
"/node_modules/",

package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,14 @@
1111
"clear-build-cache": "rimraf ./packages/*/build/* ./clients/*/*/build/*",
1212
"clear-build-info": "rimraf ./packages/*/*.tsbuildinfo ./clients/*/*/*.tsbuildinfo",
1313
"build:crypto-dependencies": "lerna run --scope '@aws-sdk/types' --scope '@aws-sdk/util-utf8-browser' --scope '@aws-sdk/util-locate-window' --scope '@aws-sdk/hash-node' --include-dependencies pretest",
14+
"build:protocols": "yarn build:crypto-dependencies && lerna run --scope '@aws-sdk/protocol-tests-*' --include-dependencies pretest",
1415
"build:smithy-client": "yarn build:crypto-dependencies && lerna run --scope '@aws-sdk/client-rds-data' --include-dependencies pretest",
1516
"build:all": "yarn build:crypto-dependencies && lerna run pretest --include-dependencies --include-dependents",
1617
"pretest:all": "yarn build:all",
1718
"test:all": "jest --coverage --passWithNoTests && lerna run test --scope @aws-sdk/stream-collector-browser --scope @aws-sdk/hash-blob-browser",
1819
"test:functional": "jest --config tests/functional/jest.config.js --passWithNoTests",
19-
"test:integration": "cucumber-js"
20+
"test:integration": "cucumber-js",
21+
"test:protocols": "yarn build:protocols && lerna run test --scope '@aws-sdk/protocol-tests-*'"
2022
},
2123
"repository": {
2224
"type": "git",
@@ -53,7 +55,8 @@
5355
"workspaces": {
5456
"packages": [
5557
"packages/*",
56-
"clients/*"
58+
"clients/*",
59+
"protocol_tests/*"
5760
],
5861
"nohoist": [
5962
"**/karma*",

0 commit comments

Comments
 (0)