Skip to content

tracer: Improve test coverage for x-ray#10890

Merged
mattklein123 merged 5 commits intoenvoyproxy:masterfrom
marcomagdy:xray-tests
Apr 23, 2020
Merged

tracer: Improve test coverage for x-ray#10890
mattklein123 merged 5 commits intoenvoyproxy:masterfrom
marcomagdy:xray-tests

Conversation

@marcomagdy
Copy link
Contributor

  • Removed unused functions that were showing up untested
  • Renamed a function to match the style guide
  • Small refactor (now that I understand how to use buffers)
  • Added a test that exercises the sending bytes to the x-ray daemon

Risk Level: low
Testing: unit tests
Docs Changes: N/A
Release Notes: N/A

Signed-off-by: Marco Magdy <mmagdy@gmail.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. LMK when this is ready for review.

/wait

@marcomagdy marcomagdy marked this pull request as ready for review April 22, 2020 20:41
Signed-off-by: Marco Magdy <mmagdy@gmail.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.

Thanks for working on this.

/wait

Signed-off-by: Marco Magdy <mmagdy@gmail.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.

Thanks for working on the tests, one comment.

/wait

Signed-off-by: Marco Magdy <mmagdy@gmail.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.

Thanks LGTM with a small comment.

/wait


TEST(XRayDaemon, VerifyUdpPacketContents) {
NiceMock<Server::MockInstance> server;
Network::Test::UdpSyncPeer xray_fake_daemon(Network::Address::IpVersion::v4);
Copy link
Member

Choose a reason for hiding this comment

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

Apologies but this needs to be parameterized on the supported IP types, as some people don't support v4 or run tests there. Please see the UDP example again for how to do this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No problem. I'm learning a lot this way.

Signed-off-by: Marco Magdy <mmagdy@gmail.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.

Thanks!

@mattklein123 mattklein123 merged commit 5dcfa7b into envoyproxy:master Apr 23, 2020
@marcomagdy marcomagdy deleted the xray-tests branch April 23, 2020 22:37
spenceral added a commit to spenceral/envoy that referenced this pull request Apr 27, 2020
Signed-off-by: Spencer Lewis <slewis@squareup.com>

* master:
  fault injection: add support for setting gRPC status (envoyproxy#10841)
  tests: tag tests that fail on Windows with fails_on_windows (envoyproxy#10940)
  Fix typo on Postgres Proxy documentation. (envoyproxy#10930)
  fuzz: improve header/data stop/continue modeling in HCM fuzzer. (envoyproxy#10931)
  gzip filter: allow setting zlib compressor's chunk size (envoyproxy#10508)
  http: replace vector/reserve with InlinedVector in codec helper (envoyproxy#10941)
  stats: add utilities to create stats from a vector of tokens, mixing dynamic and symbolic elements. (envoyproxy#10735)
  hcm: avoid invoking 100-continue handling on decode filter. (envoyproxy#10929)
  prometheus stats: Correctly group lines of the same metric name. (envoyproxy#10833)
  status: Fix ASAN error in Status payload handling (envoyproxy#10906)
  path: Fix merge slash for paths ending with slash and present query args (envoyproxy#10922)
  compressor filter: add benchmark (envoyproxy#10464)
  xray: expected_span_name is not captured by the lambda with MSVC (envoyproxy#10934)
  ci: update before purge in cleanup (envoyproxy#10938)
  tracer: Improve test coverage for x-ray (envoyproxy#10890)
  Revert "init: order dynamic resource initialization to make RTDS always be first (envoyproxy#10362)" (envoyproxy#10919)
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.

2 participants