Skip to content

test: Adds an integration test for SDS#2395

Merged
alyssawilk merged 7 commits intoenvoyproxy:mainfrom
abeyad:sds_integ_test
Jun 29, 2022
Merged

test: Adds an integration test for SDS#2395
alyssawilk merged 7 commits intoenvoyproxy:mainfrom
abeyad:sds_integ_test

Conversation

@abeyad
Copy link
Contributor

@abeyad abeyad commented Jun 28, 2022

As part of this change, common xDS test functionality has been factored
out into the XdsIntegrationTest class, and both the SdsIntegrationTest
and RtdsIntegrationTest subclass XdsIntegrationTest. Future xDS
integration tests should also subclass the XdsIntegrationTest to get the
common functionality and setup.

Signed-off-by: Ali Beyad abeyad@google.com

As part of this change, common xDS test functionality has been factored
out into the XdsIntegrationTest class, and both the SdsIntegrationTest
and RtdsIntegrationTest subclass XdsIntegrationTest.  Future xDS
integration tests should also subclass the XdsIntegrationTest to get the
common functionality and setup.

Signed-off-by: Ali Beyad <abeyad@google.com>
@abeyad
Copy link
Contributor Author

abeyad commented Jun 28, 2022

cc @alyssawilk

abeyad added 2 commits June 28, 2022 13:52
Signed-off-by: Ali Beyad <abeyad@google.com>
Signed-off-by: Ali Beyad <abeyad@google.com>
Copy link
Contributor

@alyssawilk alyssawilk left a comment

Choose a reason for hiding this comment

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

wohoo!! exciting@!

abeyad added 2 commits June 28, 2022 16:15
Signed-off-by: Ali Beyad <abeyad@google.com>
Signed-off-by: Ali Beyad <abeyad@google.com>
Copy link
Contributor

@alyssawilk alyssawilk left a comment

Choose a reason for hiding this comment

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

Looking good! Sorry I missed a bunch of things yesterday, but I think this is about it for alyssa-nits!

Signed-off-by: Ali Beyad <abeyad@google.com>
@abeyad
Copy link
Contributor Author

abeyad commented Jun 29, 2022

I pushed a commit addressing the feedback, PTAL!

Copy link
Contributor

@alyssawilk alyssawilk left a comment

Choose a reason for hiding this comment

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

ah I think other tests just pass the getParam into the base class but I'm fine with improved readability. Just the one nit and you're good to go!

Copy link
Contributor

@RyanTheOptimist RyanTheOptimist left a comment

Choose a reason for hiding this comment

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

sigh I meant to send these yesterday but forgot to click send. sigh

using ::testing::AssertionResult;
using ::testing::AssertionSuccess;

XdsIntegrationTest::XdsIntegrationTest() : BaseClientIntegrationTest(ipVersion()) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there an easy way to see what in this file is new, and what is a copy from test/common/integration/rtds_integration_test.cc?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Unfortunately I don't think so :(
I should've done a git cp instead of creating the file from scratch.


void addRuntimeRtdsConfig() {
// Add the layered runtime config, which includes the RTDS layer.
RtdsIntegrationTest() : XdsIntegrationTest() {
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: Is the ": XdsIntegrationTest()" required, or does C++ magically do the right thing without it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

C++ does the right thing since it's a zero arg constructor so it automatically calls the parent class' zero-arg constructor. I removed the explicit call.

Signed-off-by: Ali Beyad <abeyad@google.com>
Copy link
Contributor Author

@abeyad abeyad left a comment

Choose a reason for hiding this comment

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

Pushed a commit addressing the latest round of feedback.


void addRuntimeRtdsConfig() {
// Add the layered runtime config, which includes the RTDS layer.
RtdsIntegrationTest() : XdsIntegrationTest() {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

C++ does the right thing since it's a zero arg constructor so it automatically calls the parent class' zero-arg constructor. I removed the explicit call.

using ::testing::AssertionResult;
using ::testing::AssertionSuccess;

XdsIntegrationTest::XdsIntegrationTest() : BaseClientIntegrationTest(ipVersion()) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Unfortunately I don't think so :(
I should've done a git cp instead of creating the file from scratch.

Copy link
Contributor

@RyanTheOptimist RyanTheOptimist left a comment

Choose a reason for hiding this comment

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

LGTM (though it's annoying that github doesn't help make it easy to see some of changes. sigh :>)

@alyssawilk alyssawilk merged commit 581ba40 into envoyproxy:main Jun 29, 2022
jpsim added a commit that referenced this pull request Jul 5, 2022
* origin/main:
  Update Envoy (#2403)
  connectivity_manager: rename/refactor from Network::Configurator (#2401)
  test: fixing up build targets to use the extension registry (#2397)
  test: Adds an integration test for SDS (#2395)
  iOS: add `forceIPv6(...)` builder option (#2396)
  api: make iOS Headers and HeadersBuilder case-insensitive (#2383)

Signed-off-by: JP Simard <jp@jpsim.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.

3 participants