]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#95] Make V4 Client class fetches simply return
authorThomas Markwalder <tmark@isc.org>
Thu, 17 Feb 2022 22:04:23 +0000 (17:04 -0500)
committerThomas Markwalder <tmark@isc.org>
Thu, 17 Feb 2022 22:04:23 +0000 (17:04 -0500)
src/hooks/dhcp/pgsql_cb/pgsql_cb_dhcp4.cc
    Class fetches do nothing rather than throw

src/lib/pgsql/tests/pgsql_exchange_unittest.cc
    Changed insane time test to use portable but
    still insane time value

src/hooks/dhcp/pgsql_cb/pgsql_cb_dhcp4.cc
src/lib/pgsql/tests/pgsql_exchange_unittest.cc

index 124f6a2dac1657eaac6e651053f2cda2c55fc43c..c86c6753620e010688749ae4e164355d2df469d3 100644 (file)
@@ -2165,7 +2165,9 @@ public:
     /// where retrieved classes will be stored.
     void getAllClientClasses4(const ServerSelector& /* server_selector */,
                               ClientClassDictionary& /* client_classes */) {
-        isc_throw(NotImplemented, NOT_IMPL_STR);
+        /// @todo Rather than throw, we do nothing. This allows CB to be used for
+        /// everything except classes.
+        /// isc_throw(NotImplemented, NOT_IMPL_STR);
     }
 
     /// @brief Sends query to retrieve modified client classes.
@@ -2177,7 +2179,9 @@ public:
     void getModifiedClientClasses4(const ServerSelector& /* server_selector */,
                                    const boost::posix_time::ptime& /* modification_ts */,
                                    ClientClassDictionary& /* client_classes */) {
-        isc_throw(NotImplemented, NOT_IMPL_STR);
+        /// @todo Rather than throw, we do nothing. This allows CB to be used for
+        /// everything except classes.
+        /// isc_throw(NotImplemented, NOT_IMPL_STR);
     }
 
 
index 724c68f85251703d1466aa941794dfa117f17c2f..fe5dfddfff52e1d41e029f3cebc06a903cd4576c 100644 (file)
@@ -979,9 +979,9 @@ TEST_F(PgSqlBasicsTest, ptimeTimestamp) {
 
     // Make sure we catch values that are too big.
     time_duration duration = hours(10) + minutes(14) + seconds(15);
-    ptime day_too_far(date(3021, Jan, 21), duration);
+    ptime day_too_far(date(2038, Jan, 21), duration);
     ASSERT_THROW_MSG(bind_array->addTimestamp(day_too_far), BadValue,
-                     "Time value is too large: 33168132855");
+                     "Time value is too large: 2147681655");
 
     // Now add reasonable day, US National Ice Cream day.
     ptime nice_day(date(2021, Jul, 18), duration);