Skip to content

Commit

Permalink
another try to fix http transformer test
Browse files Browse the repository at this point in the history
  • Loading branch information
sundersc committed Mar 14, 2024
1 parent 0cc9d4f commit 98f40ab
Show file tree
Hide file tree
Showing 5 changed files with 92 additions and 103 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
"private": true,
"version": "1.0.0",
"devDependencies": {
"aws-cdk": "~2.80.0",
"aws-cdk": "~2.129.0",
"@types/node": "*",
"typescript": "*"
},
"dependencies": {
"aws-cdk-lib": "2.80.0",
"aws-cdk-lib": "2.129.0",
"constructs": "^10.3.0"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,30 @@
# yarn lockfile v1


"@aws-cdk/asset-awscli-v1@^2.2.177":
"@aws-cdk/asset-awscli-v1@^2.2.202":
version "2.2.202"
resolved "http://localhost:4873/@aws-cdk/asset-awscli-v1/-/asset-awscli-v1-2.2.202.tgz#4627201d71f6a5c60db36385ce09cb81005f4b32"
resolved "https://registry.npmjs.org/@aws-cdk/asset-awscli-v1/-/asset-awscli-v1-2.2.202.tgz#4627201d71f6a5c60db36385ce09cb81005f4b32"
integrity sha512-JqlF0D4+EVugnG5dAsNZMqhu3HW7ehOXm5SDMxMbXNDMdsF0pxtQKNHRl52z1U9igsHmaFpUgSGjbhAJ+0JONg==

"@aws-cdk/asset-kubectl-v20@^2.1.1":
"@aws-cdk/asset-kubectl-v20@^2.1.2":
version "2.1.2"
resolved "http://localhost:4873/@aws-cdk/asset-kubectl-v20/-/asset-kubectl-v20-2.1.2.tgz#d8e20b5f5dc20128ea2000dc479ca3c7ddc27248"
resolved "https://registry.npmjs.org/@aws-cdk/asset-kubectl-v20/-/asset-kubectl-v20-2.1.2.tgz#d8e20b5f5dc20128ea2000dc479ca3c7ddc27248"
integrity sha512-3M2tELJOxQv0apCIiuKQ4pAbncz9GuLwnKFqxifWfe77wuMxyTRPmxssYHs42ePqzap1LT6GDcPygGs+hHstLg==

"@aws-cdk/asset-node-proxy-agent-v5@^2.0.148":
version "2.0.166"
resolved "http://localhost:4873/@aws-cdk/asset-node-proxy-agent-v5/-/asset-node-proxy-agent-v5-2.0.166.tgz#467507db141cd829ff8aa9d6ea5519310a4276b8"
integrity sha512-j0xnccpUQHXJKPgCwQcGGNu4lRiC1PptYfdxBIH1L4dRK91iBxtSQHESRQX+yB47oGLaF/WfNN/aF3WXwlhikg==
"@aws-cdk/asset-node-proxy-agent-v6@^2.0.1":
version "2.0.1"
resolved "https://registry.npmjs.org/@aws-cdk/asset-node-proxy-agent-v6/-/asset-node-proxy-agent-v6-2.0.1.tgz#6dc9b7cdb22ff622a7176141197962360c33e9ac"
integrity sha512-DDt4SLdLOwWCjGtltH4VCST7hpOI5DzieuhGZsBpZ+AgJdSI2GCjklCXm0GCTwJG/SolkL5dtQXyUKgg9luBDg==

"@balena/dockerignore@^1.0.2":
version "1.0.2"
resolved "https://registry.npmjs.org/@balena/dockerignore/-/dockerignore-1.0.2.tgz#9ffe4726915251e8eb69f44ef3547e0da2c03e0d"
integrity sha512-wMue2Sy4GAVTk6Ic4tJVcnfdau+gx2EnG7S+uAEe+TWJFqE4YoWN4/H8MSLj4eYJKxGg26lZwboEniNiNwZQ6Q==

"@types/node@*":
version "20.11.25"
resolved "http://localhost:4873/@types/node/-/node-20.11.25.tgz#0f50d62f274e54dd7a49f7704cc16bfbcccaf49f"
integrity sha512-TBHyJxk2b7HceLVGFcpAUjsa5zIdsPWlR6XHfyGzd0SFu+/NFgQgMAl96MSDZgQDvJAvV6BKsFOrt6zIL09JDw==
version "20.11.27"
resolved "https://registry.npmjs.org/@types/node/-/node-20.11.27.tgz#debe5cfc8a507dd60fe2a3b4875b1604f215c2ac"
integrity sha512-qyUZfMnCg1KEz57r7pzFtSGt49f6RPkPBis3Vo4PbS7roQEDn22hiHzl/Lo1q4i4hDEgBJmBF/NTNg2XR0HbFg==
dependencies:
undici-types "~5.26.4"

Expand Down Expand Up @@ -56,29 +56,29 @@ astral-regex@^2.0.0:
resolved "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz#483143c567aeed4785759c0865786dc77d7d2e31"
integrity sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==

aws-cdk-lib@2.80.0:
version "2.80.0"
resolved "http://localhost:4873/aws-cdk-lib/-/aws-cdk-lib-2.80.0.tgz#1118860637d33fab8f646551c29a75728404b64e"
integrity sha512-PoqD3Yms5I0ajuTi071nTW/hpkH3XsdyZzn5gYsPv0qD7mqP3h6Qr+6RiGx+yQ1KcVFyxWdX15uK+DsC0KwvcQ==
aws-cdk-lib@2.129.0:
version "2.129.0"
resolved "https://registry.npmjs.org/aws-cdk-lib/-/aws-cdk-lib-2.129.0.tgz#ddf9df3f5379a9eb90a80bbabe4bfd2d92a9c98b"
integrity sha512-EM3zInM95YN0CM9XWmnFPlfZnXbRCm639OUeKEd1YiSGS+LW+Jbs5lSpIaXyFCR4sUXFYa6ZfaH917Gkf3yxrw==
dependencies:
"@aws-cdk/asset-awscli-v1" "^2.2.177"
"@aws-cdk/asset-kubectl-v20" "^2.1.1"
"@aws-cdk/asset-node-proxy-agent-v5" "^2.0.148"
"@aws-cdk/asset-awscli-v1" "^2.2.202"
"@aws-cdk/asset-kubectl-v20" "^2.1.2"
"@aws-cdk/asset-node-proxy-agent-v6" "^2.0.1"
"@balena/dockerignore" "^1.0.2"
case "1.6.3"
fs-extra "^11.1.1"
ignore "^5.2.4"
fs-extra "^11.2.0"
ignore "^5.3.1"
jsonschema "^1.4.1"
minimatch "^3.1.2"
punycode "^2.3.0"
semver "^7.5.1"
punycode "^2.3.1"
semver "^7.6.0"
table "^6.8.1"
yaml "1.10.2"

aws-cdk@~2.80.0:
version "2.80.0"
resolved "http://localhost:4873/aws-cdk/-/aws-cdk-2.80.0.tgz#fef040f2b01df6551fba828a9df350c4c792baba"
integrity sha512-SKMZ/sGlNmFV37Lk40HHe4QJ2hJZmD0PrkScBmkr33xzEqjyKhN3jIHC4PYqTUeUK/qYemq3Y5OpXKQuWTCoKA==
aws-cdk@~2.129.0:
version "2.129.0"
resolved "https://registry.npmjs.org/aws-cdk/-/aws-cdk-2.129.0.tgz#68d3eac268b9b78feb68851bbfb994835dfddc42"
integrity sha512-Gh/dG2aY0cvlLumYUXalg28/knVI/TrN6NZMBpRWe4gGJe/RH5JROIVB2GOEMMajkew9EiFH0ZeoC+pQ57diaQ==
optionalDependencies:
fsevents "2.3.2"

Expand Down Expand Up @@ -119,7 +119,7 @@ [email protected]:

constructs@^10.3.0:
version "10.3.0"
resolved "http://localhost:4873/constructs/-/constructs-10.3.0.tgz#4c246fce9cf8e77711ad45944e9fbd41f1501965"
resolved "https://registry.npmjs.org/constructs/-/constructs-10.3.0.tgz#4c246fce9cf8e77711ad45944e9fbd41f1501965"
integrity sha512-vbK8i3rIb/xwZxSpTjz3SagHn1qq9BChLEfy5Hf6fB3/2eFbrwt2n9kHwQcS0CPTRBesreeAcsJfMq2229FnbQ==

emoji-regex@^8.0.0:
Expand All @@ -132,9 +132,9 @@ fast-deep-equal@^3.1.1:
resolved "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525"
integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==

fs-extra@^11.1.1:
fs-extra@^11.2.0:
version "11.2.0"
resolved "http://localhost:4873/fs-extra/-/fs-extra-11.2.0.tgz#e70e17dfad64232287d01929399e0ea7c86b0e5b"
resolved "https://registry.npmjs.org/fs-extra/-/fs-extra-11.2.0.tgz#e70e17dfad64232287d01929399e0ea7c86b0e5b"
integrity sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw==
dependencies:
graceful-fs "^4.2.0"
Expand All @@ -151,9 +151,9 @@ graceful-fs@^4.1.6, graceful-fs@^4.2.0:
resolved "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3"
integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==

ignore@^5.2.4:
ignore@^5.3.1:
version "5.3.1"
resolved "http://localhost:4873/ignore/-/ignore-5.3.1.tgz#5073e554cd42c5b33b394375f538b8593e34d4ef"
resolved "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz#5073e554cd42c5b33b394375f538b8593e34d4ef"
integrity sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==

is-fullwidth-code-point@^3.0.0:
Expand Down Expand Up @@ -199,24 +199,19 @@ minimatch@^3.1.2:
dependencies:
brace-expansion "^1.1.7"

punycode@^2.1.0:
version "2.3.0"
resolved "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz#f67fa67c94da8f4d0cfff981aee4118064199b8f"
integrity sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==

punycode@^2.3.0:
punycode@^2.1.0, punycode@^2.3.1:
version "2.3.1"
resolved "http://localhost:4873/punycode/-/punycode-2.3.1.tgz#027422e2faec0b25e1549c3e1bd8309b9133b6e5"
resolved "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz#027422e2faec0b25e1549c3e1bd8309b9133b6e5"
integrity sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==

require-from-string@^2.0.2:
version "2.0.2"
resolved "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz#89a7fdd938261267318eafe14f9c32e598c36909"
integrity sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==

semver@^7.5.1:
semver@^7.6.0:
version "7.6.0"
resolved "http://localhost:4873/semver/-/semver-7.6.0.tgz#1a46a4db4bffcccd97b743b5005c8325f23d4e2d"
resolved "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz#1a46a4db4bffcccd97b743b5005c8325f23d4e2d"
integrity sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==
dependencies:
lru-cache "^6.0.0"
Expand Down Expand Up @@ -259,18 +254,18 @@ table@^6.8.1:

typescript@*:
version "5.4.2"
resolved "http://localhost:4873/typescript/-/typescript-5.4.2.tgz#0ae9cebcfae970718474fe0da2c090cad6577372"
resolved "https://registry.npmjs.org/typescript/-/typescript-5.4.2.tgz#0ae9cebcfae970718474fe0da2c090cad6577372"
integrity sha512-+2/g0Fds1ERlP6JsakQQDXjZdZMM+rqpamFZJEKh4kwTIn3iDkgKtby0CeNd5ATNZ4Ry1ax15TMx0W2V+miizQ==

undici-types@~5.26.4:
version "5.26.5"
resolved "http://localhost:4873/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617"
resolved "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617"
integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==

universalify@^2.0.0:
version "2.0.0"
resolved "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz#75a4984efedc4b08975c5aeb73f530d02df25717"
integrity sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==
version "2.0.1"
resolved "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz#168efc2180964e6386d061e094df61afe239b18d"
integrity sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==

uri-js@^4.2.2:
version "4.4.1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ function outputValueSelector(key: string) {
}

