Fix 9 failing jersey/checkout tests — update opt_out fixtures #274
Labels
No labels
domain:backend
domain:devops
domain:frontend
status:approved
status:in-progress
status:needs-fix
status:qa
type:bug
type:devops
type:feature
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
forgejo_admin/basketball-api#274
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Type
Bug
Lineage
Regression from
forgejo_admin/basketball-api #265— opt_out removed as valid jersey option but test fixtures still send it.Repo
forgejo_admin/basketball-apiWhat Broke
9 tests return 422 because they POST
{"option": "opt_out"}to jersey/checkout endpoints. opt_out was removed in #265. CI pipeline fails atteststep, blockingupdate-kustomize-tagand all auto-deploys.Exact failing tests:
tests/test_jersey.py::TestPlayerIdJerseyCheckout::test_explicit_player_id_opts_out_correct_playertests/test_jersey.py::TestPlayerIdJerseyCheckout::test_omitted_player_id_defaults_to_firsttests/test_jersey.py::TestPlayerIdJerseyCheckout::test_wrong_player_id_returns_403tests/test_checkout.py::TestPlayerIdCheckoutCreateSession::test_explicit_player_id_opts_out_correct_playertests/test_checkout.py::TestPlayerIdCheckoutCreateSession::test_omitted_player_id_defaults_to_firsttests/test_checkout.py::TestPlayerIdCheckoutCreateSession::test_wrong_player_id_returns_403tests/test_dual_auth.py::TestJerseyCheckoutDualAuth::test_token_auth_opt_outtests/test_dual_auth.py::TestJerseyCheckoutDualAuth::test_jwt_auth_opt_outtests/test_dual_auth.py::TestCheckoutCreateSessionDualAuth::test_jwt_auth_opt_out_worksRepro Steps
pytest tests/test_jersey.py tests/test_checkout.py tests/test_dual_auth.py -vassert 422 == 200orassert 422 == 403Expected Behavior
All 9 tests pass. CI pipeline runs green.
update-kustomize-tagruns.Environment
5ed3220(#265)23902feAcceptance Criteria
home_only)pytest— 0 failuresFile Targets
Files to modify — tests only, nothing else:
tests/test_jersey.py— replace"option": "opt_out"with"option": "home_only"in the 3 failing test methodstests/test_checkout.py— same, 3 methodstests/test_dual_auth.py— same, 3 methodsDo NOT touch any file in
src/.Related
westside-basketball— project this affects