feat: add new test-utils library - #9229
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces a new package, google-test-utils, which provides a TestResources class to manage and clean up testing resource names across Google Cloud Node.js client libraries. The code review identified critical bugs in the filtering and cleanup methods (filterForTest, filterForCurrentRun, and filterForCleanup). Specifically, these methods fail to correctly match or parse resource names generated for BigQuery and Cloud Storage because those names use underscores instead of dashes. Applying the suggested fixes to handle both separators will ensure leaked resources are properly identified and cleaned up.
e8264e0 to
2f60be4
Compare
|
Same answer to all of the Gemini comments: this class is meant to be self-contained, not to adopt resources for existing tests. So I don't think we need to do anything here. |
bshaffer
left a comment
There was a problem hiding this comment.
potentially naive question but, if this factors out utilities from the pubsub library, shouldn't we use it IN the pubsub library instead of what's there currently?
Factors out the test resources class from the Pub/Sub library into its own library, so we can share it with other libraries.