end2end_tests.h
Go to the documentation of this file.
1 /*
2  *
3  * Copyright 2015 gRPC authors.
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  */
18 
19 #ifndef GRPC_TEST_CORE_END2END_END2END_TESTS_H
20 #define GRPC_TEST_CORE_END2END_END2END_TESTS_H
21 
22 #include <grpc/grpc.h>
23 
26 
27 /* Test feature flags. */
28 #define FEATURE_MASK_SUPPORTS_DELAYED_CONNECTION 1
29 #define FEATURE_MASK_SUPPORTS_HOSTNAME_VERIFICATION 2
30 // Feature mask supports call credentials with a minimum security level of
31 // GRPC_PRIVACY_AND_INTEGRITY.
32 #define FEATURE_MASK_SUPPORTS_PER_CALL_CREDENTIALS 4
33 // Feature mask supports call credentials with a minimum security level of
34 // GRPC_SECURTITY_NONE.
35 #define FEATURE_MASK_SUPPORTS_PER_CALL_CREDENTIALS_LEVEL_INSECURE 8
36 #define FEATURE_MASK_SUPPORTS_REQUEST_PROXYING 16
37 #define FEATURE_MASK_SUPPORTS_CLIENT_CHANNEL 32
38 #define FEATURE_MASK_SUPPORTS_AUTHORITY_HEADER 64
39 #define FEATURE_MASK_DOES_NOT_SUPPORT_RESOURCE_QUOTA_SERVER 128
40 #define FEATURE_MASK_DOES_NOT_SUPPORT_NETWORK_STATUS_CHANGE 256
41 #define FEATURE_MASK_SUPPORTS_WORKAROUNDS 512
42 #define FEATURE_MASK_DOES_NOT_SUPPORT_CLIENT_HANDSHAKE_COMPLETE_FIRST 1024
43 
44 #define FAIL_AUTH_CHECK_SERVER_ARG_NAME "fail_auth_check"
45 
50  void* fixture_data;
51 };
52 
54  /* A descriptive name for this test fixture. */
55  const char* name;
56 
57  /* Which features are supported by this fixture. See feature flags above. */
59 
60  /* If the call host is setup by the fixture (for example, via the
61  * GRPC_SSL_TARGET_NAME_OVERRIDE_ARG channel arg), which value should the test
62  * expect to find in call_details.host */
63  const char* overridden_call_host;
64 
66  const grpc_channel_args* client_args,
67  const grpc_channel_args* server_args);
69  const grpc_channel_args* client_args);
71  const grpc_channel_args* server_args);
73 };
74 
76 void grpc_end2end_tests(int argc, char** argv, grpc_end2end_test_config config);
77 
78 const char* get_host_override_string(const char* str,
80 /* Returns a pointer to a statically allocated slice: future invocations
81  overwrite past invocations, not threadsafe, etc... */
82 const grpc_slice* get_host_override_slice(const char* str,
84 
87 
88 #endif /* GRPC_TEST_CORE_END2END_END2END_TESTS_H */
xds_interop_client.str
str
Definition: xds_interop_client.py:487
check_tracer_sanity.pattern
pattern
Definition: check_tracer_sanity.py:25
grpc_end2end_test_config::init_client
void(* init_client)(grpc_end2end_test_fixture *f, const grpc_channel_args *client_args)
Definition: end2end_tests.h:68
grpc_end2end_tests_pre_init
void grpc_end2end_tests_pre_init(void)
Definition: end2end_tests.cc:221
get_host_override_string
const char * get_host_override_string(const char *str, grpc_end2end_test_config config)
Definition: end2end_test_utils.cc:25
grpc_end2end_test_config::overridden_call_host
const char * overridden_call_host
Definition: end2end_tests.h:63
grpc_end2end_test_config
Definition: end2end_tests.h:53
grpc_end2end_test_config::name
const char * name
Definition: end2end_tests.h:55
grpc_channel_args
Definition: grpc_types.h:132
grpc_end2end_test_fixture
struct grpc_end2end_test_fixture grpc_end2end_test_fixture
Definition: end2end_tests.h:24
grpc_end2end_test_fixture
Definition: end2end_tests.h:46
uint32_t
unsigned int uint32_t
Definition: stdint-msvc2008.h:80
grpc_end2end_tests
void grpc_end2end_tests(int argc, char **argv, grpc_end2end_test_config config)
Definition: end2end_tests.cc:321
grpc_end2end_test_fixture::cq
grpc_completion_queue * cq
Definition: end2end_tests.h:47
autogen_x86imm.f
f
Definition: autogen_x86imm.py:9
validate_host_override_string
void validate_host_override_string(const char *pattern, grpc_slice str, grpc_end2end_test_config config)
Definition: end2end_test_utils.cc:45
grpc_completion_queue
Definition: completion_queue.cc:347
grpc.h
grpc_slice
Definition: include/grpc/impl/codegen/slice.h:65
grpc_server
struct grpc_server grpc_server
Definition: grpc_types.h:65
grpc_end2end_test_fixture::fixture_data
void * fixture_data
Definition: end2end_tests.h:50
grpc_end2end_test_config::tear_down_data
void(* tear_down_data)(grpc_end2end_test_fixture *f)
Definition: end2end_tests.h:72
grpc_channel
struct grpc_channel grpc_channel
Definition: grpc_types.h:62
config_s
Definition: bloaty/third_party/zlib/deflate.c:120
grpc_end2end_test_config::create_fixture
grpc_end2end_test_fixture(* create_fixture)(const grpc_channel_args *client_args, const grpc_channel_args *server_args)
Definition: end2end_tests.h:65
get_host_override_slice
const grpc_slice * get_host_override_slice(const char *str, grpc_end2end_test_config config)
Definition: end2end_test_utils.cc:34
grpc_end2end_test_fixture::server
grpc_server * server
Definition: end2end_tests.h:48
grpc_end2end_test_fixture::client
grpc_channel * client
Definition: end2end_tests.h:49
grpc_end2end_test_config::init_server
void(* init_server)(grpc_end2end_test_fixture *f, const grpc_channel_args *server_args)
Definition: end2end_tests.h:70
grpc_end2end_test_config::feature_mask
uint32_t feature_mask
Definition: end2end_tests.h:58


grpc
Author(s):
autogenerated on Thu Mar 13 2025 02:59:15