-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ENG-2286 Postgres Integration Test Setup #956
ENG-2286 Postgres Integration Test Setup #956
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
scripts/postgres_test_setup.sh
Outdated
@@ -0,0 +1,10 @@ | |||
#!/usr/bin/env bash |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kenxu95 I think using these scripts to run / teardown a postgres instance makes sense, but would let you verify
I don't know if this is your first python project, but great job! Also, the linter seems to be failing, try if running |
scripts/postgres_test_setup.sh
Outdated
#!/bin/bash | ||
|
||
# Create the Docker container | ||
docker run --name aqueduct-postgres -e POSTGRES_PASSWORD=aqueduct -d postgres -p 5432:5432 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Docker Postgres image (https://hub.docker.com/_/postgres) has the following environment variable:
POSTGRES_DB
This optional environment variable can be used to define a different name for the default database that is created when the image is first started. If it is not specified, then the value of POSTGRES_USER will be used.
You might be able to just run docker run --name aqueduct-postgres -e POSTGRES_PASSWORD=aqueduct -e POSTGRES_DB=aqueducttest -d postgres -p 5432:5432
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@eunice-chan Great catch here, I've updated the setup script to just be one line :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine to me - we can get back to the setup/teardown scripting stuff later, just make sure to record it on the data setup guides :)
26419fa
to
62967f2
Compare
Describe your changes and why you are making these changes
This PR adds Postgres data integration to the sdk integration tests.
Related issue number (if any)
ENG-2286
Loom demo (if any)
Checklist before requesting a review
python3 scripts/run_linters.py -h
for usage).run_integration_test
: Runs integration testsskip_integration_test
: Skips integration tests (Should be used when changes are ONLY documentation/UI)