From 3b2d300f8ae4777c6989bfc2f7d4b766be4716b4 Mon Sep 17 00:00:00 2001 From: Lalit Kumar Bhasin Date: Mon, 26 Jul 2021 10:22:59 +0530 Subject: [PATCH] unset env in test --- exporters/otlp/test/otlp_grpc_exporter_test.cc | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/exporters/otlp/test/otlp_grpc_exporter_test.cc b/exporters/otlp/test/otlp_grpc_exporter_test.cc index 83201ec1a2..13acd5b9ce 100644 --- a/exporters/otlp/test/otlp_grpc_exporter_test.cc +++ b/exporters/otlp/test/otlp_grpc_exporter_test.cc @@ -147,6 +147,17 @@ TEST_F(OtlpGrpcExporterTestPeer, ConfigFromEnv) EXPECT_EQ(GetOptions(exporter).ssl_credentials_cacert_as_string, cacert_str); EXPECT_EQ(GetOptions(exporter).use_ssl_credentials, true); EXPECT_EQ(GetOptions(exporter).endpoint, endpoint); +# if defined(_MSC_VER) + putenv("OTEL_EXPORTER_OTLP_GRPC_ENDPOINT="); + putenv("OTEL_EXPORTER_OTLP_GRPC_SSL_CERTIFICATE="); + putenv("OTEL_EXPORTER_OTLP_GRPC_SSL_ENABLE="); + +# else + unsetenv("OTEL_EXPORTER_OTLP_GRPC_ENDPOINT"); + unsetenv("OTEL_EXPORTER_OTLP_GRPC_SSL_CERTIFICATE"); + unsetenv("OTEL_EXPORTER_OTLP_GRPC_SSL_ENABLE"); + +# endif } # endif