aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/core/end2end
diff options
context:
space:
mode:
Diffstat (limited to 'test/core/end2end')
-rw-r--r--test/core/end2end/fixtures/chttp2_socket_pair.c3
-rw-r--r--test/core/end2end/fixtures/chttp2_socket_pair_one_byte_at_a_time.c3
-rw-r--r--test/core/end2end/fixtures/chttp2_socket_pair_with_grpc_trace.c3
-rw-r--r--test/core/end2end/tests/request_response_with_payload_and_call_creds.c28
4 files changed, 34 insertions, 3 deletions
diff --git a/test/core/end2end/fixtures/chttp2_socket_pair.c b/test/core/end2end/fixtures/chttp2_socket_pair.c
index ec7541910e..a40f139442 100644
--- a/test/core/end2end/fixtures/chttp2_socket_pair.c
+++ b/test/core/end2end/fixtures/chttp2_socket_pair.c
@@ -62,7 +62,8 @@ static grpc_transport_setup_result server_setup_transport(
static grpc_channel_filter const *extra_filters[] = {
&grpc_http_server_filter};
return grpc_server_setup_transport(f->server, transport, extra_filters,
- GPR_ARRAY_SIZE(extra_filters), mdctx);
+ GPR_ARRAY_SIZE(extra_filters), mdctx,
+ grpc_server_get_channel_args(f->server));
}
typedef struct {
diff --git a/test/core/end2end/fixtures/chttp2_socket_pair_one_byte_at_a_time.c b/test/core/end2end/fixtures/chttp2_socket_pair_one_byte_at_a_time.c
index ac5fc40cc8..3d48b91af0 100644
--- a/test/core/end2end/fixtures/chttp2_socket_pair_one_byte_at_a_time.c
+++ b/test/core/end2end/fixtures/chttp2_socket_pair_one_byte_at_a_time.c
@@ -62,7 +62,8 @@ static grpc_transport_setup_result server_setup_transport(
static grpc_channel_filter const *extra_filters[] = {
&grpc_http_server_filter};
return grpc_server_setup_transport(f->server, transport, extra_filters,
- GPR_ARRAY_SIZE(extra_filters), mdctx);
+ GPR_ARRAY_SIZE(extra_filters), mdctx,
+ grpc_server_get_channel_args(f->server));
}
typedef struct {
diff --git a/test/core/end2end/fixtures/chttp2_socket_pair_with_grpc_trace.c b/test/core/end2end/fixtures/chttp2_socket_pair_with_grpc_trace.c
index bb292c6df7..907c61b4ae 100644
--- a/test/core/end2end/fixtures/chttp2_socket_pair_with_grpc_trace.c
+++ b/test/core/end2end/fixtures/chttp2_socket_pair_with_grpc_trace.c
@@ -63,7 +63,8 @@ static grpc_transport_setup_result server_setup_transport(
static grpc_channel_filter const *extra_filters[] = {
&grpc_http_server_filter};
return grpc_server_setup_transport(f->server, transport, extra_filters,
- GPR_ARRAY_SIZE(extra_filters), mdctx);
+ GPR_ARRAY_SIZE(extra_filters), mdctx,
+ grpc_server_get_channel_args(f->server));
}
typedef struct {
diff --git a/test/core/end2end/tests/request_response_with_payload_and_call_creds.c b/test/core/end2end/tests/request_response_with_payload_and_call_creds.c
index 0b461d09a1..a89b47e7b9 100644
--- a/test/core/end2end/tests/request_response_with_payload_and_call_creds.c
+++ b/test/core/end2end/tests/request_response_with_payload_and_call_creds.c
@@ -109,6 +109,23 @@ static void end_test(grpc_end2end_test_fixture *f) {
grpc_completion_queue_destroy(f->cq);
}
+static void print_auth_context(int is_client, const grpc_auth_context *ctx) {
+ const grpc_auth_property *p;
+ grpc_auth_property_iterator it;
+ gpr_log(GPR_INFO, "%s peer:", is_client ? "client" : "server");
+ gpr_log(GPR_INFO, "\tauthenticated: %s",
+ grpc_auth_context_peer_is_authenticated(ctx) ? "YES" : "NO");
+ it = grpc_auth_context_peer_identity(ctx);
+ while ((p = grpc_auth_property_iterator_next(&it)) != NULL) {
+ gpr_log(GPR_INFO, "\t\t%s: %s", p->name, p->value);
+ }
+ gpr_log(GPR_INFO, "\tall properties:");
+ it = grpc_auth_context_property_iterator(ctx);
+ while ((p = grpc_auth_property_iterator_next(&it)) != NULL) {
+ gpr_log(GPR_INFO, "\t\t%s: %s", p->name, p->value);
+ }
+}
+
static void test_call_creds_failure(grpc_end2end_test_config config) {
grpc_call *c;
grpc_credentials *creds = NULL;
@@ -157,6 +174,7 @@ static void request_response_with_payload_and_call_creds(
size_t details_capacity = 0;
int was_cancelled = 2;
grpc_credentials *creds = NULL;
+ const grpc_auth_context *s_auth_context = NULL;
c = grpc_channel_create_call(f.client, f.cq, "/foo",
"foo.test.google.fr", deadline);
@@ -211,10 +229,20 @@ static void request_response_with_payload_and_call_creds(
GPR_ASSERT(GRPC_CALL_OK == grpc_server_request_call(f.server, &s,
&call_details,
&request_metadata_recv,
+<<<<<<< HEAD
f.cq, f.cq,
tag(101)));
cq_expect_completion(cqv, tag(101), 1);
cq_verify(cqv);
+=======
+ f.server_cq, f.server_cq,
+ tag(101)));
+ cq_expect_completion(v_server, tag(101), 1);
+ cq_verify(v_server);
+ s_auth_context = grpc_call_auth_context(s);
+ GPR_ASSERT(s_auth_context != NULL);
+ print_auth_context(0, s_auth_context);
+>>>>>>> a2779c122ec3b2c3b6a475afa2ed18145d1f1b61
/* Cannot set creds on the server call object. */
GPR_ASSERT(grpc_call_set_credentials(s, NULL) != GRPC_CALL_OK);