You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(tests/postgres): restore list_schemas test and implement dynamic owner (#2521)
## Description
This PR resolves the race conditions identified in Issue 2463 by fully
implementing per-test resource isolation and dynamic metadata validation
for` PostgreSQL` databases.
### Key Changes:
**UUID-Based Isolation:** Prefixes schema names with a `uniqueID` to
ensure that concurrent test runs in Cloud Build do not interfere with or
accidentally delete each other's resources.
**Dynamic Owner**: Replaced the hardcoded `postgres` owner with dynamic
environment variables (e.g., PostgresUser, etc), ensuring tests pass in
environments with non-default database users.
**Restored Integration Test:** Un-commented the
`invoke_list_schemas_with_owner_name` test case to verify the tool's
filtering functionality and confirm the effectiveness of the isolation
logic.
**Error Log Correction**: Fixed a string formatting bug that produced
`%!s(float64=0)` by updating the failure reporting verb to `%+v ` for
structured map data.
## PR Checklist
> Thank you for opening a Pull Request! Before submitting your PR, there
are a
> few things you can do to make sure it goes smoothly:
- [ ] Make sure you reviewed
[CONTRIBUTING.md](https://github.com/googleapis/genai-toolbox/blob/main/CONTRIBUTING.md)
- [ ] Make sure to open an issue as a
[bug/issue](https://github.com/googleapis/genai-toolbox/issues/new/choose)
before writing your code! That way we can discuss the change, evaluate
designs, and agree on the general idea
- [ ] Ensure the tests and linter pass
- [ ] Code coverage does not decrease (if any source code was changed)
- [ ] Appropriate docs were updated (if necessary)
- [ ] Make sure to add `!` if this involve a breaking change
🛠️ Fixes#2463
0 commit comments