Use Deno for setting up test fixtures#154
Merged
Merged
Conversation
magurotuna
commented
Sep 5, 2021
Comment on lines
+36
to
+37
| const accessKeyId = Deno.env.get("AWS_ACCESS_KEY_ID"); | ||
| const secretAccessKey = Deno.env.get("AWS_SECRET_ACCESS_KEY"); |
Collaborator
Author
There was a problem hiding this comment.
I'm not really sure, but aws-sdk doesn't seem to fetch credentials from ~/.aws in Deno. Seems like we have to use environment variables to specify them.
magurotuna
commented
Sep 5, 2021
| - docker stop dynamodb | ||
| docker run --rm -d --name dynamodb -p 8000:8000 amazon/dynamodb-local:latest | ||
| node setup | ||
| AWS_ACCESS_KEY_ID=dummy AWS_SECRET_ACCESS_KEY=dummy deno run --allow-net=localhost:8000 --allow-env --no-check ./setup/setup.ts |
Collaborator
Author
There was a problem hiding this comment.
Unfortunately, without --no-check we'd get TypeError:
error: TS2503 [ERROR]: Cannot find namespace 'NodeJS'.
export declare type GetterFromEnv<T> = (env: NodeJS.ProcessEnv) => T | undefined;
~~~~~~
at https://cdn.skypack.dev/-/@aws-sdk/node-config-provider@v3.22.0-uQRNvqhcRLA9SCx4qjpg/dist=es2020,mode=types/dist/types/fromEnv.d.ts:3:46
Collaborator
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this change?
This PR replaces Node.js with Deno, and cleans up the setup script by splitting fixture data into files by table names for readability and maintainability.
Because the existing test suite pass, we can confirm that this new setup script works fine.