aboutsummaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorGravatar apolcyn <apolcyn@google.com>2018-07-16 11:43:04 -0700
committerGravatar GitHub <noreply@github.com>2018-07-16 11:43:04 -0700
commit5fec6640e0111dfe546f53da73022f87812b4922 (patch)
tree48b64fc77ee069051eb0a6d7c3fa3e48be4baa77 /test
parentd7fe925727b5201dd62aa9464c1685c474bbb4c8 (diff)
parentf3c3c55fade4a0f47145732a5b4a0a03f0ddfc83 (diff)
Merge pull request #16024 from apolcyn/gcd_interop
Allow choosing google default credentials in the C++ interop clients
Diffstat (limited to 'test')
-rw-r--r--test/cpp/util/test_credentials_provider.cc2
-rw-r--r--test/cpp/util/test_credentials_provider.h1
2 files changed, 3 insertions, 0 deletions
diff --git a/test/cpp/util/test_credentials_provider.cc b/test/cpp/util/test_credentials_provider.cc
index c8b0ac73f4..0cf75f1e5f 100644
--- a/test/cpp/util/test_credentials_provider.cc
+++ b/test/cpp/util/test_credentials_provider.cc
@@ -63,6 +63,8 @@ class DefaultCredentialsProvider : public CredentialsProvider {
SslCredentialsOptions ssl_opts = {test_root_cert, "", ""};
args->SetSslTargetNameOverride("foo.test.google.fr");
return SslCredentials(ssl_opts);
+ } else if (type == grpc::testing::kGoogleDefaultCredentialsType) {
+ return grpc::GoogleDefaultCredentials();
} else {
std::unique_lock<std::mutex> lock(mu_);
auto it(std::find(added_secure_type_names_.begin(),
diff --git a/test/cpp/util/test_credentials_provider.h b/test/cpp/util/test_credentials_provider.h
index b1d69e893d..0bc910dbc0 100644
--- a/test/cpp/util/test_credentials_provider.h
+++ b/test/cpp/util/test_credentials_provider.h
@@ -33,6 +33,7 @@ const char kInsecureCredentialsType[] = "INSECURE_CREDENTIALS";
// property "transport_security_type".
const char kTlsCredentialsType[] = "ssl";
const char kAltsCredentialsType[] = "alts";
+const char kGoogleDefaultCredentialsType[] = "google_default_credentials";
// Provide test credentials of a particular type.
class CredentialTypeProvider {