Skip to content

Commit

Permalink
Add simulated GitHub API requests and responses
Browse files Browse the repository at this point in the history
Used Hoverfly[1] to capture[2] these simulations[3]

Now if we run the tests as below[4], Hoverfly will intercept the
requests to the GitHub API and return the simulated responses.
This means that we no longer need to provide a GitHub `INPUT_REPO_TOKEN`
when running the tests (fixes #85).

Local setup of Hoverfly to get the tests to run is as simple as

1. Install Hoverfly[5]
2. Download the Hoverfly default cert[6]
3. Install and trust the Hoverfly default cert[7]

[1] https://docs.hoverfly.io/
[2] https://docs.hoverfly.io/en/latest/pages/keyconcepts/modes/capture.html
[3] https://docs.hoverfly.io/en/latest/pages/keyconcepts/simulations/simulations.html
[4] HTTPS_PROXY=localhost:8500 go test ./...
[5] https://docs.hoverfly.io/en/latest/pages/introduction/downloadinstallation.html
[6] https://github.com/SpectoLabs/hoverfly/blob/master/core/cert.pem
[7] https://docs.hoverfly.io/en/latest/pages/tutorials/advanced/configuressl/configuressl.html
  • Loading branch information
johnboyes committed Jul 7, 2020
1 parent 7e8da19 commit b782be1
Showing 1 changed file with 463 additions and 0 deletions.
Loading

0 comments on commit b782be1

Please # to comment.