Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTTP / TCP Test Harness for JSON RPC #52

Draft
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

praetoriansentry
Copy link
Contributor

@praetoriansentry praetoriansentry commented Mar 17, 2023

Description

Creating a basic test harness based on the idea from Release It / Michae Nygard. The goal is to use this while testing our JSON proxies and various blockchain components. Eventually we may want to drop down to an even lower level to handle stuff like sending RST packets or fiddling with the controls of TCP.

Jira / Linear Tickets

Copy link

@LKS121 LKS121 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Copy link

@LKS121 LKS121 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review

Comment on lines +107 to +117
//A server that's listening on UDP rather tha TCP
//A server that responds with valid data but with a delay (e.g. a 2-second delay)
//A server that returns data with invalid or malformed JSON syntax
//A server that returns data in a different character encoding than expected (e.g. ISO-8859-1 instead of UTF-8)
//A server that responds with a different HTTP status code than expected (e.g. 301 instead of 200)
//A server that sends back a response that exceeds the content-length specified in the response header
//A server that sends back a response with missing headers
//A server that sends back a response with extra headers
//A server that requires an authentication header, but fails if it is not provided or if it is incorrect
//A server that requires a specific content type header, and fails if it is not provided or if it is incorrect
//A server that has a firewall that blocks certain IP addresses, causing the request to fail.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
//A server that's listening on UDP rather tha TCP
//A server that responds with valid data but with a delay (e.g. a 2-second delay)
//A server that returns data with invalid or malformed JSON syntax
//A server that returns data in a different character encoding than expected (e.g. ISO-8859-1 instead of UTF-8)
//A server that responds with a different HTTP status code than expected (e.g. 301 instead of 200)
//A server that sends back a response that exceeds the content-length specified in the response header
//A server that sends back a response with missing headers
//A server that sends back a response with extra headers
//A server that requires an authentication header, but fails if it is not provided or if it is incorrect
//A server that requires a specific content type header, and fails if it is not provided or if it is incorrect
//A server that has a firewall that blocks certain IP addresses, causing the request to fail.
//A server that's listening on UDP rather than TCP.
//A server that responds with valid data but with a delay (e.g. a 2-second delay).
//A server that returns data with invalid or malformed JSON syntax.
//A server that returns data in a different character encoding than expected (e.g. ISO-8859-1 instead of UTF-8).
//A server that responds with a different HTTP status code than expected (e.g. 301 instead of 200).
//A server that sends back a response that exceeds the content-length specified in the response header.
//A server that sends back a response with missing headers.
//A server that sends back a response with extra headers.
//A server that requires an authentication header, but fails if it is not provided or if it is incorrect.
//A server that requires a specific content type header, and fails if it is not provided or if it is incorrect.
//A server that has a firewall that blocks certain IP addresses, causing the request to fail.

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.

3 participants