-
Notifications
You must be signed in to change notification settings - Fork 256
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
Parametrize sssctl tests. #7776
Conversation
c227175
to
41a2d38
Compare
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.
This looks great; we can close this and open another PR for the code or update this one.
Github is strange for this; "tests' are approved, but the PR is not approved.
@danlavu I think this PR should be merged, not closed. It's only about tests parametrization. I don't have permissions to merge. |
Would it be possible to split into a set of patch - one per action described in the PR description? |
'python-system-tests' fail 'blake':
but I questioned this param anyway. |
I thought it was a cursory overview of the plan, I need to give it a proper review.
I'm sorry, I thought this was a cursory "planning" PR. It still looks great but I need to give it a proper review. |
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.
Great job on the parameterization. Housekeeping hasn't been performed on this file yet. Thus, a lot of my comments are related to housekeeping and standardizing the code.
@@ -150,7 +88,8 @@ def test_sssctl__handle_implicit_domain(client: Client): | |||
|
|||
@pytest.mark.ticket(bz=1902280) | |||
@pytest.mark.topology(KnownTopology.LDAP) | |||
def test_sssctl__reset_cached_timestamps_to_reflect_changes(client: Client, ldap: LDAP): | |||
@pytest.mark.parametrize('fake', [""]) | |||
def test_sssctl__reset_cached_timestamps_to_reflect_changes(client: Client, ldap: LDAP, fake): | |||
""" | |||
:title: fix sssctl cache-expire to also reset cached timestamp |
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.
I will suggest docstring changes because this is part of the housekeeping effort. The title is overly complicated for what this test does.
:title: Clear the SSSD cache using sssctl command against rfc2307bis schema
1. Create users and groups
2. Start SSSD
:steps:
1. Lookup group
2. Remove user from group and clear the cache using sssctl
3. Lookup the group
:expectedresults:
1. Group is found with the user as a member
2. User is removed
3. Group is found with no members
Using rfc2307bis is irrelevant to this test; I propose we remove it entirely, any objections @alexey-tikhonov ?
- Combine various sssctl tests to the single parametrized tests. Signed-off-by: Denis Karpelevich <dkarpele@redhat.com>
Signed-off-by: Denis Karpelevich <dkarpele@redhat.com>
- Change docstrings - Add typing - Fix typos Signed-off-by: Denis Karpelevich <dkarpele@redhat.com>
41a2d38
to
6c7715d
Compare
Does it bring any merit parametrize this aggressively? |
I like it, though I have faced hundreds of test cases where the description doesn't match what it does. I faced "trauma" when there were too many small test cases. Maybe we add in the :description: , the parameterization values, or add more docstrings? |
I believe, this can be closed now because of |
Ok, closing as there are no more comments |
test_sssctl__check_invalid_option_name_in_snippet
merges tests:test_sssctl__check_invalid_option_name_in_snippet
test_sssctl__check_invalid_section_in_name_in_snippet
test_sssctl__check_invalid_section_name
merges tests:test_sssctl__check_missing_equal_sign
test_sssctl__check_invalid_id_provider
test_sssctl__check_missing_id_provider
test_sssctl__check_special_character_in_option_name
test_sssctl__check_special_character_in_section_name
test_sssctl__check_special_character_in_domain_name
test_sssctl__check_forward_slash_missing_in_domain_section
test_sssctl__check_invalid_sssd_section_name
test_sssctl__check_missing_closing_bracket
test_sssctl__check_missing_opening_bracket
test_sssctl__check_attribute_not_allowed_in_sssd
merges tests:test_sssctl__check_misplaced_option
test_sssctl__check_ldap_host_object_class_not_allowed_in_sssd
test_sssctl__check_config_location_permissions
merges tests:test_sssctl__check_non_existing_snippet
test_sssctl__check_non_default_config_location_missing_snippet_directory
test_sssctl__check_invalid_permission
test_sssctl__check_non_default_config_location_invalid_permission
test_sssctl__check_non_default_config_location_invalid_option_name
test_sssctl__check_invalid_pam_section_name (duplicate test_sssctl__check_invalid_sssd_section_name)
test_sssctl__check_invalid_nss_section_name (duplicate test_sssctl__check_invalid_sssd_section_name)