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

acceptance tests, bugfixes & features #47

Merged
merged 51 commits into from
Feb 16, 2015
Merged

Conversation

lukemarsden
Copy link
Contributor

  • Docker acceptance tests against real Docker.
  • Fix GET bug (unable to proxy GET requests).
  • Support streaming streamed responses when there are no matching post-hooks (instead of buffering).
  • Stdin support, so docker run, -t, -i, and -ti all work.
  • Documentation fixes and clarifications on modified semantics & limitations.

This is a clear set of improvements which is IMO worthy of a v0.0.2 release.

robhaswell and others added 29 commits January 20, 2015 12:04
…lly instantiated powerstrip.

Also, factor out useful test setup method into testtools.
…ch turns out breaks half-close hackery). Make failing test actually fail.
…ontent-length. Test for chunked responses.
Turns out, you can't detect 'chunked' encodings from e.g. docker build, because they don't actually use chunked responses.
Instead, buffer them (because we have to) only if you have added some post-hooks (and therefore need them to be buffered).
def dataReceived(self, data):
# print "DATA!", repr(data)
return proxy.ProxyClient.dataReceived(self, data)

Copy link
Contributor

Choose a reason for hiding this comment

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

perhaps we want a comment here to indicate what is happening - in my understanding we are overloading this method such that data is sent directly back to the docker client?

Actually - delete these 3 lines because they don't do anything (it turns out) - they just pass through the method call to the superclass

"\r\n")
self._streaming = True
self._fireListener(Failure(NoPostHooks()))
# print key, "=>", value
Copy link
Contributor

Choose a reason for hiding this comment

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

Remove debugging, or add a debugging mode.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

@robhaswell
Copy link
Contributor

After this branch can we please start implementing acceptance tests, bugfixes and features in separate branches.

del allRequestHeaders["transfer-encoding"]
# XXX Streaming the contents of the request body into memory could
# cause OOM issues for large build contexts POSTed through
# powerstrip.
Copy link
Contributor

Choose a reason for hiding this comment

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

Raise an isssue for known issues and link to the issue.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thanks #51

@robhaswell
Copy link
Contributor

I haven't reviewed this for correctness. I'm suspicious about the lack of tests for the new chunked encoding stuff. It does have a lot of mess which I would prefer not to be merged. There's also some undocumented technical debt which I've asked that you raise issues for. Please merge after addressing all my comments, thanks.

@lukemarsden
Copy link
Contributor Author

I've addressed all your concerns (or raised issues in one or two cases). Thanks for the thorough reviews @robhaswell @binocarlos.

hybrid@node001:~/powerstrip$ sudo TEST_PASSTHRU=1 trial powerstrip.test
[snip]
PASSED (skips=10, successes=52)

Merging, thanks!

lukemarsden pushed a commit that referenced this pull request Feb 16, 2015
acceptance tests, bugfixes & features
@lukemarsden lukemarsden merged commit 0e257e6 into master Feb 16, 2015
@lukemarsden lukemarsden deleted the docker-compat-tests branch February 16, 2015 12:07
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