handshake-org / handshake-org/hsd
Add mock DNS records for tests
- Dominant language
- JavaScript
- Stars
- 2.1k
- Forks
- 306
- PR merge metrics
- No merged PRs in 30d
Description
The tests for the claims and anything related to it take too much time, because the requests depend on the response from the actual servers using stub resolver.
- It's performance depends on the stub server performance (e.g. 8.8.8.8 in bns)
- It depends on the DNS Records in those names (e.g. cloudflare) to have proper DNS records.
Ideally, we would have ability to mock the whole server. Proper place is probably the bns for this. (e.g. https://github.com/chjj/bns/pull/34)
Alternatively, restructure Ownership/DNSProof in the `ownership` to have ability to mock the prov/verify for both the ownership and the proof.
Contributor guide
Research direction
Start by locating the claims tests and the Ownership/DNSProof code in ownership, then review how requests reach the stub resolver and the referenced bns pull request. Determine whether mocking belongs in bns or through mockable ownership and proof operations; done means these tests no longer depend on live DNS servers or records.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- networking, testing-qa
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100