beforeAll(async () => {
const { apiUrl } = await deployJsonServer();
const { apiUrl } = deployJsonServer();

const validSchema = `
type Comment @model {
Expand Down Expand Up @@ -135,7 +135,6 @@ beforeAll(async () => {
await cf.wait(5, () => Promise.resolve());

expect(finishedStack).toBeDefined();
console.log('Finished Stack: ', JSON.stringify(finishedStack, null, 4));

const getApiEndpoint = outputValueSelector(ResourceConstants.OUTPUTS.GraphQLAPIEndpointOutput);
const getApiKey = outputValueSelector(ResourceConstants.OUTPUTS.GraphQLAPIApiKeyOutput);
Expand All @@ -153,15 +152,15 @@ beforeAll(async () => {
});

afterAll(async () => {
await destroyJsonServer();
destroyJsonServer();

await cleanupStackAfterTest(BUCKET_NAME, STACK_NAME, cf);
});

/**
* Test queries below
*/
test('HTTP GET request', async () => {
test('Test HTTP GET request', async () => {
try {
const response = await GRAPHQL_CLIENT.query(
`mutation {
Expand Down Expand Up @@ -192,7 +191,7 @@ test('HTTP GET request', async () => {
}
});

test('HTTP GET request 2', async () => {
test('Test HTTP GET request 2', async () => {
try {
const response = await GRAPHQL_CLIENT.query(
`mutation {
Expand Down Expand Up @@ -223,7 +222,7 @@ test('HTTP GET request 2', async () => {
}
});

test('HTTP POST request', async () => {
test('Test HTTP POST request', async () => {
try {
const response = await GRAPHQL_CLIENT.query(
`mutation {
Expand Down Expand Up @@ -260,7 +259,7 @@ test('HTTP POST request', async () => {
}
});

test('HTTP PUT request', async () => {
test('Test HTTP PUT request', async () => {
try {
const response = await GRAPHQL_CLIENT.query(
`mutation {
Expand Down Expand Up @@ -300,7 +299,7 @@ test('HTTP PUT request', async () => {
}
});

test('HTTP DELETE request', async () => {
test('Test HTTP DELETE request', async () => {
try {
const response = await GRAPHQL_CLIENT.query(
`mutation {
Expand All @@ -324,7 +323,7 @@ test('HTTP DELETE request', async () => {
}
});

test('GET with URL param and query values', async () => {
test('Test GET with URL param and query values', async () => {
try {
const response = await GRAPHQL_CLIENT.query(
`mutation {
Expand Down Expand Up @@ -361,7 +360,7 @@ test('GET with URL param and query values', async () => {
}
});

test('GET with multiple URL params and query values', async () => {
test('Test GET with multiple URL params and query values', async () => {
try {
const response = await GRAPHQL_CLIENT.query(
`mutation {
Expand Down Expand Up @@ -399,7 +398,7 @@ test('GET with multiple URL params and query values', async () => {
}
});

test('that GET errors when missing a required Query input object', async () => {
test('Test that GET errors when missing a required Query input object', async () => {
try {
const response = await GRAPHQL_CLIENT.query(
`mutation {
Expand Down Expand Up @@ -433,7 +432,7 @@ test('that GET errors when missing a required Query input object', async () => {
}
});

test('that POST errors when missing a non-null arg in query/body', async () => {
test('Test that POST errors when missing a non-null arg in query/body', async () => {
try {
const response = await GRAPHQL_CLIENT.query(
`mutation {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ function outputValueSelector(key: string) {
}

beforeAll(async () => {
const { apiUrl } = await deployJsonServer();
const { apiUrl } = deployJsonServer();

const validSchema = `
type Comment @model {
Expand Down Expand Up @@ -183,7 +183,7 @@ beforeAll(async () => {
});

afterAll(async () => {
await destroyJsonServer();
destroyJsonServer();

await cleanupStackAfterTest(BUCKET_NAME, STACK_NAME, cf);
});
Expand Down
Loading

0 comments on commit 98f40ab

Please sign in to comment.