diff options
author | Yihua Zhang <yihuaz@google.com> | 2018-08-10 11:31:15 -0700 |
---|---|---|
committer | Yihua Zhang <yihuaz@google.com> | 2018-08-10 11:31:15 -0700 |
commit | f621eee4cf102482703c188f0bf0ab97c0781175 (patch) | |
tree | b4afd1c965ce1fac0470eefabfe5fb3ca92a7d55 /test/cpp/interop | |
parent | 23d7ea43e6777ca153a7e0325484cf1722995a69 (diff) |
run cloud-to-prod interop tests with google default credentials
Diffstat (limited to 'test/cpp/interop')
-rw-r--r-- | test/cpp/interop/client_helper.cc | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/test/cpp/interop/client_helper.cc b/test/cpp/interop/client_helper.cc index 29b5a1ed6c..fb7b7bb7d0 100644 --- a/test/cpp/interop/client_helper.cc +++ b/test/cpp/interop/client_helper.cc @@ -88,20 +88,20 @@ std::shared_ptr<Channel> CreateChannelForTestCase( std::shared_ptr<CallCredentials> creds; if (test_case == "compute_engine_creds") { - GPR_ASSERT(FLAGS_use_tls); - creds = GoogleComputeEngineCredentials(); - GPR_ASSERT(creds); + creds = FLAGS_custom_credentials_type == "google_default_credentials" + ? nullptr + : GoogleComputeEngineCredentials(); } else if (test_case == "jwt_token_creds") { - GPR_ASSERT(FLAGS_use_tls); grpc::string json_key = GetServiceAccountJsonKey(); std::chrono::seconds token_lifetime = std::chrono::hours(1); - creds = - ServiceAccountJWTAccessCredentials(json_key, token_lifetime.count()); - GPR_ASSERT(creds); + creds = FLAGS_custom_credentials_type == "google_default_credentials" + ? nullptr + : ServiceAccountJWTAccessCredentials(json_key, + token_lifetime.count()); } else if (test_case == "oauth2_auth_token") { - grpc::string raw_token = GetOauth2AccessToken(); - creds = AccessTokenCredentials(raw_token); - GPR_ASSERT(creds); + creds = FLAGS_custom_credentials_type == "google_default_credentials" + ? nullptr + : AccessTokenCredentials(GetOauth2AccessToken()); } if (FLAGS_custom_credentials_type.empty()) { transport_security security_type = |