Merged
Conversation
ccfaba9 to
5ddc9bf
Compare
saito-sv
commented
Nov 8, 2022
ocasta181
approved these changes
Nov 8, 2022
ocasta181
approved these changes
Nov 8, 2022
auroter
approved these changes
Nov 8, 2022
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.
SETUP PROJECT:
Make sure you have
dockerinstalled since we are now usingdocker-composeto run postgres and redis locally.Make sure to have these env vars on your .env file
RUN DB:
At the root level of the project run:
this will create postgres and redis db.
UPDATE MIGRATION:
cd into
migrationand run down to 3 or 0goose postgres "host=localhost dbname=string_db user=string_db password=string_password sslmode=disable" down-to 3and and now up
goose postgres "host=localhost dbname=string_db user=string_db password=string_password sslmode=disable" upRUN PROJECT:
Run the project by doing
(please make sure to do it on diff terminal window since the docker compose needs to be running as well).
TEST APIKEY ENDPOINT:
once you have both the db and project running, you can now test.
by sending a
POSTrequest using your favorite rest tool to:/apikeythis will return something like the below example; a APIKEY you can now use for things like Asking for a Quote
{ "apiKey": "str.6a85bf4dae084076ab6c93306f576b25" }With your newly created APIKey you can now test
by sending a
GETrequest using your favorite rest tool to:/apikeywith the following params:{ "limit": 100 }this will return something like the below example; a List of all available keys you can now approve an ApiKey
[ { "id": "923bc187-c9b9-4d6e-ac34-3a76964e43e1", "status": "active", "authType": "apiKey", "data": "63add83ecdf4fe57b484b66c13901a3f6cf16c902601ff0da27dbbce44117d4c", "createdAt": "2022-11-08T05:37:23.141986Z", "updatedAt": "2022-11-08T05:39:16.213357Z" } ]by sending a
POSTrequest using your favorite rest tool to:/apikey/923bc187-c9b9-4d6e-ac34-3a76964e43e1/approvethis will return something like the below example:
TEST INFRA:
Navigate to internal dev infra by running:
cd ./infra/internal/devInit (optional):
Test the plan and confirm that the output has no errors by running
The plan should return something like the below example: