aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/cpp/end2end/interceptors_util.cc
diff options
context:
space:
mode:
authorGravatar Yash Tibrewal <yashkt@google.com>2019-01-04 15:18:07 -0800
committerGravatar GitHub <noreply@github.com>2019-01-04 15:18:07 -0800
commit84742e565ae7f34722b8907dd4fa5f2bdb8560bb (patch)
treee24523cba5502fb92437912cf11a82364649fefe /test/cpp/end2end/interceptors_util.cc
parent89f7d619ef23e400e36f8906876a2633d943847e (diff)
parent6fc7adf2772507b0e3596ebf20c2cfaef589e52d (diff)
Merge pull request #17608 from yashykt/bidiinterceptiontest
Add client interceptor test for bidi streaming hijacking interceptor
Diffstat (limited to 'test/cpp/end2end/interceptors_util.cc')
-rw-r--r--test/cpp/end2end/interceptors_util.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/cpp/end2end/interceptors_util.cc b/test/cpp/end2end/interceptors_util.cc
index e0ad7d1526..900f02b5f3 100644
--- a/test/cpp/end2end/interceptors_util.cc
+++ b/test/cpp/end2end/interceptors_util.cc
@@ -132,6 +132,16 @@ bool CheckMetadata(const std::multimap<grpc::string_ref, grpc::string_ref>& map,
return false;
}
+bool CheckMetadata(const std::multimap<grpc::string, grpc::string>& map,
+ const string& key, const string& value) {
+ for (const auto& pair : map) {
+ if (pair.first == key && pair.second == value) {
+ return true;
+ }
+ }
+ return false;
+}
+
std::vector<std::unique_ptr<experimental::ClientInterceptorFactoryInterface>>
CreateDummyClientInterceptors() {
std::vector<std::unique_ptr<experimental::ClientInterceptorFactoryInterface>>