Restore handler test coverage for the token-rotation path
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 68/100
- Issue type
- Refactor
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- aws, github, typescript
Research direction
Read apps/token-rotator/src/main.spec.ts along with guard.spec.ts and stringHelpers.spec.ts, then run the token-rotator tests to reproduce the skipped case. Restore deterministic coverage for the GitHub-auth, registration-token, and SSM-put path without committed credentials; done means the handler test passes reliably and is no longer skipped.
Written by the indexing model from the issue text.
Description
Context
PR #62 skipped lambdas › token-rotator › completes without error (apps/token-rotator/src/main.spec.ts) because it is a live-API test wired to a dead fixture: the committed .env.test authenticated as GitHub App 217830 in the third-party skedrocket org, which no longer exists — the GitHub API returns "Integration not found" unconditionally, so the test failed 100% of the time on every branch (verified on Renovate branches predating that PR).
That skip leaves the entire GitHub-auth → registration-token → SSM-put path with zero test coverage (the only other specs are guard.spec.ts and stringHelpers.spec.ts; libs/github has none). No working coverage was lost, but this must not become permanent.
Restoration options
- Hermetic (preferred): mock the GitHub API (e.g.
nock) so the handler test runs without live credentials — deterministic, no secrets. - Live: recreate a dedicated test App under the cloudposse org and inject its ID/key via repo secrets (never a committed file).
Hygiene follow-up
.env.test committed the dead App's private key at the repo root; PR #62 replaces it with placeholders, but the key remains in git history — inert (the App is deleted), but worth removing per policy if history-rewrites are ever done.
Refs: #62
- Dominant language
- TypeScript
- Stars
- 3
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from cloudposse/lambda-github-action-token-rotator
-
Dependency DashboardOpen
Difficulty 5/5 Over a week Newbie friendliness 15/100
All issues in cloudposse/lambda-github-action-token-rotator
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
Techiebutler/freeframe#687 ·
Maintainers usually reply within 1 day
-
enhancement from-app needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
nightly-labs/openbot#23050 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
OHDSI/Data2Evidence#3846 ·
Maintainers usually reply within 3 days
-
frontend: EditorDialog: Save & Apply on an empty or comment-only document reports success and applies nothingPossibly taken @shubhamrai9122-creator claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
kubernetes-sigs/headlamp#9086 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
openai/openai-node#3232 ·
Maintainers usually reply within 1 day