Skip to content

Commit 04b48ef

Browse files
Update DEVELOPER.md (#200)
Co-authored-by: Wenxin Du <117315983+duwenxin99@users.noreply.github.com>
1 parent 9709a9a commit 04b48ef

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

DEVELOPER.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,22 @@ Learn more by reading [How should I write my commits?](https://github.com/google
1818

1919
### Run tests locally
2020

21-
1. Set environment variables for `INSTANCE_ID`, `DATABASE_ID`, `REGION`, `DB_USER`, `DB_PASSWORD`
21+
1. Set environment variables for `INSTANCE_ID`, `DATABASE_ID`, `REGION`, `DB_USER`, `DB_PASSWORD`, `IAM_ACCOUNT`.
2222

2323
1. Run pytest to automatically run all tests:
2424

2525
```bash
2626
pytest
2727
```
2828

29+
Notes:
30+
31+
* Tests use both IAM and built-in authentication.
32+
* Learn how to set up a built-in databases user at [Cloud SQL built-in database authentication](https://cloud.google.com/sql/docs/postgres/built-in-authentication).
33+
* Local tests will run against your `gcloud` credentials. Use `gcloud` to login with your personal account or a service account. This account will be used to run IAM tests. Learn how to set up access to the database at [Manage users with IAM database authentication](https://cloud.google.com/sql/docs/postgres/add-manage-iam-users). The "IAM_ACCOUNT" environment variable is also used to test authentication to override the local account. A personal account or a service account can be used for this test.
34+
* You may need to grant access to the public schema for your new database user: `GRANT ALL ON SCHEMA public TO myaccount@example.com;`
35+
36+
2937
### CI Platform Setup
3038

3139
Cloud Build is used to run tests against Google Cloud resources in test project: langchain-cloud-sql-testing.
@@ -121,4 +129,4 @@ The kokoro docs pipeline runs when a new release is created. See `.kokoro/` for
121129
[triggers]: https://console.cloud.google.com/cloud-build/triggers?e=13802955&project=langchain-cloud-sql-testing
122130
[vectorstore]: https://github.com/googleapis/langchain-google-cloud-sql-pg-python/tree/main/docs/vector_store.ipynb
123131
[loader]: https://github.com/googleapis/langchain-google-cloud-sql-pg-python/tree/main/docs/document_loader.ipynb
124-
[history]: https://github.com/googleapis/langchain-google-cloud-sql-pg-python/tree/main/docs/chat_message_history.ipynb
132+
[history]: https://github.com/googleapis/langchain-google-cloud-sql-pg-python/tree/main/docs/chat_message_history.ipynb

0 commit comments

Comments
 (0)