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

tests: housekeeping, test_identity.py #7461

Closed
wants to merge 1 commit into from

Conversation

danlavu
Copy link

@danlavu danlavu commented Jun 26, 2024

housekeeping, the following is looked at and may have been done:

  • fixed typos and standardized formatting
  • renamed test cases to improve the clarity of what the test does
  • improved docstring language, setup, steps and expected results
  • synced code with the docstring order
  • removed necessary configuration relevant to the test
  • added pytest.mark.importance to test cases

noteable changes:

  • auto_private_group tests reworked, adding two more test cases

@danlavu
Copy link
Author

danlavu commented Jun 26, 2024

Looking at the docs for auto_private_groups. and adding assertions to what I understand to better test this feature. This is failing for the IPA topology; is this expected? Is there something different about IPA?

============================= test session starts ==============================
collecting ... 

Selected tests will use the following hosts:
  client: client.test
  ad: dc.ad.test
  samba: dc.samba.test
  kdc: kdc.test
  ipa: master.ipa.test
  ldap: master.ldap.test
  nfs: nfs.test

collected 552 items / 486 deselected / 66 selected

tests/test_identity.py::test_identity__lookup_username_with_id_command[root] (ad) 
tests/test_identity.py::test_identity__lookup_username_with_id_command[sssd] (ad) 
tests/test_identity.py::test_identity__lookup_uid_with_id_command[root] (ad) 
tests/test_identity.py::test_identity__lookup_uid_with_id_command[sssd] (ad) 
tests/test_identity.py::test_identity__lookup_groupname_with_getent (ad) 
tests/test_identity.py::test_identity__lookup_group_gid_with_getent (ad) 
tests/test_identity.py::test_identity__lookup_user_with_getent (ad) 
tests/test_identity.py::test_identity__lookup_groups_by_name_and_gid_with_getent (ad) 
tests/test_identity.py::test_identity__lookup_group_membership_by_username_with_id_command[root] (ad) 
tests/test_identity.py::test_identity__lookup_group_membership_by_username_with_id_command[sssd] (ad) 
tests/test_identity.py::test_identity__lookup_group_membership_by_group_with_id_command (ad) 
tests/test_identity.py::test_identity__lookup_initgroups_with_getent (ad) 
tests/test_identity.py::test_identity__lookup_users_with_fully_qualified_name (ad) 
tests/test_identity.py::test_identity__lookup_users_when_case_insensitive_is_false (ad) 
tests/test_identity.py::test_identity__lookup_users_fully_qualified_name_and_case_insensitive_is_false (ad) 
tests/test_identity.py::test_identity__lookup_id_mapping_of_posix_and_non_posix_user_and_group (ad) 
tests/test_identity.py::test_identity__lookup_when_auto_private_groups_is_set_to_hybrid (ad) 
tests/test_identity.py::test_identity__lookup_username_with_id_command[root] (ipa) 
tests/test_identity.py::test_identity__lookup_username_with_id_command[sssd] (ipa) 
tests/test_identity.py::test_identity__lookup_uid_with_id_command[root] (ipa) 
tests/test_identity.py::test_identity__lookup_uid_with_id_command[sssd] (ipa) 
tests/test_identity.py::test_identity__lookup_groupname_with_getent (ipa) 
tests/test_identity.py::test_identity__lookup_group_gid_with_getent (ipa) 
tests/test_identity.py::test_identity__lookup_user_with_getent (ipa) 
tests/test_identity.py::test_identity__lookup_groups_by_name_and_gid_with_getent (ipa) 
tests/test_identity.py::test_identity__lookup_group_membership_by_username_with_id_command[root] (ipa) 
tests/test_identity.py::test_identity__lookup_initgroups_with_getent (ipa) 
tests/test_identity.py::test_identity__lookup_users_with_fully_qualified_name (ipa) 
tests/test_identity.py::test_identity__lookup_users_when_case_insensitive_is_false (ipa) 
tests/test_identity.py::test_identity__lookup_users_fully_qualified_name_and_case_insensitive_is_false (ipa) 
tests/test_identity.py::test_identity__lookup_when_auto_private_groups_is_set_to_hybrid (ipa) 
tests/test_identity.py::test_identity__lookup_username_with_id_command[root] (ldap) 
tests/test_identity.py::test_identity__lookup_username_with_id_command[sssd] (ldap) 
tests/test_identity.py::test_identity__lookup_uid_with_id_command[root] (ldap) 
tests/test_identity.py::test_identity__lookup_uid_with_id_command[sssd] (ldap) 
tests/test_identity.py::test_identity__lookup_groupname_with_getent (ldap) 
tests/test_identity.py::test_identity__lookup_group_gid_with_getent (ldap) 
tests/test_identity.py::test_identity__lookup_user_with_getent (ldap) 
tests/test_identity.py::test_identity__lookup_groups_by_name_and_gid_with_getent (ldap) 
tests/test_identity.py::test_identity__lookup_group_membership_by_username_with_id_command[root] (ldap) 
tests/test_identity.py::test_identity__lookup_group_membership_by_username_with_id_command[sssd] (ldap) 
tests/test_identity.py::test_identity__lookup_group_membership_by_group_with_id_command (ldap) 
tests/test_identity.py::test_identity__lookup_initgroups_with_getent (ldap) 
tests/test_identity.py::test_identity__lookup_users_with_fully_qualified_name (ldap) 
tests/test_identity.py::test_identity__lookup_users_when_case_insensitive_is_false (ldap) 
tests/test_identity.py::test_identity__lookup_users_fully_qualified_name_and_case_insensitive_is_false (ldap) 
tests/test_identity.py::test_identity__lookup_when_auto_private_groups_is_set_to_hybrid (ldap) 
tests/test_identity.py::test_identity__lookup_username_with_id_command[root] (samba) 
tests/test_identity.py::test_identity__lookup_username_with_id_command[sssd] (samba) 
tests/test_identity.py::test_identity__lookup_uid_with_id_command[root] (samba) 
tests/test_identity.py::test_identity__lookup_uid_with_id_command[sssd] (samba) 
tests/test_identity.py::test_identity__lookup_groupname_with_getent (samba) 
tests/test_identity.py::test_identity__lookup_group_gid_with_getent (samba) 
tests/test_identity.py::test_identity__lookup_user_with_getent (samba) 
tests/test_identity.py::test_identity__lookup_groups_by_name_and_gid_with_getent (samba) 
tests/test_identity.py::test_identity__lookup_group_membership_by_username_with_id_command[root] (samba) 
tests/test_identity.py::test_identity__lookup_group_membership_by_username_with_id_command[sssd] (samba) 
tests/test_identity.py::test_identity__lookup_group_membership_by_group_with_id_command (samba) 
tests/test_identity.py::test_identity__lookup_initgroups_with_getent (samba) 
tests/test_identity.py::test_identity__lookup_users_with_fully_qualified_name (samba) 
tests/test_identity.py::test_identity__lookup_users_when_case_insensitive_is_false (samba) 
tests/test_identity.py::test_identity__lookup_users_fully_qualified_name_and_case_insensitive_is_false (samba) 
tests/test_identity.py::test_identity__lookup_id_mapping_of_posix_and_non_posix_user_and_group (samba) 
tests/test_identity.py::test_identity__lookup_when_auto_private_groups_is_set_to_hybrid (samba) 

