Skip to content

Replace most external test APIs with local mock server#57

Open
jtdowney wants to merge 1 commit intogleam-lang:mainfrom
jtdowney:test-server
Open

Replace most external test APIs with local mock server#57
jtdowney wants to merge 1 commit intogleam-lang:mainfrom
jtdowney:test-server

Conversation

@jtdowney
Copy link

This adds a mock HTTP server that operates similarly to https://httpbin.org. There are two places where it still uses the old tests, but there is a line of sight to moving those over as well.

  1. invalid_tls_test expects a "typical" TLS error like an expired certificate. I felt like it would change the spirit of the test to have it test against an unknown CA. This can move to a local test PKI once Add custom cacert support #36 is finished.
  2. ipv6_test could be replaced with a request to http://[::1]:8080 once IPv6 addresses with brackets are not handled correctly.  #34 is finished.

With a local test PKI, additional testing could be added for #55 as well.

Closes #56

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Proposal: use a small test server for testing rather than external services

1 participant