add assert in immutable config provider constructor to make sure…#6878
add assert in immutable config provider constructor to make sure…#6878htuch merged 5 commits intoenvoyproxy:masterfrom
Conversation
…rect instance type gets set Signed-off-by: Xin Zhuang <stevenzzz@google.com>
|
@AndresGuedez PTAL. |
AndresGuedez
left a comment
There was a problem hiding this comment.
Thanks for the cleanup. A test would be great :- )
Signed-off-by: Xin Zhuang <stevenzzz@google.com>
|
Added a test. |
AndresGuedez
left a comment
There was a problem hiding this comment.
LGTM modulo outstanding comment regarding test suite name. Thanks!
| const Protobuf::Message* getConfigProto() const override { return nullptr; } | ||
| }; | ||
|
|
||
| TEST_F(ConfigProviderImplTest, AssertionFailureOnIncorrectInstanceType) { |
There was a problem hiding this comment.
The test suite should be suffixed with DeathTest per https://github.com/google/googletest/blob/master/googletest/docs/advanced.md#death-test-naming.
AndresGuedez
left a comment
There was a problem hiding this comment.
Undo LGTM. Please check test failure.
Signed-off-by: Xin Zhuang <stevenzzz@google.com>
| ConfigProviderInstanceType::Inline); | ||
| InlineDummyConfigProvider bar(factory_context_, *provider_manager_, | ||
| ConfigProviderInstanceType::Static); | ||
| EXPECT_DEATH(InlineDummyConfigProvider(factory_context_, *provider_manager_, |
There was a problem hiding this comment.
This needs to use EXPECT_DEBUG_DEATH().
Signed-off-by: Xin Zhuang <stevenzzz@google.com>
|
This pull request has been automatically marked as stale because it has not had activity in the last 7 days. It will be closed in 7 days if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions! |
Signed-off-by: Xin Zhuang <stevenzzz@google.com>
|
@htuch could you please give it a stamp. |
… correct instance type gets set
Signed-off-by: Xin Zhuang stevenzzz@google.com
For an explanation of how to fill out the fields, please see the relevant section
in PULL_REQUESTS.md
Description: add asserts in ImmutableConfigProviderBase too make sure correct instance type gets passed in.
Risk Level: LOW
Testing:
Docs Changes:
Release Notes:
[Optional Fixes #Issue]
[Optional Deprecated:]