===== 1 failed, 53 passed, 12 skipped, 486 deselected in 490.71s (0:08:10) =====
PASSED [  1%]SKIPPED [  3%]
Skipped: SSSD was built without support for running under non-root
PASSED [  4%]SKIPPED [  6%]
Skipped: SSSD was built without support for running under non-root
PASSED [  7%]PASSED [  9%]PASSED [ 10%]PASSED [ 12%]PASSED [ 13%]SKIPPED [ 15%]
Skipped: SSSD was built without support for running under non-root
PASSED [ 16%]PASSED [ 18%]PASSED [ 19%]PASSED [ 21%]PASSED [ 22%]PASSED [ 24%]PASSED [ 25%]PASSED [ 27%]SKIPPED [ 28%]
Skipped: SSSD was built without support for running under non-root
PASSED [ 30%]SKIPPED [ 31%]
Skipped: SSSD was built without support for running under non-root
PASSED [ 33%]PASSED [ 34%]PASSED [ 36%]PASSED [ 37%]PASSED [ 39%]
tests/test_identity.py::test_identity__lookup_group_membership_by_username_with_id_command[sssd] (ipa) SKIPPED [ 40%]
Skipped: SSSD was built without support for running under non-root

tests/test_identity.py::test_identity__lookup_group_membership_by_group_with_id_command (ipa) PASSED [ 42%]PASSED [ 43%]PASSED [ 45%]PASSED [ 46%]PASSED [ 48%]FAILED [ 50%]

