Add test for LoadSystemRootCerts.

pull/34874/head
Matthew Stevenson 1 year ago
parent 939013bc14
commit cda97a2d50
  1. 8
      test/core/security/system_roots_test.cc

@ -50,6 +50,7 @@
namespace grpc {
namespace {
#if defined(GPR_LINUX) || defined(GPR_FREEBSD) || defined(GPR_APPLE)
TEST(AbsoluteFilePathTest, ConcatenatesCorrectly) {
const char* directory = "nonexistent/test/directory";
const char* filename = "doesnotexist.txt";
@ -87,6 +88,13 @@ TEST(CreateRootCertsBundleTest, BundlesCorrectly) {
grpc_slice_unref(roots_bundle);
grpc_slice_unref(result_slice);
}
#endif // GPR_LINUX || GPR_FREEBSD || GPR_APPLE
TEST(LoadSystemRootCertsTest, Success) {
grpc_slice roots_slice = grpc_core::LoadSystemRootCerts();
EXPECT_FALSE(GRPC_SLICE_IS_EMPTY(roots_slice));
grpc_slice_unref(roots_slice);
}
} // namespace
} // namespace grpc

Loading…
Cancel
Save