Fix 2 pre-existing failing tests on main (payment_recovery enum + first_payment subject) #434

Open
opened 2026-04-10 22:23:48 +00:00 by forgejo_admin · 0 comments

Type

Bug

Lineage

Standalone — discovered during 2026-04-10 Westside Ops session while investigating CI failures on PRs #426 and #427. Both PRs showed red CI, but investigation revealed the failures were pre-existing on main itself (pipelines 429, 430, 431, 432, 433 all fail with the same 2 tests). Prior PRs #397 and #417 landed without updating these tests, relying on the "deploy anyway" behavior from commit 1d54939.

Repo

forgejo_admin/basketball-api

What Broke

Two hardcoded-assertion tests on main are out of date and have been failing since commits that added new features but forgot to update the tests:

Test 1: tests/test_templated_email.py::TestEmailTypeEnumValues::test_all_expected_values

  • The test holds a hardcoded expected set of EmailType enum members
  • The actual EmailType enum on main now includes 'payment_recovery' (added in PR #397 feat: payment recovery for abandoned Stripe registrations)
  • The test's expected set does NOT include 'payment_recovery', so the assertion expected == actual fails

Test 2: tests/test_first_payment_email.py::test_send_first_payment_email

  • The test asserts 'Great First Practice' in subject on the generated subject line
  • The actual subject line is 'Your First Monthly Payment | Westside Kings & Queens' (changed in PR #417 fix: neutral subject line for first-payment email)
  • The assertion fails because the old phrase is no longer in the subject

Both failures are assertion-updates-needed, not broken functionality. The features they test are working correctly in production.

Repro Steps

  1. Clone basketball-api at origin/main (commit 9598c4d or later)
  2. Run pytest tests/test_templated_email.py::TestEmailTypeEnumValues::test_all_expected_values tests/test_first_payment_email.py::test_send_first_payment_email
  3. Observe: 2 tests fail with AssertionError

Alternatively view pipeline 431 (push on main) at Woodpecker: both failures visible in the test step output.

Expected Behavior

Both tests should pass with the current production behavior. Specifically:

  • test_all_expected_values should include 'payment_recovery' in its expected set
  • test_send_first_payment_email should assert a string that actually appears in the new subject line

Environment

  • Cluster/namespace: CI (Woodpecker)
  • Service version/commit: origin/main at 9598c4d or later
  • Related alerts: none — the deploy anyway behavior from commit 1d54939 (PR #275) means this does NOT block deploys, only CI status badges
  • Discovery: 2026-04-10 while merging PRs #426, #427, #428 for the Marcus batch execution

Acceptance Criteria

  • tests/test_templated_email.py::TestEmailTypeEnumValues::test_all_expected_values passes — add 'payment_recovery' to the expected set
  • tests/test_first_payment_email.py::test_send_first_payment_email passes — update the subject assertion to match the current phrase
  • pytest run on main shows 0 failed in the final summary
  • New commits to main produce green CI for the test step
  • No other test regressions introduced
  • westside-basketball — project this affects
  • PR #397 (payment_recovery feature — introduced the first failure)
  • PR #417 (first-payment neutral subject — introduced the second failure)
  • PR #275 (commit 1d54939 — the "run update-kustomize-tag step even when test step fails" behavior that let these slip through)
### Type Bug ### Lineage Standalone — discovered during 2026-04-10 Westside Ops session while investigating CI failures on PRs #426 and #427. Both PRs showed red CI, but investigation revealed the failures were pre-existing on main itself (pipelines 429, 430, 431, 432, 433 all fail with the same 2 tests). Prior PRs #397 and #417 landed without updating these tests, relying on the "deploy anyway" behavior from commit 1d54939. ### Repo `forgejo_admin/basketball-api` ### What Broke Two hardcoded-assertion tests on `main` are out of date and have been failing since commits that added new features but forgot to update the tests: **Test 1**: `tests/test_templated_email.py::TestEmailTypeEnumValues::test_all_expected_values` - The test holds a hardcoded `expected` set of EmailType enum members - The actual `EmailType` enum on main now includes `'payment_recovery'` (added in PR #397 feat: payment recovery for abandoned Stripe registrations) - The test's `expected` set does NOT include `'payment_recovery'`, so the assertion `expected == actual` fails **Test 2**: `tests/test_first_payment_email.py::test_send_first_payment_email` - The test asserts `'Great First Practice' in subject` on the generated subject line - The actual subject line is `'Your First Monthly Payment | Westside Kings & Queens'` (changed in PR #417 fix: neutral subject line for first-payment email) - The assertion fails because the old phrase is no longer in the subject Both failures are assertion-updates-needed, not broken functionality. The features they test are working correctly in production. ### Repro Steps 1. Clone basketball-api at `origin/main` (commit 9598c4d or later) 2. Run `pytest tests/test_templated_email.py::TestEmailTypeEnumValues::test_all_expected_values tests/test_first_payment_email.py::test_send_first_payment_email` 3. Observe: 2 tests fail with AssertionError Alternatively view pipeline 431 (push on main) at Woodpecker: both failures visible in the `test` step output. ### Expected Behavior Both tests should pass with the current production behavior. Specifically: - `test_all_expected_values` should include `'payment_recovery'` in its expected set - `test_send_first_payment_email` should assert a string that actually appears in the new subject line ### Environment - Cluster/namespace: CI (Woodpecker) - Service version/commit: `origin/main` at 9598c4d or later - Related alerts: none — the `deploy anyway` behavior from commit 1d54939 (PR #275) means this does NOT block deploys, only CI status badges - Discovery: 2026-04-10 while merging PRs #426, #427, #428 for the Marcus batch execution ### Acceptance Criteria - [ ] `tests/test_templated_email.py::TestEmailTypeEnumValues::test_all_expected_values` passes — add `'payment_recovery'` to the expected set - [ ] `tests/test_first_payment_email.py::test_send_first_payment_email` passes — update the subject assertion to match the current phrase - [ ] `pytest` run on `main` shows `0 failed` in the final summary - [ ] New commits to main produce green CI for the `test` step - [ ] No other test regressions introduced ### Related - `westside-basketball` — project this affects - PR #397 (payment_recovery feature — introduced the first failure) - PR #417 (first-payment neutral subject — introduced the second failure) - PR #275 (commit 1d54939 — the "run update-kustomize-tag step even when test step fails" behavior that let these slip through)
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#434
No description provided.