@danlavu danlavu marked this pull request as draft June 26, 2024 15:15
@danlavu danlavu force-pushed the tests-housekeeping-identity branch from 0075955 to 3e468e8 Compare June 26, 2024 17:47
@danlavu
Copy link
Author

danlavu commented Jun 26, 2024

The auto private group tests is fixed.

tests/test_identity.py::test_identity__lookup_when_auto_private_groups_is_set_to_true (ad) 
tests/test_identity.py::test_identity__lookup_when_auto_private_groups_is_set_to_false (ad) 
tests/test_identity.py::test_identity__lookup_when_auto_private_groups_is_set_to_hybrid (ad) 
tests/test_identity.py::test_identity__lookup_when_auto_private_groups_is_set_to_true (ipa) 
tests/test_identity.py::test_identity__lookup_when_auto_private_groups_is_set_to_false (ipa) 
tests/test_identity.py::test_identity__lookup_when_auto_private_groups_is_set_to_hybrid (ipa) 
tests/test_identity.py::test_identity__lookup_when_auto_private_groups_is_set_to_true (ldap) 
tests/test_identity.py::test_identity__lookup_when_auto_private_groups_is_set_to_false (ldap) 
tests/test_identity.py::test_identity__lookup_when_auto_private_groups_is_set_to_hybrid (ldap) 
tests/test_identity.py::test_identity__lookup_when_auto_private_groups_is_set_to_true (samba) 
tests/test_identity.py::test_identity__lookup_when_auto_private_groups_is_set_to_false (samba) 
tests/test_identity.py::test_identity__lookup_when_auto_private_groups_is_set_to_hybrid (samba) PASSED [  8%]PASSED [ 16%]PASSED [ 25%]PASSED [ 33%]PASSED [ 41%]PASSED [ 50%]PASSED [ 58%]PASSED [ 66%]PASSED [ 75%]PASSED [ 83%]PASSED [ 91%]PASSED [100%]

@danlavu danlavu marked this pull request as ready for review June 26, 2024 19:45
@danlavu danlavu force-pushed the tests-housekeeping-identity branch 2 times, most recently from d7d01cd to 573bedb Compare June 26, 2024 21:03
src/tests/system/tests/test_identity.py Outdated Show resolved Hide resolved
src/tests/system/tests/test_identity.py Outdated Show resolved Hide resolved
src/tests/system/tests/test_identity.py Outdated Show resolved Hide resolved
@danlavu danlavu force-pushed the tests-housekeeping-identity branch 2 times, most recently from 52e9f51 to cf685f0 Compare June 27, 2024 09:57
Copy link
Contributor

@jakub-vavra-cz jakub-vavra-cz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add (back) appropriate error messages to tie the failures with expectedresults.

