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

[Bug] exclude-test-regex feature not working #1263

Closed
1 task done
TylerHelmuth opened this issue May 9, 2024 · 5 comments
Closed
1 task done

[Bug] exclude-test-regex feature not working #1263

TylerHelmuth opened this issue May 9, 2024 · 5 comments
Labels
bug Something isn't working
Milestone

Comments

@TylerHelmuth
Copy link

chainsaw version Version

v0.2.0

Description

I'm running into an issue where a value for --exclude-test-regex is recognized, but not honor. You can see https://github.com/open-telemetry/opentelemetry-helm-charts/actions/runs/9024018597/job/24797346933?pr=1179 that the configuration sees ExcludeTestRegex '.*multiple-configmaps.*', but the chainsaw/multiple-configmaps test was still run.

The test definition lives here: https://github.com/open-telemetry/opentelemetry-operator/tree/main/tests/e2e/multiple-configmaps

Steps to reproduce

See open-telemetry/opentelemetry-helm-charts#1179

Expected behavior

The test matching that regex would not be run

Screenshots

No response

Logs

No response

Slack discussion

No response

Troubleshooting

  • I have searched other issues in this repository and mine is not recorded.
@TylerHelmuth TylerHelmuth added the bug Something isn't working label May 9, 2024
@TylerHelmuth
Copy link
Author

It seems that the exact test name (--exclude-test-regex "chainsaw/multiple-configmaps") works.

@eddycharly
Copy link
Member

This is the way it works in golang test framework (test name is split against /, and every part is matched with the corresponding part in the provided regexes).

Try with .*/.*multiple-configmaps.* it should work:

  • .* will match with chainsaw
  • .*multiple-configmaps.* will match with multiple-configmaps

I agree it's confusing but it's how golang testing package implements it 🤷

@TylerHelmuth
Copy link
Author

Oh I didn't realize it was using Go's test framework, that's a good clarification to add to the flag description.

@eddycharly
Copy link
Member

Oh I didn't realize it was using Go's test framework, that's a good clarification to add to the flag description.

Do you want to open a pr ?

@eddycharly eddycharly added this to the v0.2.1 milestone May 12, 2024
@eddycharly
Copy link
Member

Closing, not a bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants