23 #if defined(GPR_LINUX) || defined(GPR_FREEBSD) || defined(GPR_APPLE)
25 #include <sys/param.h>
27 #include "gtest/gtest.h"
49 TEST(AbsoluteFilePathTest, ConcatenatesCorrectly) {
50 const char*
directory =
"nonexistent/test/directory";
51 const char*
filename =
"doesnotexist.txt";
52 char result_path[MAXPATHLEN];
54 EXPECT_STREQ(result_path,
"nonexistent/test/directory/doesnotexist.txt");
57 TEST(CreateRootCertsBundleTest, ReturnsEmpty) {
60 grpc_slice result_slice = grpc_core::CreateRootCertsBundle(
nullptr);
63 result_slice = grpc_core::CreateRootCertsBundle(
"does/not/exist");
68 TEST(CreateRootCertsBundleTest, BundlesCorrectly) {
73 grpc_load_file(
"test/core/security/etc/bundle.pem", 1, &roots_bundle));
76 grpc_core::CreateRootCertsBundle(
"test/core/security/etc/test_roots");
90 int main(
int argc,
char** argv) {
98 "*** WARNING: this test is only supported on Linux, FreeBSD, and MacOS"
102 #endif // GPR_LINUX || GPR_FREEBSD || GPR_APPLE