|
|
@ -1365,25 +1365,42 @@ TEST_P(SecureEnd2endTest, ClientAuthContext) { |
|
|
|
EXPECT_EQ("*.test.youtube.com", ToString(auth_ctx->GetPeerIdentity()[2])); |
|
|
|
EXPECT_EQ("*.test.youtube.com", ToString(auth_ctx->GetPeerIdentity()[2])); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
INSTANTIATE_TEST_CASE_P( |
|
|
|
std::vector<TestScenario> CreateTestScenarios(bool use_proxy, |
|
|
|
End2end, End2endTest, |
|
|
|
bool test_insecure, |
|
|
|
::testing::Values(TestScenario(false, kInsecureCredentialsType), |
|
|
|
bool test_secure) { |
|
|
|
TestScenario(false, kTlsCredentialsType))); |
|
|
|
std::vector<TestScenario> scenarios; |
|
|
|
|
|
|
|
std::vector<grpc::string> credentials_types; |
|
|
|
INSTANTIATE_TEST_CASE_P( |
|
|
|
if (test_secure) { |
|
|
|
End2endServerTryCancel, End2endServerTryCancelTest, |
|
|
|
credentials_types = GetSecureCredentialsTypeList(); |
|
|
|
::testing::Values(TestScenario(false, kInsecureCredentialsType))); |
|
|
|
} |
|
|
|
|
|
|
|
if (test_insecure) { |
|
|
|
INSTANTIATE_TEST_CASE_P( |
|
|
|
credentials_types.push_back(kInsecureCredentialsType); |
|
|
|
ProxyEnd2end, ProxyEnd2endTest, |
|
|
|
} |
|
|
|
::testing::Values(TestScenario(false, kInsecureCredentialsType), |
|
|
|
for (auto it = credentials_types.begin(); it != credentials_types.end(); |
|
|
|
TestScenario(false, kTlsCredentialsType), |
|
|
|
++it) { |
|
|
|
TestScenario(true, kInsecureCredentialsType), |
|
|
|
scenarios.push_back(TestScenario(false, *it)); |
|
|
|
TestScenario(true, kTlsCredentialsType))); |
|
|
|
if (use_proxy) { |
|
|
|
|
|
|
|
scenarios.push_back(TestScenario(true, *it)); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return scenarios; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
INSTANTIATE_TEST_CASE_P(End2end, End2endTest, |
|
|
|
|
|
|
|
::testing::ValuesIn(CreateTestScenarios(false, true, |
|
|
|
|
|
|
|
true))); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
INSTANTIATE_TEST_CASE_P(End2endServerTryCancel, End2endServerTryCancelTest, |
|
|
|
|
|
|
|
::testing::ValuesIn(CreateTestScenarios(false, true, |
|
|
|
|
|
|
|
false))); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
INSTANTIATE_TEST_CASE_P(ProxyEnd2end, ProxyEnd2endTest, |
|
|
|
|
|
|
|
::testing::ValuesIn(CreateTestScenarios(true, true, |
|
|
|
|
|
|
|
true))); |
|
|
|
|
|
|
|
|
|
|
|
INSTANTIATE_TEST_CASE_P(SecureEnd2end, SecureEnd2endTest, |
|
|
|
INSTANTIATE_TEST_CASE_P(SecureEnd2end, SecureEnd2endTest, |
|
|
|
::testing::Values(TestScenario(false, |
|
|
|
::testing::ValuesIn(CreateTestScenarios(false, false, |
|
|
|
kTlsCredentialsType))); |
|
|
|
true))); |
|
|
|
|
|
|
|
|
|
|
|
} // namespace
|
|
|
|
} // namespace
|
|
|
|
} // namespace testing
|
|
|
|
} // namespace testing
|
|
|
|