-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Moving more tests over to the v2 API #2204
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -233,6 +233,17 @@ class TestHeaderMapImpl : public HeaderMapImpl { | |
| TestHeaderMapImpl(const std::initializer_list<std::pair<std::string, std::string>>& values); | ||
| TestHeaderMapImpl(const HeaderMap& rhs); | ||
|
|
||
| friend std::ostream& operator<<(std::ostream& os, const TestHeaderMapImpl& p) { | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Wherever you found this useful, I think if you included printers.h it would "just work" without this change. I've never found a great way of dealing with the existence of printers.h. I almost would prefer to auto include it in all tests. Worth exploring?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh interesting. I was wondering what was up with printers.h Unfortunately that fix doesn't seem to work for my use case. Am I doing something wrong? test/integration/cors_filter_integration_test.cc:90: Failure Expected equality of these values:
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hmm. TBH I have no idea off the top of my head. I would think that printers.h
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please add any details you think would be helpful! |
||
| p.iterate( | ||
| [](const HeaderEntry& header, void* context) -> HeaderMap::Iterate { | ||
| std::ostream* local_os = static_cast<std::ostream*>(context); | ||
| *local_os << header.key().c_str() << " " << header.value().c_str() << std::endl; | ||
| return HeaderMap::Iterate::Continue; | ||
| }, | ||
| &os); | ||
| return os; | ||
| } | ||
|
|
||
| using HeaderMapImpl::addCopy; | ||
| void addCopy(const std::string& key, const std::string& value); | ||
| std::string get_(const std::string& key); | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the one functional change I'm unsure about. Hadn't tracked down the cause.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm guessing it's because server.json has CDS setup but there is no version info yet. This raises a point that for better or worse server.json has a bunch of random stuff in it mainly just to make sure that basic config elements don't break even if there is no usable upstream CDS server, stats backend, etc. We should try to make sure that we don't lose this "coverage."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I'm not sure I'm understanding the ask here.
Are you asking that the utility class preserve standard things like health checking + admin config from server.json rather than the relevant tests adding them, or something else?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not really asking for anything. I was just making a comment that there is some test coverage that we had gained from the server.json file that we may lose with the simplistic basic config template and targeted additions we are now using for v2 tests (as seen by this delta). It would be worth an audit of the delta to see if we are losing anything and want to bring any of it back in a targeted "sanity test" of random features. We can do this in follow ups...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahhh, so we're missing coverage of config loading if those features aren't explicitly tested. Sure I'll take a look at what's missing once I get the rest of the tests moved over.