Skip to content

feat: add new test-utils library - #9229

Open
feywind wants to merge 1 commit into
mainfrom
reporx/test-resources
Open

feat: add new test-utils library#9229
feywind wants to merge 1 commit into
mainfrom
reporx/test-resources

Conversation

@feywind

@feywind feywind commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Factors out the test resources class from the Pub/Sub library into its own library, so we can share it with other libraries.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread core/test-utils/src/testResources.ts
Comment thread core/test-utils/src/testResources.ts
Comment thread core/test-utils/src/testResources.ts
@feywind
feywind force-pushed the reporx/test-resources branch from e8264e0 to 2f60be4 Compare September 1, 2026 20:38
@feywind

feywind commented Sep 3, 2026

Copy link
Copy Markdown
Contributor Author

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.

@feywind
feywind marked this pull request as ready for review September 3, 2026 21:06
@feywind
feywind requested a review from a team as a code owner September 3, 2026 21:06
@github-actions
github-actions Bot requested a review from shivanee-p September 3, 2026 21:07

@bshaffer bshaffer left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

@shivanee-p
shivanee-p removed their request for review September 4, 2026 19:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants