From: Marcin Siodelski Date: Mon, 4 Mar 2019 11:45:36 +0000 (+0100) Subject: [#489,!250] Addressed review comments. X-Git-Tag: 430-configure-location-of-datadir_base~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6ef8eaf6a8411babbd1bcbef9417ceb4bfd65a83;p=thirdparty%2Fkea.git [#489,!250] Addressed review comments. --- diff --git a/src/hooks/dhcp/mysql_cb/tests/mysql_cb_dhcp4_unittest.cc b/src/hooks/dhcp/mysql_cb/tests/mysql_cb_dhcp4_unittest.cc index c997cbe07e..7cb3ea59a7 100644 --- a/src/hooks/dhcp/mysql_cb/tests/mysql_cb_dhcp4_unittest.cc +++ b/src/hooks/dhcp/mysql_cb/tests/mysql_cb_dhcp4_unittest.cc @@ -632,7 +632,7 @@ TEST_F(MySqlConfigBackendDHCPv4Test, getSubnet4) { // Test that the information about unspecified optional parameters gets // propagated to the database. -TEST_F(MySqlConfigBackendDHCPv4Test, getSubnet4WithDefaults) { +TEST_F(MySqlConfigBackendDHCPv4Test, getSubnet4WithOptionalUnspecified) { // Insert new subnet. Subnet4Ptr subnet = test_subnets_[2]; cbptr_->createUpdateSubnet4(ServerSelector::ALL(), subnet); @@ -997,7 +997,7 @@ TEST_F(MySqlConfigBackendDHCPv4Test, getSharedNetwork4) { // Test that the information about unspecified optional parameters gets // propagated to the database. -TEST_F(MySqlConfigBackendDHCPv4Test, getSharedNetwork4WithDefaults) { +TEST_F(MySqlConfigBackendDHCPv4Test, getSharedNetwork4WithOptionalUnspecified) { // Insert new shared network. SharedNetwork4Ptr shared_network = test_networks_[2]; cbptr_->createUpdateSharedNetwork4(ServerSelector::ALL(), shared_network); diff --git a/src/lib/mysql/tests/mysql_binding_unittest.cc b/src/lib/mysql/tests/mysql_binding_unittest.cc index f75f83e065..851b002da6 100644 --- a/src/lib/mysql/tests/mysql_binding_unittest.cc +++ b/src/lib/mysql/tests/mysql_binding_unittest.cc @@ -28,6 +28,7 @@ TEST(MySqlBindingTest, defaultString) { EXPECT_EQ("foo", binding->getStringOrDefault("foo")); binding = MySqlBinding::createString("bar"); + ASSERT_FALSE(binding->amNull()); EXPECT_EQ("bar", binding->getStringOrDefault("foo")); } @@ -100,9 +101,11 @@ TEST(MySqlBindingTest, blobTypeMismatch) { // This test verifies that default number is returned if binding is null. TEST(MySqlBindingTest, defaultInteger) { auto binding = MySqlBinding::createNull(); + ASSERT_TRUE(binding->amNull()); EXPECT_EQ(123, binding->getIntegerOrDefault(123)); binding = MySqlBinding::createInteger(1024); + ASSERT_FALSE(binding->amNull()); EXPECT_EQ(1024, binding->getIntegerOrDefault(123)); }