Skip to content
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

docs: add steps for testing the connector #372

Merged
merged 1 commit into from
Sep 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .envrc.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
export ALLOYDB_DB="some-db"
export ALLOYDB_USER="some-user"
export ALLOYDB_PASS="some-password"
export ALLOYDB_INSTANCE_NAME="projects/<PROJECT>/locations/<REGION>/clusters/<CLUSTER>/instances/<INSTANCE>"
export ALLOYDB_INSTANCE_IP="some-IP-address"
export ALLOYDB_IAM_USER="[email protected]"
export ALLOYDB_IMPERSONATED_USER="some-impersonated-IAM-user"
export ALLOYDB_PSC_INSTANCE_URI="projects/<PROJECT>/locations/<REGION>/clusters/<CLUSTER>/instances/<INSTANCE>"
15 changes: 15 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,18 @@ information on using pull requests.

This project follows [Google's Open Source Community
Guidelines](https://opensource.google/conduct/).

## Testing

NOTE: Be sure to run the following commands in the same VPC as the AlloyDB instance

1. Setup local environment to work with virtualenv and nox if you haven't already, e.g.
```
python3 -m venv venv
source ./venv/bin/activate
pip install nox
```
1. Set the environment variables. You can see an example of the environment variables needed by running `cat .envrc.example`
1. Run `gcloud auth application-default login`
1. Command to run the unit tests: `nox -s unit-<PYTHON VERSION>`
1. Command to run the integration tests: `nox -s system-<PYTHON VERSION>`
Loading