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

[#6712] Use HostnameEndpoint with Agent for HTTPS #624

Merged
merged 24 commits into from
Dec 14, 2016
Merged

Conversation

glyph
Copy link
Member

@glyph glyph commented Dec 11, 2016

glyph and others added 9 commits February 14, 2016 09:07
git-svn-id: svn://svn.twistedmatrix.com/svn/Twisted/branches/hostagent-6712@46787 bbbe8e31-12d6-0310-92fd-ac37d47ddeeb
the tests are somewhat fragile though, so they fail

git-svn-id: svn://svn.twistedmatrix.com/svn/Twisted/branches/hostagent-6712@46788 bbbe8e31-12d6-0310-92fd-ac37d47ddeeb
this removes some fragility from the tests
(fewer imports == less coupling == yay)
@glyph
Copy link
Member Author

glyph commented Dec 11, 2016

This is probably going to fail the nodeps builders, since wrapClientTLS depends pretty intimately on SSL actually existing for SSL tests. I'll fix the computation of the skips soon, but it's otherwise in good shape for a review.

@codecov-io
Copy link

codecov-io commented Dec 11, 2016

Current coverage is 91.04% (diff: 100%)

Merging #624 into trunk will decrease coverage by 0.06%

@@              trunk       #624   diff @@
==========================================
  Files           837        837          
  Lines        146006     146069    +63   
  Methods           0          0          
  Messages          0          0          
  Branches      12910      12912     +2   
==========================================
- Hits         133033     132990    -43   
- Misses        10729      10815    +86   
- Partials       2244       2264    +20   

Powered by Codecov. Last update cfa0537...4b3a5ca

@itamarst
Copy link
Contributor

In general looks good (I skimmed the tests a bit more than earlier code). However, since the goal was to make Agent work with IPv6, perhaps a test that actually does that should be added?

@glyph
Copy link
Member Author

glyph commented Dec 12, 2016

Thanks @itamarst !

Since you didn't specify a "next action" I'm going to interpret this as "add a test that verifies IPv6 connectivity for Agent, then land".

The reason I didn't begin with such a test is that, as it turns out, there's no new code here specifically for IPv6, so there was no opportunity to write a test that failed. Previously there was no way to mock out name resolution, and once name resolution is mocked out, the handling of an IPv6 string vs. an IPv4 string is entirely internal to HostnameEndpoint.

That said, those are just reasons that a unit test was not required in TDD discipline; a little integration test to make sure nothing blows up once an IPv6Address gets in the mix would not be amiss here. I'll add and merge.

@glyph glyph merged commit 63dc038 into trunk Dec 14, 2016
@hawkowl hawkowl deleted the hostagent-6712-3 branch December 15, 2016 02:29
@itamarst
Copy link
Contributor

(It did seem like TDD would be tricky, yeah, since code changed so much.)

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