afterhours-shift-manager/tests/requirements.txt

10 lines
337 B
Text
Raw Normal View History

Add pytest suite and wire it into CI (#85) (#86) * Add pytest suite and wire it into CI Stands up the first automated tests for the repo (151 tests) and turns on the CI test step. - Lift slack-bot handlers out of create_app() closures to module level so they're unit-testable; create_app is now a thin Bolt-wiring layer. No behavior change (handler entrypoints and create_app signature unchanged). - tests/ mirrors src/: shared layer (schedule, blocks, 3CX client, ring_scheduler, secrets) + all four Lambdas (pay math, drop/swap/pick/ admin/register/rate, pickup button, roster sync, queue scheduler). - All boundaries mocked: DynamoDB/SES/Secrets via moto, 3CX HTTP via responses, Slack via fakes, time via freezegun. No real network/AWS. - pyproject.toml pytest config (pythonpath=src/shared, importlib mode); per-package conftest loads each app.py under a unique name to avoid the four-app.py collision. tests/requirements.txt for test-only deps. - ci.yaml: run-tests: true (reusable workflow auto-installs deps) and lint the tests dir too. - README Testing section. Closes #85 * Add least-privilege permissions block to CI workflow Resolves the CodeQL actions/missing-workflow-permissions alert: the CI workflow now restricts GITHUB_TOKEN to contents: read (it only checks out, lints, and runs tests). * Stop logging extension numbers in 3CX queue updates Resolves 3 high CodeQL py/clear-text-logging-sensitive-data alerts: the queue/ring-group forwarding logs no longer include the routed extension values (closed/holiday/extension). Non-sensitive context (resource id, queue number) is retained.
2026-06-01 19:07:08 -04:00
# Test-only dependencies. The CI reusable workflow (ci-python-sam.yaml) installs
# every requirements.txt it finds when run-tests is true, so this file is picked
# up automatically alongside each Lambda's runtime requirements.
chore(deps): batch bumps for slack-bolt and test deps (DEV-27) (#216) * chore(deps): update slack-bolt requirement in /src/slack-bot Updates the requirements on [slack-bolt](https://github.com/slackapi/bolt-python) to permit the latest version. - [Release notes](https://github.com/slackapi/bolt-python/releases) - [Commits](https://github.com/slackapi/bolt-python/compare/v1.29.0...v1.30.0) --- updated-dependencies: - dependency-name: slack-bolt dependency-version: 1.30.0 dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> * chore(deps): update pytest requirement from >=8.0 to >=9.1.1 in /tests Updates the requirements on [pytest](https://github.com/pytest-dev/pytest) to permit the latest version. - [Release notes](https://github.com/pytest-dev/pytest/releases) - [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst) - [Commits](https://github.com/pytest-dev/pytest/compare/8.0.0...9.1.1) --- updated-dependencies: - dependency-name: pytest dependency-version: 9.1.1 dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> * chore(deps): update freezegun requirement in /tests Updates the requirements on [freezegun](https://github.com/spulec/freezegun) to permit the latest version. - [Release notes](https://github.com/spulec/freezegun/releases) - [Changelog](https://github.com/spulec/freezegun/blob/master/CHANGELOG) - [Commits](https://github.com/spulec/freezegun/compare/1.5.0...1.5.5) --- updated-dependencies: - dependency-name: freezegun dependency-version: 1.5.5 dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> * chore(deps): update responses requirement in /tests Updates the requirements on [responses](https://github.com/getsentry/responses) to permit the latest version. - [Release notes](https://github.com/getsentry/responses/releases) - [Changelog](https://github.com/getsentry/responses/blob/master/CHANGES) - [Commits](https://github.com/getsentry/responses/compare/0.25.0...0.26.2) --- updated-dependencies: - dependency-name: responses dependency-version: 0.26.2 dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> * chore(deps): update moto requirement from >=5.0 to >=5.2.2 in /tests Updates the requirements on [moto](https://github.com/getmoto/moto) to permit the latest version. - [Release notes](https://github.com/getmoto/moto/releases) - [Changelog](https://github.com/getmoto/moto/blob/master/CHANGELOG.md) - [Commits](https://github.com/getmoto/moto/compare/5.0.0...5.2.2) --- updated-dependencies: - dependency-name: moto dependency-version: 5.2.2 dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-04 20:26:37 -04:00
pytest>=9.1.1
moto[dynamodb,ses,secretsmanager]>=5.2.2
responses>=0.26.2
freezegun>=1.5.5
sentry-sdk==2.68.1