Skip to content
This repository has been archived by the owner on May 6, 2020. It is now read-only.

feat(apps): validate routeability through deis-router upon application creation #557

Merged
merged 1 commit into from
Mar 29, 2016

Conversation

helgi
Copy link
Contributor

@helgi helgi commented Mar 24, 2016

Hits the router IP via python-requests with a Host header (uses nip.io) to emulate a request to the application. Sends a Deis Controller UA to make debugging easier
HTTP mocking is required for this to work in tests and all tests now get peppered with mock_requests object, which they can use for other purposes as well if required

Depends on a change to the requests_mock python package for testing only, pulling that from git currently

Tests take 2x the time because of added timing jitter to emulate router being slow to respond at times

Fixes #551

@codecov-io
Copy link

Current coverage is 83.05%

Merging #557 into master will decrease coverage by -0.14% as of 7708eba

@@            master    #557   diff @@
======================================
  Files           36      36       
  Stmts         2327    2372    +45
  Branches       335     342     +7
  Methods          0       0       
======================================
+ Hit           1936    1970    +34
- Partial        114     119     +5
- Missed         277     283     +6

Review entire Coverage Diff as of 7708eba

Powered by Codecov. Updated on successful CI builds.

@vdice
Copy link
Member

vdice commented Mar 28, 2016

Running tests w/ these changes it appears we can now re-enable a few more tests (specifically actions immediately post app deploy). I'll create the correlating PR in workflow-e2e

…n creation

Hits the router IP via python-requests with a Host header (uses xip.io) to emulate a request to the application. Sends a Deis Controller UA to make debugging easier
HTTP mocking is required for this to work in tests and all tests now get peppered with mock_requests object, which they can use for other purposes as well if required

Depends on a change to the requests_mock python package for testing only, pulling that from git currently

Tests take 2x the time because of added timing jitter to emulate router being slow to respond at times

Fixes deis#551
@@ -312,6 +312,7 @@ def __init__(self):
'User-Agent': user_agent('Deis Controller', deis_version)
}
# TODO: accessing the k8s api server by IP address rather than hostname avoids
# TODO look at https://toolbelt.readthedocs.org/en/latest/adapters.html#fingerprintadapter
Copy link
Member

Choose a reason for hiding this comment

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

nit: looks like this TODO interrupts the sentence started above

@arschles arschles added the LGTM2 label Mar 29, 2016
@helgi helgi merged commit 0bc8ae7 into deis:master Mar 29, 2016
@helgi helgi deleted the ticket_551 branch March 29, 2016 22:54
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants