Browse Source

[2404] Alter memfile "getName()" to return "memory"

This reflects the fact that at the moment, the data is stored in
memory and not in a backing file.
Stephen Morris 12 years ago
parent
commit
1c59115d79

+ 2 - 3
src/lib/dhcpsrv/memfile_lease_mgr.h

@@ -199,12 +199,11 @@ public:
 
     /// @brief Returns backend name.
     ///
-    /// As there is no variation, in this case we return the type of the
-    /// backend.
+    /// For now, memfile can only store data in memory.
     ///
     /// @return Name of the backend.
     virtual std::string getName() const {
-        return ("memfile");
+        return ("memory");
     }
 
     /// @brief Returns description of the backend.

+ 1 - 1
src/lib/dhcpsrv/tests/memfile_lease_mgr_unittest.cc

@@ -53,7 +53,7 @@ TEST_F(MemfileLeaseMgrTest, getTypeAndName) {
     boost::scoped_ptr<Memfile_LeaseMgr> lease_mgr(new Memfile_LeaseMgr(pmap));
 
     EXPECT_EQ(std::string("memfile"), lease_mgr->getType());
-    EXPECT_EQ(std::string("memfile"), lease_mgr->getName());
+    EXPECT_EQ(std::string("memory"), lease_mgr->getName());
 }
 
 // Checks that adding/getting/deleting a Lease6 object works.