@@ -326,11 +326,14 @@ int test_mtls_no_client_cert();
326326int test_mtls_no_client_key ();
327327int test_mtls_wrong_client_key ();
328328
329- static const test_case all_tests[] = {{" mtls-ok" , test_mtls_ok},
330- {" mtls-no-ca-cert" , test_mtls_no_ca_cert},
331- {" mtls-no-client-cert" , test_mtls_no_client_cert},
332- {" mtls-no-client-key" , test_mtls_no_client_key},
333- {" " , nullptr }};
329+ static const test_case all_tests[] = {
330+ #ifdef ENABLE_OTLP_GRPC_SSL_MTLS_PREVIEW
331+ {" mtls-ok" , test_mtls_ok},
332+ {" mtls-no-ca-cert" , test_mtls_no_ca_cert},
333+ {" mtls-no-client-cert" , test_mtls_no_client_cert},
334+ {" mtls-no-client-key" , test_mtls_no_client_key},
335+ #endif // ENABLE_OTLP_GRPC_SSL_MTLS_PREVIEW
336+ {" " , nullptr }};
334337
335338void list_test_cases ()
336339{
@@ -454,6 +457,7 @@ int expect_export_failed()
454457 return TEST_FAILED;
455458}
456459
460+ #ifdef ENABLE_OTLP_GRPC_SSL_MTLS_PREVIEW
457461int test_mtls_ok ()
458462{
459463 otlp::OtlpGrpcExporterOptions opts;
@@ -586,3 +590,4 @@ int test_mtls_no_client_key()
586590
587591 return expect_connection_failed ();
588592}
593+ #endif // ENABLE_OTLP_GRPC_SSL_MTLS_PREVIEW
0 commit comments