remove invalid enum tests which are failing ubsan

pull/34861/head
Luwei Ge 1 year ago
parent c2bc98c166
commit fe4a121a05
  1. 14
      test/cpp/client/credentials_test.cc
  2. 28
      test/cpp/server/credentials_test.cc

@ -508,20 +508,6 @@ TEST(CredentialsTest, TlsChannelCredentialsWithGoodMinAndMaxTlsVersions) {
EXPECT_NE(channel_credentials, nullptr); EXPECT_NE(channel_credentials, nullptr);
} }
TEST(CredentialsTest, TlsChannelCredentialsWithMinTlsVersions) {
grpc::experimental::TlsChannelCredentialsOptions options;
options.set_min_tls_version(static_cast<grpc_tls_version>(-1));
auto channel_credentials = grpc::experimental::TlsCredentials(options);
EXPECT_EQ(channel_credentials, nullptr);
}
TEST(CredentialsTest, TlsChannelCredentialsWithMaxTlsVersions) {
grpc::experimental::TlsChannelCredentialsOptions options;
options.set_max_tls_version(static_cast<grpc_tls_version>(2));
auto channel_credentials = grpc::experimental::TlsCredentials(options);
EXPECT_EQ(channel_credentials, nullptr);
}
TEST(CredentialsTest, TlsChannelCredentialsWithBadMinAndMaxTlsVersions) { TEST(CredentialsTest, TlsChannelCredentialsWithBadMinAndMaxTlsVersions) {
grpc::experimental::TlsChannelCredentialsOptions options; grpc::experimental::TlsChannelCredentialsOptions options;
options.set_min_tls_version(grpc_tls_version::TLS1_3); options.set_min_tls_version(grpc_tls_version::TLS1_3);

@ -294,34 +294,6 @@ TEST(
EXPECT_NE(server_credentials, nullptr); EXPECT_NE(server_credentials, nullptr);
} }
TEST(CredentialsTest, TlsServerCredentialsWithMinTlsVersions) {
experimental::IdentityKeyCertPair key_cert_pair;
key_cert_pair.private_key = kIdentityCertPrivateKey;
key_cert_pair.certificate_chain = kIdentityCertContents;
std::vector<experimental::IdentityKeyCertPair> identity_key_cert_pairs;
identity_key_cert_pairs.emplace_back(key_cert_pair);
auto certificate_provider = std::make_shared<StaticDataCertificateProvider>(
kRootCertContents, identity_key_cert_pairs);
grpc::experimental::TlsServerCredentialsOptions options(certificate_provider);
options.set_min_tls_version(static_cast<grpc_tls_version>(-1));
auto server_credentials = grpc::experimental::TlsServerCredentials(options);
EXPECT_EQ(server_credentials, nullptr);
}
TEST(CredentialsTest, TlsServerCredentialsWithMaxTlsVersions) {
experimental::IdentityKeyCertPair key_cert_pair;
key_cert_pair.private_key = kIdentityCertPrivateKey;
key_cert_pair.certificate_chain = kIdentityCertContents;
std::vector<experimental::IdentityKeyCertPair> identity_key_cert_pairs;
identity_key_cert_pairs.emplace_back(key_cert_pair);
auto certificate_provider = std::make_shared<StaticDataCertificateProvider>(
kRootCertContents, identity_key_cert_pairs);
grpc::experimental::TlsServerCredentialsOptions options(certificate_provider);
options.set_max_tls_version(static_cast<grpc_tls_version>(2));
auto server_credentials = grpc::experimental::TlsServerCredentials(options);
EXPECT_EQ(server_credentials, nullptr);
}
TEST( TEST(
CredentialsTest, CredentialsTest,
TlsChannelCredentialsWithStaticDataCertificateProviderAndBadMinMaxTlsVersions) { TlsChannelCredentialsWithStaticDataCertificateProviderAndBadMinMaxTlsVersions) {

Loading…
Cancel
Save