-
Notifications
You must be signed in to change notification settings - Fork 115
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
Add filter for ldap related tests #14540
Merged
Gauravtalreja1
merged 1 commit into
SatelliteQE:master
from
ATIX-AG:filter-ldap-related-tests
Apr 9, 2024
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dosas , I think we are going too deep with adding markers to filter tests by adding explicit markers.
BTW we have similar implementation in robottelo that adds marker on each test based on component doc tag implemented here https://github.com/SatelliteQE/robottelo/blob/master/pytest_plugins/metadata_markers.py#L109
With this you should be able to opt in / opt out tests based on component name including ldap. If this suits your need, please close the PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sadly this does not fit my needs.
The tests I want to filter are the ones using
create_ldap
fixtureI also tried filtering by
-k
expression but this does not yield the right resultI doubt that I can change the component for https://github.com/SatelliteQE/robottelo/blob/master/tests/foreman/api/test_role.py#L1627 to ldap
I also have not found a way to not run tests belonging to a certain component, is this even possible?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dosas No ! You cant change the component names because they are tightly coupled with our internal component mappings system.
To filter out the component tests , you can use
-m not <component_name>
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is what I thought ;)
No, this does not work:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahh ! These component names as markers are applied as key=value pair styled and hence we cant filter them out from
-m
option. We can change that in future though or hope pytest supports that.So for now I am ACKing you.