tests: migrate passkey tests from umockdev to vfido#8510
Conversation
|
This PR depends on SSSD/sssd-ci-containers#167 and SSSD/sssd-test-framework#237 |
There was a problem hiding this comment.
Code Review
This pull request successfully migrates the passkey system tests from umockdev to the more dynamic vfido framework. This is a significant improvement, making the tests more robust and self-contained by removing a large number of static test data files. However, there are two critical points to address before merging. The requirements.txt file has been updated to point to a personal fork, which must be reverted to an official repository. Additionally, a test case for FIPS-compliant keys appears to have lost its FIPS-specific validation, which could be a regression in test coverage.
| git+https://github.com/next-actions/pytest-tier | ||
| git+https://github.com/next-actions/pytest-output | ||
| git+https://github.com/SSSD/sssd-test-framework | ||
| git+https://github.com/ikerexxe/sssd-test-framework@test-passkey-vfido |
There was a problem hiding this comment.
The sssd-test-framework dependency points to a personal fork (ikerexxe/sssd-test-framework). For merging, this should be changed to point to the official repository. Please ensure the necessary changes from the test-passkey-vfido branch are merged into the official sssd-test-framework repository and update this dependency accordingly.
There was a problem hiding this comment.
This is for testing purposes only. Keeping it open until SSSD/sssd-test-framework#237 is merged
47fe31a to
1b4589e
Compare
1b4589e to
fa2d86e
Compare
fa2d86e to
e45c280
Compare
|
While refactoring, please make sure that this is gone: $ ruff check src/tests/system/tests/ E713 [*] Test for membership should be E713 [*] Test for membership should be E713 [*] Test for membership should be Found 4 errors. |
spoore1
left a comment
There was a problem hiding this comment.
First quick review. I think you need to restore the data/test_ipa directory to fix the failing system tests.
0b8cd69 to
a239f46
Compare
0ca7fa5 to
81af534
Compare
| from __future__ import annotations | ||
|
|
||
| import re | ||
| import time |
81af534 to
8c2d2df
Compare
This reverts commit 03b7441.
Signed-off-by: Iker Pedrosa <ipedrosa@redhat.com>
Transform `test_passkey__register_sssctl()` to use vfido instead of umockdev Signed-off-by: Iker Pedrosa <ipedrosa@redhat.com>
Transform `test_passkey__register_ipa()` to use vfido instead of umockdev Signed-off-by: Iker Pedrosa <ipedrosa@redhat.com>
Transform `test_passkey__su_user()` to use vfido instead of umockdev Signed-off-by: Iker Pedrosa <ipedrosa@redhat.com>
Transform `test_passkey__su_user_with_failed_pin()` to use vfido instead of umockdev Signed-off-by: Iker Pedrosa <ipedrosa@redhat.com>
Transform `test_passkey__su_user_with_incorrect_mapping()` to use vfido instead of umockdev Signed-off-by: Iker Pedrosa <ipedrosa@redhat.com>
Transform `test_passkey__su_user_when_server_is_not_resolvable()` to use vfido instead of umockdev Signed-off-by: Iker Pedrosa <ipedrosa@redhat.com>
Transform `test_passkey__su_user_when_offline()` to use vfido instead of umockdev Signed-off-by: Iker Pedrosa <ipedrosa@redhat.com>
Transform `test_passkey__lookup_user_from_cache()` to use vfido instead of umockdev Signed-off-by: Iker Pedrosa <ipedrosa@redhat.com>
Transform `test_passkey__su_user_with_multiple_keys()` to use vfido instead of umockdev Signed-off-by: Iker Pedrosa <ipedrosa@redhat.com>
Transform `test_passkey__su_user_same_key_for_other_users()` to use vfido instead of umockdev Signed-off-by: Iker Pedrosa <ipedrosa@redhat.com>
…y_only()` Transform `test_passkey__check_passkey_mapping_token_as_ssh_key_only()` to use vfido instead of umockdev Signed-off-by: Iker Pedrosa <ipedrosa@redhat.com>
…ping()` Transform `test_passkey__su_user_when_add_with_ssh_key_and_mapping()` to use vfido instead of umockdev Signed-off-by: Iker Pedrosa <ipedrosa@redhat.com>
Transform `test_passkey__su_fips_fido_key()` to use vfido instead of umockdev Signed-off-by: Iker Pedrosa <ipedrosa@redhat.com>
Transform `test_passkey__check_tgt()` to use vfido instead of umockdev Signed-off-by: Iker Pedrosa <ipedrosa@redhat.com>
Transform `test_passkey__ipa_server_offline()` to use vfido instead of umockdev Signed-off-by: Iker Pedrosa <ipedrosa@redhat.com>
Transform `test_passkey__su_with_12_mappings()` to use vfido instead of umockdev Signed-off-by: Iker Pedrosa <ipedrosa@redhat.com>
Transform `test_passkey__su_no_pin_set()` to use vfido instead of umockdev Signed-off-by: Iker Pedrosa <ipedrosa@redhat.com>
Transform `test_passkey__prompt_options()` to use vfido instead of umockdev Signed-off-by: Iker Pedrosa <ipedrosa@redhat.com>
Transform `test_passkey__su_fallback_to_password()` to use vfido instead of umockdev Signed-off-by: Iker Pedrosa <ipedrosa@redhat.com>
`test_passkey__su_user_when_offline` and `test_passkey__su_with_12_mappings` fail intermittently across different distributions. Mark them as flaky to rerun them without triggering a failure. Signed-off-by: Iker Pedrosa <ipedrosa@redhat.com>
Now that passkey tests are using vfido this fixture was unnecessary Signed-off-by: Iker Pedrosa <ipedrosa@redhat.com>
Signed-off-by: Iker Pedrosa <ipedrosa@redhat.com>
Signed-off-by: Iker Pedrosa <ipedrosa@redhat.com>
Convert "not in" membership tests to pythonic style Signed-off-by: Iker Pedrosa <ipedrosa@redhat.com>
Signed-off-by: Iker Pedrosa <ipedrosa@redhat.com>
8c2d2df to
40dcc0c
Compare
| import re | ||
| import time | ||
| import psutil | ||
| import logging |
Migrate all passkey system tests from
umockdevbased hardware mocking tovfidovirtual FIDO2 device. The change involves converting around 20 passkey test cases to use the newvfidoapproach, removing approximately 100umockdevrecording files that are no longer needed and updating the test infrastructure to work with virtual FIDO2 devices. Additionally, unused passkey fixtures and references have been cleaned up.