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

Updated docs on running single tests #21191

Conversation

modular-magician
Copy link
Collaborator

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 #19934

Release Note Template for Downstream PRs (will be copied)

See Write release notes for guidance.


Derived from GoogleCloudPlatform/magic-modules#12801

Co-authored-by: Shuya Ma <87669292+shuyama1@users.noreply.github.com>

[upstream:c4a3080283066f6b4e47a523b3e755416274e93c]

Signed-off-by: Modular Magician <magic-modules@google.com>
@modular-magician modular-magician requested a review from a team as a code owner January 31, 2025 20:17
@modular-magician modular-magician merged commit dc62cd1 into hashicorp:main Jan 31, 2025
4 checks passed
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.

Running single acceptance test via make command
1 participant