letsencrypt / letsencrypt/boulder
RA test abuses global state
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 5.8k
- Forks
- 649
- Avg merge
- 3d 23h
- Merged PRs (30d)
- 24
Description
The RA unittest sets some global state (Registration, AuthzInitial, AuthzFinal) in initAuthorities. This means its test cases can't be run in parallel, but more importantly it invites errors. Instead initAuthorities should return those values for possible use in test cases. We may want to create a testCtx structure to store the large number of return values from initAuthorities.
Contributor 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.
Research direction
Locate the RA unittest and its initAuthorities function, then trace how Registration, AuthzInitial, and AuthzFinal are assigned and consumed. Refactor the test setup so initAuthorities returns these values, potentially through a testCtx structure, and verify that test cases no longer depend on shared global state.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- testing-qa
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100