Skip to content

Commit

Permalink
Look for the new cookie name is eval only til shib is released in prod.
Browse files Browse the repository at this point in the history
  • Loading branch information
goulter committed Aug 2, 2024
1 parent a62f1fb commit 210f307
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions tests/test_2fa_duo.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,15 +207,23 @@ def test_remember_me_cookie(
# shib_idp_session, shib_idp_session_ss

cookie_names = {cookie['name'] for cookie in fresh_browser.get_cookies()}
assert 'shib_idp_session' in cookie_names
# prod and eval are different for about a week til the new shib is released to prod.
if test_env == 'eval':
assert '__Host-shib_idp_session' in cookie_names
else:
assert 'shib_idp_session' in cookie_names
assert 'shib_idp_session_ss' in cookie_names

fresh_browser.get(f'{sp_url(sp)}/Shibboleth.sso/Logout?return={idp_url}/profile/Logout')
# shib_idp_session* cookies should be gone.
fresh_browser.wait_for_tag('span', 'Your UW NetID sign-in session has ended.')

cookie_names = {cookie['name'] for cookie in fresh_browser.get_cookies()}
assert 'shib_idp_session' not in cookie_names
# prod and eval are different for about a week til the new shib is released to prod.
if test_env == 'eval':
assert '__Host-shib_idp_session' not in cookie_names
else:
assert 'shib_idp_session' not in cookie_names
assert 'shib_idp_session_ss' not in cookie_names

sp = ServiceProviderInstance.diafine12
Expand Down

0 comments on commit 210f307

Please sign in to comment.