Skip to content

Commit

Permalink
docs: add steps for testing the connector (#372)
Browse files Browse the repository at this point in the history
  • Loading branch information
nancynh authored Sep 11, 2024
1 parent be5022a commit 2035a11
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
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>`

0 comments on commit 2035a11

Please sign in to comment.