docs: add integration test command builder guide to tools directory#4627
docs: add integration test command builder guide to tools directory#4627raj-prince wants to merge 2 commits intomasterfrom
Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces a new documentation file designed to streamline the process of running end-to-end integration tests. By providing a structured template and a list of available test packages and options, it simplifies command construction for developers, reducing the cognitive load required to execute these tests correctly. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces a new documentation file, TEST_BUILDER.md, which provides a guide for constructing and running GCSFuse integration tests. The feedback recommends updating the go test command template and examples to use a 90-minute timeout for consistency with project standards and to target specific package directories instead of using recursive patterns to avoid including unintended subpackages.
| export TEST_PACKAGE_NAME=<selected_package> | ||
| export TEST_BUCKET_NAME=<your_gcs_bucket_name> | ||
|
|
||
| GODEBUG=asyncpreemptoff=1 CGO_ENABLED=0 go test ./tools/integration_tests/$TEST_PACKAGE_NAME/... -p 1 --integrationTest --testbucket=$TEST_BUCKET_NAME --timeout=20m <additional_options> |
There was a problem hiding this comment.
The use of the ellipsis (/...) in the package path might lead to unexpected behavior by recursively including subpackages or helper utilities that are not intended to be run as standalone tests. The project's standard test scripts target the package directory directly. Additionally, the timeout should be updated to match the project default of 90m for consistency. Refer to the Go test documentation for details on package patterns.
| GODEBUG=asyncpreemptoff=1 CGO_ENABLED=0 go test ./tools/integration_tests/$TEST_PACKAGE_NAME/... -p 1 --integrationTest --testbucket=$TEST_BUCKET_NAME --timeout=20m <additional_options> | |
| GODEBUG=asyncpreemptoff=1 CGO_ENABLED=0 go test ./tools/integration_tests/$TEST_PACKAGE_NAME -p 1 --integrationTest --testbucket=$TEST_BUCKET_NAME -timeout=90m <additional_options> |
References
- Link to documentation for any mentioned features, flags, or settings.
| export TEST_PACKAGE_NAME=operations | ||
| export TEST_BUCKET_NAME=my-test-bucket | ||
|
|
||
| GODEBUG=asyncpreemptoff=1 CGO_ENABLED=0 go test ./tools/integration_tests/$TEST_PACKAGE_NAME/... -p 1 -short --integrationTest -v --testbucket=$TEST_BUCKET_NAME --timeout=20m |
There was a problem hiding this comment.
Updating the example to remove the ellipsis and align the timeout with the project default of 90m. See the Go test documentation for more information on package path patterns.
| GODEBUG=asyncpreemptoff=1 CGO_ENABLED=0 go test ./tools/integration_tests/$TEST_PACKAGE_NAME/... -p 1 -short --integrationTest -v --testbucket=$TEST_BUCKET_NAME --timeout=20m | |
| GODEBUG=asyncpreemptoff=1 CGO_ENABLED=0 go test ./tools/integration_tests/$TEST_PACKAGE_NAME -p 1 -short --integrationTest -v --testbucket=$TEST_BUCKET_NAME -timeout=90m |
References
- Link to documentation for any mentioned features, flags, or settings.
Description
Link to the issue in case of a bug fix.
Testing details
Any backward incompatible change? If so, please explain.