19 #include <gtest/gtest.h>
25 using namespace impala;
34 TEST(SslTest, Connectivity) {
37 string impala_home(getenv(
"IMPALA_HOME"));
38 stringstream server_cert;
39 server_cert << impala_home <<
"/be/src/testutil/server-cert.pem";
40 FLAGS_ssl_server_certificate = server_cert.str();
41 FLAGS_ssl_client_ca_certificate = server_cert.str();
42 stringstream server_key;
43 server_key << impala_home <<
"/be/src/testutil/server-key.pem";
44 FLAGS_ssl_private_key = server_key.str();
53 "localhost", FLAGS_beeswax_port,
"", NULL,
true);
54 EXPECT_TRUE(ssl_client.Open().ok());
56 TPingImpalaServiceResp resp;
58 ssl_client.iface()->PingImpalaService(resp);
62 "localhost", FLAGS_beeswax_port,
"", NULL,
false);
63 EXPECT_TRUE(non_ssl_client.Open().ok());
67 int main(
int argc,
char** argv) {
70 ::testing::InitGoogleTest(&argc, argv);
71 return RUN_ALL_TESTS();
void InitCommonRuntime(int argc, char **argv, bool init_jvm, TestInfo::Mode m=TestInfo::NON_TEST)
int main(int argc, char **argv)
#define EXIT_IF_ERROR(stmt)
DECLARE_string(ssl_server_certificate)
Status StartWithClientServers(int beeswax_port, int hs2_port, bool use_statestore)