aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/core/end2end/cq_verifier.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/core/end2end/cq_verifier.c')
-rw-r--r--test/core/end2end/cq_verifier.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/core/end2end/cq_verifier.c b/test/core/end2end/cq_verifier.c
index 77afe588d7..5f1a33242e 100644
--- a/test/core/end2end/cq_verifier.c
+++ b/test/core/end2end/cq_verifier.c
@@ -107,6 +107,14 @@ int contains_metadata(grpc_metadata_array *array, const char *key,
return has_metadata(array->metadata, array->count, key, value);
}
+int contains_metadata_key(grpc_metadata_array *array, const char *key) {
+ for (size_t i = 0; i < array->count; ++i) {
+ if (strcmp(array->metadata[i].key, key) == 0)
+ return 1;
+ }
+ return 0;
+}
+
static gpr_slice merge_slices(gpr_slice *slices, size_t nslices) {
size_t i;
size_t len = 0;