@danlavu
Copy link
Author

danlavu commented Jul 1, 2024

@jakub-vavra-cz added back

@danlavu danlavu requested a review from madhuriupadhye July 1, 2024 12:35
Copy link
Contributor

@madhuriupadhye madhuriupadhye left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

src/tests/system/tests/test_identity.py Outdated Show resolved Hide resolved
src/tests/system/tests/test_identity.py Outdated Show resolved Hide resolved
src/tests/system/tests/test_identity.py Outdated Show resolved Hide resolved
src/tests/system/tests/test_identity.py Outdated Show resolved Hide resolved
src/tests/system/tests/test_identity.py Outdated Show resolved Hide resolved
src/tests/system/tests/test_identity.py Outdated Show resolved Hide resolved
src/tests/system/tests/test_identity.py Show resolved Hide resolved
src/tests/system/tests/test_identity.py Outdated Show resolved Hide resolved
src/tests/system/tests/test_identity.py Outdated Show resolved Hide resolved
src/tests/system/tests/test_identity.py Show resolved Hide resolved
@danlavu danlavu force-pushed the tests-housekeeping-identity branch from b8597bf to 8e261cd Compare July 5, 2024 05:00
@danlavu danlavu requested review from jakub-vavra-cz and aplopez July 5, 2024 19:43
@alexey-tikhonov
Copy link
Member

Static code analysis / python-system-tests fails.

@danlavu danlavu force-pushed the tests-housekeeping-identity branch 2 times, most recently from 32f423c to 6a14f4a Compare July 26, 2024 06:01
@danlavu
Copy link
Author

danlavu commented Jul 30, 2024

@alexey-tikhonov fixed

@alexey-tikhonov
Copy link
Member

alexey-tikhonov commented Jul 30, 2024

Substantial changes were pushed in https://github.com/SSSD/sssd/compare/2e9ad6b3b29410fa4873212912a47403cc9d9aea..32f423c9f145ccf98718e6419fa139f3a8b7b2ff since last review.

Or was it merely a rebase...

@danlavu
Copy link
Author

danlavu commented Aug 2, 2024

Substantial changes were pushed in https://github.com/SSSD/sssd/compare/2e9ad6b3b29410fa4873212912a47403cc9d9aea..32f423c9f145ccf98718e6419fa139f3a8b7b2ff since last review.

Or was it merely a rebase...

I forgot that the following is required for assertions

assert result is not None, "User not found!"

So, the changes are merely adding it back in to fix the syntax checks.

@danlavu danlavu force-pushed the tests-housekeeping-identity branch 2 times, most recently from d339a8e to 156ead4 Compare August 2, 2024 18:38
housekeeping, the following is looked at and may have been done:
* fixed typos and standardized formatting
* renamed test cases to improve the clarity of what the test does
* improved docstring language, setup, steps and expected results
* synced code with the docstring order
* removed necessary configuration relevant to the test
* added pytest.mark.importance to test cases

noteable changes:
* auto_private_group tests reworked, adding two more test cases
@danlavu danlavu force-pushed the tests-housekeeping-identity branch from 156ead4 to 8933006 Compare August 13, 2024 13:10
@jakub-vavra-cz jakub-vavra-cz added Ready to push Ready to push and removed Ready to push Ready to push labels Aug 19, 2024
@jakub-vavra-cz
Copy link
Contributor

@danlavu :
Conflict in sssd-2-9

@danlavu
Copy link
Author

danlavu commented Aug 19, 2024

@jakub-vavra-cz jakub-vavra-cz added Ready to push Ready to push and removed Ready to push Ready to push backport-to-stable labels Aug 20, 2024
@jakub-vavra-cz
Copy link
Contributor

Pushed PR: #7461

  • master
    • edb35af - tests: housekeeping, test_identity.py

@danlavu danlavu deleted the tests-housekeeping-identity branch November 4, 2024 17:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants