]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#2815] Add test stubs
authorSlawek Figiel <slawek@isc.org>
Mon, 17 Apr 2023 08:35:53 +0000 (10:35 +0200)
committerSlawek Figiel <slawek@isc.org>
Thu, 25 May 2023 11:29:29 +0000 (13:29 +0200)
src/lib/dhcpsrv/testutils/generic_host_data_source_unittest.h

index 8aea9a3e2fad2bbb28d54c6379abbd76b3086480..2a995ada2cb9c789623ed87327ba821f75572c3f 100644 (file)
@@ -929,6 +929,61 @@ protected:
     void testGetAll6BySubnetIP(BaseHostDataSource& data_source1,
                                BaseHostDataSource& data_source2);
 
+    /// @brief This test verifies that HostMgr adds the reservations to any
+    /// data source.
+    ///
+    /// The reservations are added to the external database (alternate sources)
+    /// by default but the primary source may be changed on demand too.
+    ///
+    /// @param data_source1 Host data source to which first reservation is
+    /// inserted.
+    /// @param data_source2 Host data source to which second reservation is
+    /// inserted.
+    void testAdd(BaseHostDataSource& data_source1,
+                 BaseHostDataSource& data_source2);
+
+    /// @brief This test verifies that HostMgr deletes the reservations by
+    /// the subnet ID and subnet address.
+    ///
+    /// The reservations are deleted from the external database (alternate
+    /// sources) only by default but the primary source may be changed on
+    /// demand too.
+    ///
+    /// @param data_source1 Host data source to which first reservation is
+    /// inserted.
+    /// @param data_source2 Host data source to which second reservation is
+    /// inserted.
+    void testDeleteByIDAndAddress(BaseHostDataSource& data_source1,
+                                  BaseHostDataSource& data_source2);
+
+    /// @brief This test verifies that HostMgr deletes the IPv4 reservations by
+    /// the subnet ID and identifier.
+    ///
+    /// The reservations are deleted from the external database (alternate
+    /// sources) only by default but the primary source may be changed on
+    /// demand too.
+    ///
+    /// @param data_source1 Host data source to which first reservation is
+    /// inserted.
+    /// @param data_source2 Host data source to which second reservation is
+    /// inserted.
+    void testDelete4ByIDAndIdentifier(BaseHostDataSource& data_source1,
+                                      BaseHostDataSource& data_source2);
+
+    /// @brief This test verifies that HostMgr deletes the IPv6 reservations by
+    /// the subnet ID and identifier.
+    ///
+    /// The reservations are deleted from the external database (alternate
+    /// sources) only by default but the primary source may be changed on
+    /// demand too.
+    ///
+    /// @param data_source1 Host data source to which first reservation is
+    /// inserted.
+    /// @param data_source2 Host data source to which second reservation is
+    /// inserted.
+    void testDelete6ByIDAndIdentifier(BaseHostDataSource& data_source1,
+                                      BaseHostDataSource& data_source2);
+
     /// @brief Utility function that returns true if a given data source
     /// is primary (it isn't an alternate source).
     /// @param data_source  Host data source to check.