Skip to content

redis: basic integration test for redis_proxy#6450

Merged
mattklein123 merged 4 commits intoenvoyproxy:masterfrom
HenryYYang:msukalski/redis-integration-test
Apr 4, 2019
Merged

redis: basic integration test for redis_proxy#6450
mattklein123 merged 4 commits intoenvoyproxy:masterfrom
HenryYYang:msukalski/redis-integration-test

Conversation

@msukalski
Copy link
Contributor

  • added a basic integration test for redis_proxy that sends
    a basic request and response between "client" and "server",
    and another that sends an invalid request (and receives the
    appropriate error in response)

  • plumbed bazel size option through envoy_cc_test() definition
    (optional, default is "medium" as per bazel specification) so tests
    can avoid timeout warnings; redis_proxy test set to size "small"

Signed-off-by: Mitch Sukalski mitch.sukalski@workday.com

For an explanation of how to fill out the fields, please see the relevant section
in PULL_REQUESTS.md

Description:

added a basic integration test for redis_proxy that sends
a basic request and response between "client" and "server",
and another that sends an invalid request (and receives the
appropriate error in response)

Risk Level: low
Testing: new integration test
Docs Changes: none
Release Notes: none
[Optional Fixes #Issue]
[Optional Deprecated:]

- added a basic integration test for redis_proxy that sends
a basic request and response between "client" and "server",
and another that sends an invalid request (and receives the
appropriate error in response)

- plumbed bazel size option through envoy_cc_test() definition
(optional, default is "medium") so tests can avoid timeout
warnings; redis_proxy test set to size "small"

Signed-off-by: Mitch Sukalski <mitch.sukalski@workday.com>
@msukalski
Copy link
Contributor Author

@maximebedard, @HenryYYang, @FAYiEKcbD0XFqF2QK2E4viAHg8rMm2VbjYKdjTg, and @mattklein123 here's the basic redis integration test, as promised.

@maximebedard
Copy link
Contributor

Tested locally with the problematic branch:

$ git checkout msukalski/redis-integration-test
$ bazel test //test/integration:redis_proxy_integration_test
# ...
INFO: Build completed successfully, 1984 total actions
//test/integration:redis_proxy_integration_test                          PASSED in 0.5s
$ git merge redis-prefixed-key-routing-take-2 # original branch + fix
$ bazel test //test/integration:redis_proxy_integration_test
# ...
INFO: Build completed successfully, 166 total actions
//test/integration:redis_proxy_integration_test                          PASSED in 0.5s
$ git revert 41d9b4dd0de4cf1c6d4d2cdf12da8998dbddad03 # commit that fixes the segfault we had last week
# ...
INFO: Build completed, 1 test FAILED, 2 total actions
//test/integration:redis_proxy_integration_test                          FAILED in 0.3s

@mattklein123
Copy link
Member

@HenryYYang @FAYiEKcbD0XFqF2QK2E4viAHg8rMm2VbjYKdjTg please take first pass.

@mattklein123 mattklein123 self-assigned this Apr 1, 2019
@HenryYYang
Copy link
Contributor

Just a though, maybe it's better to not take a dependency on the encoder and decoder in the integration test. If we use the raw request/response strings here, we can catch the bugs in the encoder/decoder also.

@mattklein123
Copy link
Member

Just a though, maybe it's better to not take a dependency on the encoder and decoder in the integration test. If we use the raw request/response strings here, we can catch the bugs in the encoder/decoder also.

+1, I think given how simple the text protocol is might be worth doing it this way.

@FAYiEKcbD0XFqF2QK2E4viAHg8rMm2VbjYKdjTg
Copy link
Contributor

+1 on Henry's comment. I would prefer to keep this as stripped down as possible and treat our redis code as a black box.

Signed-off-by: Mitch Sukalski <mitch.sukalski@workday.com>
@msukalski
Copy link
Contributor Author

@mattklein123 , @FAYiEKcbD0XFqF2QK2E4viAHg8rMm2VbjYKdjTg , and @HenryYYang -- the test is now stripped down.

Copy link
Member

@mattklein123 mattklein123 left a comment

Choose a reason for hiding this comment

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

Thatnks a TON for adding this. A few small comments. Yay!

/wait

Signed-off-by: Mitch Sukalski <mitch.sukalski@workday.com>
mattklein123
mattklein123 previously approved these changes Apr 3, 2019
Copy link
Member

@mattklein123 mattklein123 left a comment

Choose a reason for hiding this comment

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

Amazing! Thank you so much this is going to be super helpful for trusting all the changes we are adding now.

Signed-off-by: Mitch Sukalski <mitch.sukalski@workday.com>
Copy link
Member

@mattklein123 mattklein123 left a comment

Choose a reason for hiding this comment

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

Thank you!

@mattklein123 mattklein123 merged commit b84c1f9 into envoyproxy:master Apr 4, 2019
@msukalski
Copy link
Contributor Author

You're welcome!

@msukalski msukalski deleted the msukalski/redis-integration-test branch April 4, 2019 16:55
msukalski added a commit to HenryYYang/envoy that referenced this pull request Apr 6, 2019
- augmented the redis_proxy integration test for numerous
positive and negative redirection scenarios

- fixed ConfigHelper constructor for proper IPv4 and IPv4
address modification when multiple hosts or endpoints are
defined

- fixed ClientImpl::onRespValue() logic

- address all sort of review feedback

Signed-off-by: Mitch Sukalski <mitch.sukalski@workday.com>
msukalski added a commit to HenryYYang/envoy that referenced this pull request Apr 6, 2019
Signed-off-by: Mitch Sukalski <mitch.sukalski@workday.com>
mpuncel added a commit to mpuncel/envoy that referenced this pull request Apr 8, 2019
* master: (137 commits)
  test: router upstream log to v2 config stubs (envoyproxy#6499)
  remove idle timeout validation (envoyproxy#6500)
  build: Change namespace of chromium_url. (envoyproxy#6506)
  coverage: exclude chromium_url (envoyproxy#6498)
  fix(tracing): allow 256 chars in path tag (envoyproxy#6492)
  Common: Introduce StopAllIteration filter status for decoding and encoding filters (envoyproxy#5954)
  build: update PGV url (envoyproxy#6495)
  subset lb: avoid partitioning host lists on worker threads (envoyproxy#6302)
  ci: Make envoy_select_quiche no-op. (envoyproxy#6393)
  watcher: notify when watched files are modified (envoyproxy#6215)
  stat: Add counterFromStatName(), gaugeFromStatName(), and histogramFromStatName() (envoyproxy#6475)
  bump to 1.11.0-dev (envoyproxy#6490)
  release: bump to 1.10.0 (envoyproxy#6489)
  hcm: path normalization. (#1)
  build: import manually minified Chrome URL lib. (envoyproxy#3)
  codec: reject embedded NUL in headers. (envoyproxy#2)
  Added veryfication if path contains query params and add them to path header (envoyproxy#6466)
  redis: basic integration test for redis_proxy (envoyproxy#6450)
  stats: report sample count as an integer to prevent loss of precision (envoyproxy#6274)
  Added VHDS protobuf message and updated RouteConfig to include it. (envoyproxy#6418)
  ...

Signed-off-by: Michael Puncel <mpuncel@squareup.com>
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.

5 participants