test: moving duplicate code in websocket_integration_test to utilities#4127
Merged
alyssawilk merged 1 commit intoenvoyproxy:masterfrom Aug 14, 2018
Merged
test: moving duplicate code in websocket_integration_test to utilities#4127alyssawilk merged 1 commit intoenvoyproxy:masterfrom
alyssawilk merged 1 commit intoenvoyproxy:masterfrom
Conversation
Signed-off-by: Alyssa Wilk <alyssar@chromium.org>
Member
|
@dnoe PTAL |
dnoe
reviewed
Aug 14, 2018
Contributor
dnoe
left a comment
There was a problem hiding this comment.
Overall looks good. I think there's one more place where the new request string creator function can be used.
| const std::string upgrade_req_str_ = createUpgradeRequest("websocket"); | ||
| const std::string upgrade_resp_str_ = createUpgradeResponse("websocket"); | ||
|
|
||
| const std::string modified_upgrade_resp_str_ = "HTTP/1.1 101 Switching Protocols\r\nconnection: " |
Contributor
There was a problem hiding this comment.
Can you initialize this with createUpgradeResponse("websocket", 0) ?
Contributor
There was a problem hiding this comment.
er, nevermind. It's a response string and that doesn't take the content length. Does it make sense to add this capability into createUpgradeResponse()?
Contributor
Author
There was a problem hiding this comment.
Given the follow-up (moving this all from raw bytes to HTTP headers) remove this string I'd say not worth it :-)
Contributor
There was a problem hiding this comment.
Agree! excellent follow-up plan.
dnoe
approved these changes
Aug 14, 2018
snowp
pushed a commit
to snowp/envoy
that referenced
this pull request
Aug 14, 2018
* origin/master: (38 commits) test: add tests for corner-cases around sending requests before run() starts or after run() ends. (envoyproxy#4114) perf: reduce the memory usage of LC Trie construction (envoyproxy#4117) test: moving redundant code in websocket_integration_test to utilities (envoyproxy#4127) test: make YamlLoadFromStringFail less picky about error msg. (envoyproxy#4141) rbac: add rbac network filter. (envoyproxy#4083) fuzz: route lookup and header finalization fuzzer. (envoyproxy#4116) Set content-type and content-length (envoyproxy#4113) fault: use FractionalPercent for percent (envoyproxy#3978) test: Fix inverted exact match logic in IntegrationTcpClient::waitForData() (envoyproxy#4134) Added cluster_name to load assignment config for static cluster (envoyproxy#4123) ssl: refactor ContextConfig to use TlsCertificateConfig (envoyproxy#4115) syscall: refactor OsSysCalls for deeper errno latching (envoyproxy#4111) thrift_proxy: fix oneway bugs (envoyproxy#4025) Do not crash when converting YAML to JSON fails (envoyproxy#4110) config: allow unknown fields flag (take 2) (envoyproxy#4096) Use a jittered backoff strategy for handling HdsDelegate stream/connection failures (envoyproxy#4108) bazel: use GCS remote cache (envoyproxy#4050) Add thread local cache of overload action states (envoyproxy#4090) Added TCP healthcheck capabilities to the HdsDelegate (envoyproxy#4079) secret: add secret provider interface and use it for TlsCertificates (envoyproxy#4086) ... Signed-off-by: Snow Pettersen <snowp@squareup.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is prepatory to moving from using raw TCP to using our HTTP tools (which will then work for HTTP/1 and H2 websocket tests)
Might as well do the TCP->HTTP changes in fewer places.
Risk Level: Low (test only)
Testing: websocket test still passes
Docs Changes: n/a
Release Notes: n/a