1414 limitations under the License.
1515*/
1616
17- #include < gtest/gtest.h >
17+ #include " integration.hpp "
1818
19- #include " cassandra.h"
19+ class ConfigTests : public Integration {
20+ public:
21+ ConfigTests () {
22+ Integration::SetUp ();
23+ }
24+ };
2025
21- #include " driver_utils.hpp"
22- #include " objects/cluster.hpp"
23-
24- TEST (ConfigTest, Options) {
26+ CASSANDRA_INTEGRATION_TEST_F (ConfigTests, Options) {
2527 test::driver::Cluster cluster =
2628 test::driver::Cluster::build ().with_connect_timeout (9999u ).with_port (7000 );
2729 EXPECT_EQ (9999u , test::driver::internals::Utils::connect_timeout (cluster.get ()));
2830 EXPECT_EQ (7000 , test::driver::internals::Utils::port (cluster.get ()));
2931}
3032
31- TEST (ConfigTest , ContactPointsSimple) {
33+ CASSANDRA_INTEGRATION_TEST_F (ConfigTests , ContactPointsSimple) {
3234 std::string contact_points = " 127.0.0.1,127.0.0.2,127.0.0.3" ;
3335 test::driver::Cluster cluster =
3436 test::driver::Cluster::build ().with_contact_points (contact_points);
3537 EXPECT_STREQ (contact_points.c_str (),
3638 test::driver::internals::Utils::contact_points (cluster.get ()).c_str ());
3739}
3840
39- TEST (ConfigTest , ContactPointsClear) {
41+ CASSANDRA_INTEGRATION_TEST_F (ConfigTests , ContactPointsClear) {
4042 std::string contact_points = " 127.0.0.1,127.0.0.2,127.0.0.3" ;
4143 test::driver::Cluster cluster =
4244 test::driver::Cluster::build ().with_contact_points (contact_points);
@@ -46,15 +48,15 @@ TEST(ConfigTest, ContactPointsClear) {
4648 EXPECT_TRUE (test::driver::internals::Utils::contact_points (cluster.get ()).empty ());
4749}
4850
49- TEST (ConfigTest , ContactPointsExtraCommas) {
51+ CASSANDRA_INTEGRATION_TEST_F (ConfigTests , ContactPointsExtraCommas) {
5052 std::string contact_points = " ,,,,127.0.0.1,,,,127.0.0.2,127.0.0.3,,,," ;
5153 test::driver::Cluster cluster =
5254 test::driver::Cluster::build ().with_contact_points (contact_points);
5355 EXPECT_STREQ (" 127.0.0.1,127.0.0.2,127.0.0.3" ,
5456 test::driver::internals::Utils::contact_points (cluster.get ()).c_str ());
5557}
5658
57- TEST (ConfigTest , ContactPointsExtraWhitespace) {
59+ CASSANDRA_INTEGRATION_TEST_F (ConfigTests , ContactPointsExtraWhitespace) {
5860 std::string contact_points =
5961 " ,\r\n , , , 127.0.0.1 ,,, ,\t 127.0.0.2,127.0.0.3, \t\n , ,, " ;
6062 test::driver::Cluster cluster =
@@ -63,7 +65,7 @@ TEST(ConfigTest, ContactPointsExtraWhitespace) {
6365 test::driver::internals::Utils::contact_points (cluster.get ()).c_str ());
6466}
6567
66- TEST (ConfigTest , ContactPointsAppend) {
68+ CASSANDRA_INTEGRATION_TEST_F (ConfigTests , ContactPointsAppend) {
6769 test::driver::Cluster cluster = test::driver::Cluster::build ().with_contact_points (" 127.0.0.1" );
6870 EXPECT_STREQ (" 127.0.0.1" , test::driver::internals::Utils::contact_points (cluster.get ()).c_str ());
6971 cluster.with_contact_points (" 127.0.0.2" );
0 commit comments