Fix 9 failing jersey/checkout tests — update opt_out fixtures #274

Open
opened 2026-03-31 14:46:41 +00:00 by forgejo_admin · 0 comments

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-api

What Broke

9 tests return 422 because they POST {"option": "opt_out"} to jersey/checkout endpoints. opt_out was removed in #265. CI pipeline fails at test step, blocking update-kustomize-tag and all auto-deploys.

Exact failing tests:

  • tests/test_jersey.py::TestPlayerIdJerseyCheckout::test_explicit_player_id_opts_out_correct_player
  • tests/test_jersey.py::TestPlayerIdJerseyCheckout::test_omitted_player_id_defaults_to_first
  • tests/test_jersey.py::TestPlayerIdJerseyCheckout::test_wrong_player_id_returns_403
  • tests/test_checkout.py::TestPlayerIdCheckoutCreateSession::test_explicit_player_id_opts_out_correct_player
  • tests/test_checkout.py::TestPlayerIdCheckoutCreateSession::test_omitted_player_id_defaults_to_first
  • tests/test_checkout.py::TestPlayerIdCheckoutCreateSession::test_wrong_player_id_returns_403
  • tests/test_dual_auth.py::TestJerseyCheckoutDualAuth::test_token_auth_opt_out
  • tests/test_dual_auth.py::TestJerseyCheckoutDualAuth::test_jwt_auth_opt_out
  • tests/test_dual_auth.py::TestCheckoutCreateSessionDualAuth::test_jwt_auth_opt_out_works

Repro Steps

  1. pytest tests/test_jersey.py tests/test_checkout.py tests/test_dual_auth.py -v
  2. Observe 9 failures with assert 422 == 200 or assert 422 == 403

Expected Behavior

All 9 tests pass. CI pipeline runs green. update-kustomize-tag runs.

Environment

  • Cluster: prod / basketball-api
  • Failing since commit: 5ed3220 (#265)
  • Current main: 23902fe

Acceptance Criteria

  • All 9 tests pass with a valid jersey option (e.g. home_only)
  • Full suite passes: pytest — 0 failures
  • No changes to production code

File 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 methods
  • tests/test_checkout.py — same, 3 methods
  • tests/test_dual_auth.py — same, 3 methods

Do NOT touch any file in src/.

  • westside-basketball — project this affects
### 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-api` ### What Broke 9 tests return 422 because they POST `{"option": "opt_out"}` to jersey/checkout endpoints. opt_out was removed in #265. CI pipeline fails at `test` step, blocking `update-kustomize-tag` and all auto-deploys. Exact failing tests: - `tests/test_jersey.py::TestPlayerIdJerseyCheckout::test_explicit_player_id_opts_out_correct_player` - `tests/test_jersey.py::TestPlayerIdJerseyCheckout::test_omitted_player_id_defaults_to_first` - `tests/test_jersey.py::TestPlayerIdJerseyCheckout::test_wrong_player_id_returns_403` - `tests/test_checkout.py::TestPlayerIdCheckoutCreateSession::test_explicit_player_id_opts_out_correct_player` - `tests/test_checkout.py::TestPlayerIdCheckoutCreateSession::test_omitted_player_id_defaults_to_first` - `tests/test_checkout.py::TestPlayerIdCheckoutCreateSession::test_wrong_player_id_returns_403` - `tests/test_dual_auth.py::TestJerseyCheckoutDualAuth::test_token_auth_opt_out` - `tests/test_dual_auth.py::TestJerseyCheckoutDualAuth::test_jwt_auth_opt_out` - `tests/test_dual_auth.py::TestCheckoutCreateSessionDualAuth::test_jwt_auth_opt_out_works` ### Repro Steps 1. `pytest tests/test_jersey.py tests/test_checkout.py tests/test_dual_auth.py -v` 2. Observe 9 failures with `assert 422 == 200` or `assert 422 == 403` ### Expected Behavior All 9 tests pass. CI pipeline runs green. `update-kustomize-tag` runs. ### Environment - Cluster: prod / basketball-api - Failing since commit: `5ed3220` (#265) - Current main: `23902fe` ### Acceptance Criteria - [ ] All 9 tests pass with a valid jersey option (e.g. `home_only`) - [ ] Full suite passes: `pytest` — 0 failures - [ ] No changes to production code ### File 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 methods - `tests/test_checkout.py` — same, 3 methods - `tests/test_dual_auth.py` — same, 3 methods Do NOT touch any file in `src/`. ### Related - `westside-basketball` — project this affects
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
forgejo_admin/basketball-api#274
No description provided.