aboutsummaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorGravatar donnadionne <donnadionne2011@gmail.com>2015-02-06 10:29:47 -0800
committerGravatar donnadionne <donnadionne2011@gmail.com>2015-02-06 10:29:47 -0800
commit15867f197b55d489677ec0dfdba9bd1d9246eceb (patch)
tree871ce22a971ae23ea69eafe40f22f6105af76301 /test
parent318eec1e7d0d07b4fb2ba28f31a659aa58436da9 (diff)
parent48d80e57698fe3d2a8b850c02782724e37a25418 (diff)
Merge pull request #417 from yang-g/docker
Use environment variable to set root certs in c++ interop test
Diffstat (limited to 'test')
-rw-r--r--test/cpp/util/create_test_channel.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/cpp/util/create_test_channel.cc b/test/cpp/util/create_test_channel.cc
index a521162bea..301e9a3c3a 100644
--- a/test/cpp/util/create_test_channel.cc
+++ b/test/cpp/util/create_test_channel.cc
@@ -45,6 +45,8 @@ namespace grpc {
// override_hostname is provided.
// When ssl is not enabled, override_hostname is ignored.
// Set use_prod_root to true to use the SSL root for connecting to google.
+// In this case, path to the roots pem file must be set via environment variable
+// GRPC_DEFAULT_SSL_ROOTS_FILE_PATH.
// Otherwise, root for test SSL cert will be used.
// creds will be used to create a channel when enable_ssl is true.
// Use examples:
@@ -60,7 +62,7 @@ std::shared_ptr<ChannelInterface> CreateTestChannel(
ChannelArguments channel_args;
if (enable_ssl) {
const char* roots_certs =
- use_prod_roots ? prod_roots_certs : test_root_cert;
+ use_prod_roots ? "" : test_root_cert;
SslCredentialsOptions ssl_opts = {roots_certs, "", ""};
std::unique_ptr<Credentials> channel_creds =