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

Use RFC 2606 reserved invalid DNS name in tests. #176

Merged
merged 1 commit into from Nov 6, 2014

Conversation

gabrielg
Copy link
Contributor

@gabrielg gabrielg commented Nov 5, 2014

This test used a DNS name which, while currently not existing, is not actually reserved. This can manifest as a test failure on poorly configured (like Time Warner Cable) networks. This changes said DNS name to one using a reserved invalid top level name as specified in RFC 2606.

Here's what a failure looks like on TWC DNS because of their inane NXDOMAIN hijacking to serve ads:

  1) Failure:
BadSchemaRefTest#test_bad_host_ref [/Users/ggironda/Repositories/json-schema/test/test_bad_schema_ref.rb:36]:
[SocketError, OpenURI::HTTPError] exception expected, not
Class: <JSON::ParserError>
Message: <"757: unexpected token at '<html><head><meta http-equiv=\"refresh\" content=\"0;url=http://www.dnsrsearch.com/index.php?origURL=http://ppcheesecheseunicornnuuuurrrrr.com/json.schema\"/></head><body><script type=\"text/javascript\">window.location=\"http://www.dnsrsearch.com/index.php?origURL=\"+escape(window.location)+\"&r=\"+escape(document.referrer);</script></body></html>'">
---Backtrace---
/usr/local/opt/rbenv/versions/2.0.0-p247/lib/ruby/2.0.0/json/common.rb:155:in `parse'
/usr/local/opt/rbenv/versions/2.0.0-p247/lib/ruby/2.0.0/json/common.rb:155:in `parse'
/Users/ggironda/Repositories/json-schema/lib/json-schema/validator.rb:415:in `parse'
/Users/ggironda/Repositories/json-schema/lib/json-schema/validator.rb:148:in `load_ref_schema'

This test used a DNS name which, while currently not existing, is not
actually reserved. This can manifest as a test failure on poorly
configured (like Time Warner Cable) networks. This changes said DNS
name to one using a reserved invalid top level name as specified in
RFC 2606.
@pd
Copy link
Contributor

pd commented Nov 5, 2014

Lol, the fun of actually hitting the network for test runs!

👍

@RST-J
Copy link
Contributor

RST-J commented Nov 6, 2014

👍

RST-J added a commit that referenced this pull request Nov 6, 2014
Use RFC 2606 reserved invalid DNS name in tests.
@RST-J RST-J merged commit dec3233 into voxpupuli:master Nov 6, 2014
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.

None yet

3 participants