Skip to content

Commit 2b61f67

Browse files
committed
tests: vfido for test_passkey__su_fallback_to_password()
Transform `test_passkey__su_fallback_to_password()` to use vfido instead of umockdev Signed-off-by: Iker Pedrosa <ipedrosa@redhat.com>
1 parent 433d96f commit 2b61f67

File tree

1 file changed

+15
-12
lines changed

1 file changed

+15
-12
lines changed

src/tests/system/tests/test_passkey.py

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -864,37 +864,40 @@ def test_passkey__prompt_options(
864864

865865
@pytest.mark.importance("critical")
866866
@pytest.mark.topology(KnownTopology.IPA)
867-
@pytest.mark.builtwith(client=["passkey", "umockdev"], ipa="passkey")
867+
@pytest.mark.builtwith(client=["passkey", "vfido"], ipa="passkey")
868868
@pytest.mark.ticket(gh=7143)
869-
def test_passkey__su_fallback_to_password(
870-
client: Client, ipa: IPA, moduledatadir: str, testdatadir: str, umockdev_ipaotpd_update
871-
):
869+
def test_passkey__su_fallback_to_password(client: Client, ipa: IPA):
872870
"""
873871
:title: Check password authentication of user with IPA server when sssd fall back to password authentication
874872
:setup:
875-
1. Add a user with --user-auth-type=passkey, password in the IPA server
876-
2. Setup SSSD client with FIDO and umockdev, start SSSD service
873+
1. Configure and start virtual passkey service
874+
2. Add a user with --user-auth-type=passkey, password in the IPA server
875+
3. Start SSSD service
877876
:steps:
878-
1. Check authentication of the user with password
877+
1. Check authentication of the user with password fallback
879878
2. Check the TGT of user
880879
:expectedresults:
881880
1. User authenticates successfully
882881
2. Get TGT after authentication of user
883882
:customerscenario: False
884883
"""
885-
with open(f"{testdatadir}/passkey-mapping.ipa") as f:
886-
ipa.user("user1").add(user_auth_type=["passkey", "password"]).passkey_add(f.read().strip())
884+
client.vfido.reset()
885+
client.vfido.pin_enable()
886+
client.vfido.pin_set(123456)
887+
client.vfido.start()
888+
889+
ipa.user("user1").add(password="Secret123", user_auth_type=["passkey", "password"]).passkey_add_register(
890+
client=client, pin=123456, virt_type="vfido"
891+
)
887892

888893
client.sssd.start(service_user="root")
889894

890895
rc, _, output, _ = client.auth.su.passkey_with_output(
891896
username="user1",
892-
device=f"{moduledatadir}/umockdev.device",
893-
ioctl=f"{moduledatadir}/umockdev.ioctl",
894-
script=f"{testdatadir}/umockdev.script.ipa",
895897
pin="\\n",
896898
command="klist",
897899
auth_method=PasskeyAuthenticationUseCases.PASSKEY_FALLBACK_TO_PASSWORD,
900+
virt_type="vfido",
898901
)
899902

900903
assert rc == 0, "Authentication failed"

0 commit comments

Comments
 (0)