]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#2738] Addressed comment
authorFrancis Dupont <fdupont@isc.org>
Wed, 1 Feb 2023 22:20:34 +0000 (23:20 +0100)
committerFrancis Dupont <fdupont@isc.org>
Wed, 8 Feb 2023 15:52:03 +0000 (16:52 +0100)
src/lib/dhcpsrv/lease.cc
src/lib/dhcpsrv/tests/lease_unittest.cc
src/lib/dhcpsrv/tests/memfile_lease_mgr_unittest.cc

index 20ad463957c9aa6c3c579accaa44a404e393e4ae..81fe2aa977ba316493acf650bc19d3b99a8373d5 100644 (file)
@@ -597,9 +597,9 @@ Lease4::toText() const {
            << "Client id:     " << (client_id_ ? client_id_->toText() : "(none)") << "\n"
            << "Subnet ID:     " << subnet_id_ << "\n"
            << "State:         " << statesToText(state_) << "\n"
-           << "Relay ID:      " << (relay_id_.empty() ? "none" :
+           << "Relay ID:      " << (relay_id_.empty() ? "(none)" :
                                     str::dumpAsHex(&relay_id_[0], relay_id_.size())) << "\n"
-           << "Remote ID:     " << (remote_id_.empty() ? "none" :
+           << "Remote ID:     " << (remote_id_.empty() ? "(none)" :
                                     str::dumpAsHex(&remote_id_[0], remote_id_.size())) << "\n";
 
     if (getContext()) {
index 795d081850f40126be2bad11e4d72a8aaf69494e..a16a7e0171a246e7c668d630f71b446fb3512a2a 100644 (file)
@@ -489,8 +489,8 @@ TEST_F(Lease4Test, toText) {
              << "Client id:     " << clientid_->toText() << "\n"
              << "Subnet ID:     789\n"
              << "State:         default\n"
-             << "Relay ID:      none\n"
-             << "Remote ID:     none\n"
+             << "Relay ID:      (none)\n"
+             << "Remote ID:     (none)\n"
              << "User context:  { \"foobar\": 1234 }\n";
 
     EXPECT_EQ(expected.str(), lease.toText());
@@ -508,8 +508,8 @@ TEST_F(Lease4Test, toText) {
              << "Client id:     (none)\n"
              << "Subnet ID:     789\n"
              << "State:         default\n"
-             << "Relay ID:      none\n"
-             << "Remote ID:     none\n";
+             << "Relay ID:      (none)\n"
+             << "Remote ID:     (none)\n";
 
     EXPECT_EQ(expected.str(), lease.toText());
 }
index a4d5dd9e573bb9ac9af60ce5f11f31ecd69af1d2..74047155ea1f5e9d8e4f36e8f67553d32dd8498d 100644 (file)
@@ -2392,8 +2392,8 @@ TEST_F(MemfileLeaseMgrTest, v4UserContext) {
         "Client id:     (none)\n"
         "Subnet ID:     1\n"
         "State:         declined\n"
-        "Relay ID:      none\n"
-        "Remote ID:     none\n"
+        "Relay ID:      (none)\n"
+        "Remote ID:     (none)\n"
         "User context:  {  }\n"
     );
 
@@ -2409,8 +2409,8 @@ TEST_F(MemfileLeaseMgrTest, v4UserContext) {
         "Client id:     (none)\n"
         "Subnet ID:     1\n"
         "State:         default\n"
-        "Relay ID:      none\n"
-        "Remote ID:     none\n"
+        "Relay ID:      (none)\n"
+        "Remote ID:     (none)\n"
         "User context:  { \"comment\": \"this lease is for the kitchen computer\" }\n"
     );
 
@@ -2426,8 +2426,8 @@ TEST_F(MemfileLeaseMgrTest, v4UserContext) {
         "Client id:     (none)\n"
         "Subnet ID:     1\n"
         "State:         default\n"
-        "Relay ID:      none\n"
-        "Remote ID:     none\n"
+        "Relay ID:      (none)\n"
+        "Remote ID:     (none)\n"
         "User context:  "
         "{ \"comment\": \"this lease is for the mainframe computer\", "
         "\"comment2\": \"don't release it\" }\n"
@@ -2445,8 +2445,8 @@ TEST_F(MemfileLeaseMgrTest, v4UserContext) {
         "Client id:     (none)\n"
         "Subnet ID:     1\n"
         "State:         default\n"
-        "Relay ID:      none\n"
-        "Remote ID:     none\n"
+        "Relay ID:      (none)\n"
+        "Remote ID:     (none)\n"
         "User context:  { \"a\": \"b\", \"c\": { \"d\": 1, \"e\": 2 } }\n"
     );
 }