WIP: [Storage] Replace HPP skip fixtures with hpp pytest marker#4904
WIP: [Storage] Replace HPP skip fixtures with hpp pytest marker#4904jpeimer wants to merge 1 commit into
Conversation
Replace skip_test_if_no_hpp_sc and skip_test_if_no_hpp_requested fixtures with a pytest.mark.hpp marker on HPP test modules. HPP tests are now deselected by default and only collected when -m hpp is passed. The marker integrates with compound expressions: -m "tier2 and storage" excludes HPP tests, -m "(tier2 and storage) or hpp" includes them Assisted-by: Claude <noreply@anthropic.com> Signed-off-by: Jenia Peimer <jpeimer@redhat.com>
|
Important Review skippedIgnore keyword(s) in the title. ⛔ Ignored keywords (1)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Report bugs in Issues Welcome! 🎉This pull request will be automatically processed with the following features: 🔄 Automatic Actions
📋 Available CommandsPR Status Management
Review & Approval
Testing & Validation
Container Operations
Cherry-pick Operations
Label Management
✅ Merge RequirementsThis PR will be automatically approved when the following conditions are met:
📊 Review ProcessApprovers and ReviewersApprovers:
Reviewers:
Available Labels
AI Features
💡 Tips
For more information, please refer to the project documentation or contact the maintainers. |
| def filter_hpp_tests(items: list[Item], config: Config) -> list[Item]: | ||
| marker_expression = config.getoption("-m") | ||
| if not marker_expression or "hpp" not in marker_expression: | ||
| discard_tests, items_to_return = remove_tests_from_list(items=items, filter_str="hpp") | ||
| config.hook.pytest_deselected(items=discard_tests) | ||
| return items_to_return | ||
|
|
||
| return items |
There was a problem hiding this comment.
why is this needed?
pytest collects based on the provided markers
it is a good approach to mark the tests that require hpp with this marker
There was a problem hiding this comment.
by default, these hpp tests will be collected when we just pass "-m storage and tier2", so we need a way to not-select them by default, and only select them when we pass the hpp marker
| remote_cluster: Tests that require a remote cluster | ||
|
|
||
| ## Required operators | ||
| hpp: Tests that require the HostPath Provisioner. Only collected when -m hpp is passed |
There was a problem hiding this comment.
Only collected when -m hpp is passed - please remove, this is pytest built-in behavior
Short description:
Replace
skip_test_if_no_hpp_scandskip_test_if_no_hpp_requestedfixtures with apytest.mark.hppmarker on HPP test modules. HPP tests are now deselected by default and only collected when -m hpp is passed.The marker integrates with compound expressions:
-m "tier2 and storage"excludes HPP tests,-
m "(tier2 and storage) or hpp"includes themAssisted-by: Claude noreply@anthropic.com
More details:
What this PR does / why we need it:
Which issue(s) this PR fixes:
Special notes for reviewer:
jira-ticket: