afterhours-shift-manager/tests/shared
Adam Moussa 5981776178
Some checks are pending
Deploy API / Deploy API to dev (push) Waiting to run
Deploy API / Deploy API to prod (push) Waiting to run
fix(3cx): refresh the OAuth token before it expires (DEV-298) (#280)
* fix(3cx): refresh the OAuth token before it expires

The worker kept one 3CX access token for the life of the process, so the 8am queue update failed with 401 after the one-hour token lifetime.

* fix(3cx): ignore a client secret this process already replaced

A slower caller still holding the pre-rotation secret could write it back over the new one. The swap now happens under the auth lock, and a retired secret is dropped.

* fix(3cx): adopt a new client secret only after login succeeds

A candidate secret is tried before it replaces the current one, so a revoked secret cannot stick and a later revert to a working secret still takes effect. A failed re-login after 401 returns the original API response.
2026-09-24 23:03:50 +00:00
..
test_blocks.py fix(ci): drop leftover changelog-guard and release-notifier (PLAT-219) (#266) 2026-09-21 23:24:05 +00:00
test_changelog.py fix(ci): drop leftover changelog-guard and release-notifier (PLAT-219) (#266) 2026-09-21 23:24:05 +00:00
test_portal_ops.py ci(workflows): call org reusable CI and Fargate CD (#276) 2026-09-24 16:46:40 +00:00
test_ring_scheduler.py feat(api): collapse Slack, portal, and jobs onto Fargate (PLAT-216) (#259) 2026-09-21 19:13:30 +00:00
test_schedule.py ci(workflows): call org reusable CI and Fargate CD (#276) 2026-09-24 16:46:40 +00:00
test_secrets.py Add pytest suite and wire it into CI (#85) (#86) 2026-06-01 19:07:08 -04:00
test_sentry_init.py feat(api): collapse Slack, portal, and jobs onto Fargate (PLAT-216) (#259) 2026-09-21 19:13:30 +00:00
test_side_effects_holidays.py feat(api): collapse Slack, portal, and jobs onto Fargate (PLAT-216) (#259) 2026-09-21 19:13:30 +00:00
test_three_cx_client.py fix(3cx): refresh the OAuth token before it expires (DEV-298) (#280) 2026-09-24 23:03:50 +00:00