[Bug] [CLI] test-case-selector option does not work with resource · Issue #12456 · kyverno/kyverno · GitHub
More Web Proxy on the site http://driver.im/
You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
afarbos opened this issue
Mar 19, 2025
· 3 comments
· May be fixed by #12681
Assignees
Labels
bugSomething isn't workingcli:testThe CLI test command related issue.testTasks related to unit/e2e tests.triageDefault label assigned to all new issues indicating label curation is needed to fully organize.type:clicli releated issue
I have searched other issues in this repository and mine is not recorded.
The text was updated successfully, but these errors were encountered:
afarbos
added
bug
Something isn't working
triage
Default label assigned to all new issues indicating label curation is needed to fully organize.
type:cli
cli releated issue
labels
Mar 19, 2025
Hi @afarbos,
I reviewed the codebase and found that resources are not being filtered because the resource field is deprecated, and resources should be used instead. However, when running the test case selector, using "resources=any_resource" doesn't work either. Based on my findings, this seems to be due to the filter.Apply() function not being updated accordingly.
bugSomething isn't workingcli:testThe CLI test command related issue.testTasks related to unit/e2e tests.triageDefault label assigned to all new issues indicating label curation is needed to fully organize.type:clicli releated issue
Kyverno CLI Version
1.13.4
Description
According to https://kyverno.io/docs/kyverno-cli/usage/test/#test-subset-of-resources the test-case-selector allows to run a subset of tests based on policy, rule and/or resource.
The
resource
selector does not work, all resources are tested even when one is specified.relates to #10406
Steps to reproduce
Expected behavior
Screenshots
See CLI output above
Kyverno logs
See CLI output above
Slack discussion
https://cloud-native.slack.com/archives/C02CEARLA3D/p1741815210978819
Troubleshooting
The text was updated successfully, but these errors were encountered: