This PR brings another fix #107 along with functionality for using SSSD file in context manager. This feature is useful for tests when we need to make some changes in SSSD and then restore the state.
Test example:
@pytest.mark.parametrize("user", [user_factory("local-user")], scope="session")
def test_su_login_p11_uri_slot_description(user, sssd, user_shell):
"""Test login with PIN to the system with p11_uri specified on specific
slot in sssd.conf."""
with sssd(section="pam", key="p11_uri",
value="pkcs11:pkcs11:slot-description=Virtual%20PCD%2000%2000"):
with Authselect(required=False), user.card(insert=True):
cmd = f"su {user.username} -c whoami"
user_shell.sendline(cmd)
user_shell.expect(f"PIN for {user.username}")
user_shell.sendline(user.pin)
user_shell.expect(user.username)
This PR brings another fix #107 along with functionality for using SSSD file in context manager. This feature is useful for tests when we need to make some changes in SSSD and then restore the state. Test example: