Skip to content

test rewrite: legacy intg test_pam_responder.py - first batch - #9004

Open
danlavu wants to merge 2 commits into
SSSD:masterfrom
danlavu:rewrite-test_pam_responder.py1
Open

test rewrite: legacy intg test_pam_responder.py - first batch#9004
danlavu wants to merge 2 commits into
SSSD:masterfrom
danlavu:rewrite-test_pam_responder.py1

Conversation

@danlavu

@danlavu danlavu commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Port sssd/src/tests/intg/test_pam_responder.py to test_smartcard.py, test_authentication.py

  • test_smartcard__login_fails_when_wrong_pin_is_entered
  • test_smartcard__login_fails_when_card_is_not_mapped
  • test_smartcard__cert_auth_limited_to_allowed_pam_services
  • test_smartcard__login_succeeds_when_cert_auth_required
  • test_smartcard__login_fails_when_cert_auth_required_without_card
  • test_authentication__custom_password_prompt_is_shown_at_login

Peeling out the reviewed test cases into it's own PR, from #8873

Model used: Claude Sonnet 4.6

Comment thread src/tests/system/tests/test_authentication.py Fixed
Comment thread src/tests/system/tests/test_authentication.py Fixed
Comment thread src/tests/system/tests/test_authentication.py Fixed
@danlavu
danlavu force-pushed the rewrite-test_pam_responder.py1 branch from 0822131 to 5245b03 Compare July 24, 2026 18:00
Dan Lavu and others added 2 commits July 28, 2026 14:57
Port sssd/src/tests/intg/test_pam_responder.py to test_smartcard.py,
test_authentication.py

- test_smartcard__login_fails_when_wrong_pin_is_entered
- test_smartcard__login_fails_when_card_is_not_mapped
- test_smartcard__cert_auth_limited_to_allowed_pam_services
- test_smartcard__login_succeeds_when_cert_auth_required
- test_smartcard__login_fails_when_cert_auth_required_without_card
- test_authentication__custom_password_prompt_is_shown_at_login

Peeling out the reviewed test cases into it's own PR, from
SSSD#8873

Co-authored-by: Cursor <cursoragent@cursor.com>
Model used: Claude Sonnet 4.6
Covered by the newly ported system tests:
- test_sc_auth_wrong_pin -> test_smartcard__login_fails_when_wrong_pin_is_entered
- test_try_sc_auth, test_try_sc_auth_no_map -> test_smartcard__login_fails_when_card_is_not_mapped
- test_sc_proxy_password_fallback, test_sc_proxy_no_password_fallback -> test_smartcard__certificate_authentication_is_limited_to_allowed_pam_services
- test_require_sc_auth -> test_smartcard__login_succeeds_when_cert_auth_required
- test_require_sc_auth_no_cert -> test_smartcard__login_fails_when_cert_auth_required_without_card
- test_password_prompting_config_global, test_password_prompting_config_srv -> test_authentication__custom_password_prompt_is_shown_at_login

Already covered
- test_preauth_indicator - implementation-detail file check, no functional proof; smart-card availability is already proven
  functionally by test_smartcard.py
- test_sc_auth - duplicate of test_smartcard__su_as_local_user
- test_sc_auth_two - duplicate; multi-cert selection already exercised by test_smartcard__two_tokens_match_on_both
- test_krb5_auth - basic Kerberos login success/negative-password coverage already exists via client.sssd.common.krb5_auth() in test_authentication.py / test_ldap_krb5.py

Remaining cases
- test_try_sc_auth_root
- test_sc_auth_missing_name
- test_sc_auth_name_format
= test_krb5_auth_domains

Co-authored-by: Cursor <cursoragent@cursor.com>
Model used: Claude Sonnet 4.6
@danlavu
danlavu force-pushed the rewrite-test_pam_responder.py1 branch from 5245b03 to a4d6875 Compare July 28, 2026 19:34
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.

4 participants