Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update docs on running single tests #12801

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

wyardley
Copy link
Contributor

@wyardley wyardley commented Jan 18, 2025

The examples refer to running a single test, but the -run command in the example could potentially run lots of tests unexpectedly.

Use a -run= example with the correct syntax for passing a literal dollar sign to the regex -- while the docs link to the golang docs, because of shell quoting and because of it getting passed via make, it seems to be necessary to use double dollar signs.

I don't 100% know this is the right solution, but I haven't gotten a direct answer or an example of a better way to do it.

Open to suggestions both as to a better fix

I debated anchoring on the front side as well (-run=^TestFoo_bar$$), but seems less necessary. But it is very easy to accidentally kick off a whole bunch of expensive and slow tests if you match too broadly, including if you use a bad regex, forget the dash before run, or do any number of other things.

Fixes hashicorp/terraform-provider-google#19934

Release Note Template for Downstream PRs (will be copied)

See Write release notes for guidance.


Copy link

Hello! I am a robot. Tests will require approval from a repository maintainer to run.

@shuyama1, a repository maintainer, has been assigned to review your changes. If you have not received review feedback within 2 business days, please leave a comment on this PR asking them to take a look.

You can help make sure that review is quick by doing a self-review and by running impacted tests locally.

@github-actions github-actions bot requested a review from shuyama1 January 18, 2025 05:29
@modular-magician modular-magician added the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label Jan 18, 2025
The examples refer to running a single test, but the `-run` command
example could potentially run lots of tests unexpectedly.

Use a `-run=` example with the correct syntax for passing a literal
dollar sign to the regex -- while the docs link to the golang docs,
because of shell quoting and because of it getting passed via make, it
seems to be necessary to use double dollar signs.

Fixes hashicorp/terraform-provider-google#19934
@wyardley wyardley force-pushed the wyardley/issues/19934 branch from 0945606 to 257596c Compare January 18, 2025 05:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting-approval Pull requests that need reviewer's approval to run presubmit tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Running single acceptance test via make command
2 participants