mgmt+rib: improve logging
Change-Id: I2c8470831a9f9cbd5c06681f69783c4b442420f9
diff --git a/tests/daemon/mgmt/fib-manager.t.cpp b/tests/daemon/mgmt/fib-manager.t.cpp
index 3ba725d..b5712ec 100644
--- a/tests/daemon/mgmt/fib-manager.t.cpp
+++ b/tests/daemon/mgmt/fib-manager.t.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2024, Regents of the University of California,
+ * Copyright (c) 2014-2025, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -198,7 +198,7 @@
req.setTag(make_shared<lp::IncomingFaceIdTag>(faceId));
m_responses.clear();
expectedName = req.getName();
- expectedResponse = makeResponse(200, "Success", parameters.setFaceId(faceId));
+ expectedResponse = makeResponse(200, "OK", parameters.setFaceId(faceId));
receiveInterest(req);
};
@@ -223,7 +223,7 @@
receiveInterest(req);
BOOST_REQUIRE_EQUAL(m_responses.size(), 1);
- BOOST_CHECK_EQUAL(checkResponse(0, req.getName(), makeResponse(200, "Success", parameters)),
+ BOOST_CHECK_EQUAL(checkResponse(0, req.getName(), makeResponse(200, "OK", parameters)),
CheckResponseResult::OK);
BOOST_CHECK_EQUAL(checkNextHop("/hello", 1, addedFaceId, 101), CheckNextHopResult::OK);
}
@@ -239,7 +239,7 @@
receiveInterest(req);
BOOST_REQUIRE_EQUAL(m_responses.size(), 1);
- BOOST_CHECK_EQUAL(checkResponse(0, req.getName(), makeResponse(200, "Success", parameters)),
+ BOOST_CHECK_EQUAL(checkResponse(0, req.getName(), makeResponse(200, "OK", parameters)),
CheckResponseResult::OK);
BOOST_CHECK_EQUAL(checkNextHop("/hello", 1, addedFaceId, 0), CheckNextHopResult::OK);
}
@@ -255,7 +255,7 @@
m_responses.clear();
auto req = makeControlCommandRequest("/localhost/nfd/fib/add-nexthop", parameters);
expectedName = req.getName();
- expectedResponse = makeResponse(200, "Success", parameters);
+ expectedResponse = makeResponse(200, "OK", parameters);
receiveInterest(req);
};
@@ -286,7 +286,7 @@
m_responses.clear();
auto req = makeControlCommandRequest("/localhost/nfd/fib/remove-nexthop", parameters);
expectedName = req.getName();
- expectedResponse = makeResponse(200, "Success", parameters);
+ expectedResponse = makeResponse(200, "OK", parameters);
receiveInterest(req);
};
@@ -328,7 +328,7 @@
receiveInterest(req);
BOOST_REQUIRE_EQUAL(m_responses.size(), 1);
- auto expectedResponse = makeResponse(200, "Success", parameters);
+ auto expectedResponse = makeResponse(200, "OK", parameters);
BOOST_CHECK_EQUAL(checkResponse(0, req.getName(), expectedResponse), CheckResponseResult::OK);
}
@@ -346,7 +346,7 @@
auto req = makeControlCommandRequest("/localhost/nfd/fib/remove-nexthop", parameters);
req.setTag(make_shared<lp::IncomingFaceIdTag>(face));
expectedName = req.getName();
- expectedResponse = makeResponse(200, "Success", parameters.setFaceId(face));
+ expectedResponse = makeResponse(200, "OK", parameters.setFaceId(face));
receiveInterest(req);
};
@@ -378,7 +378,7 @@
m_responses.clear();
auto req = makeControlCommandRequest("/localhost/nfd/fib/remove-nexthop", parameters);
expectedName = req.getName();
- expectedResponse = makeResponse(200, "Success", parameters);
+ expectedResponse = makeResponse(200, "OK", parameters);
receiveInterest(req);
};
diff --git a/tests/daemon/mgmt/rib-manager.t.cpp b/tests/daemon/mgmt/rib-manager.t.cpp
index 679f40c..9dc55d1 100644
--- a/tests/daemon/mgmt/rib-manager.t.cpp
+++ b/tests/daemon/mgmt/rib-manager.t.cpp
@@ -341,7 +341,7 @@
if (this->m_status.isLocalhopConfigured) {
commandHop.setTag(std::make_shared<lp::IncomingFaceIdTag>(123));
}
- auto successResp = this->makeResponse(200, "Success", parameters);
+ auto successResp = this->makeResponse(200, "OK", parameters);
auto failureResp = ControlResponse(403, "authorization rejected");
BOOST_CHECK_EQUAL(this->m_responses.size(), 0);
@@ -377,9 +377,9 @@
receiveInterest(commandUnregister);
BOOST_REQUIRE_EQUAL(m_responses.size(), 2);
- BOOST_CHECK_EQUAL(checkResponse(0, commandRegister.getName(), makeResponse(200, "Success", paramsRegister)),
+ BOOST_CHECK_EQUAL(checkResponse(0, commandRegister.getName(), makeResponse(200, "OK", paramsRegister)),
CheckResponseResult::OK);
- BOOST_CHECK_EQUAL(checkResponse(1, commandUnregister.getName(), makeResponse(200, "Success", paramsUnregister)),
+ BOOST_CHECK_EQUAL(checkResponse(1, commandUnregister.getName(), makeResponse(200, "OK", paramsUnregister)),
CheckResponseResult::OK);
BOOST_REQUIRE_EQUAL(m_fibUpdater.updates.size(), 2);
@@ -409,9 +409,9 @@
paramsUnregister.setFaceId(inFaceId);
BOOST_REQUIRE_EQUAL(m_responses.size(), 2);
- BOOST_CHECK_EQUAL(checkResponse(0, commandRegister.getName(), makeResponse(200, "Success", paramsRegister)),
+ BOOST_CHECK_EQUAL(checkResponse(0, commandRegister.getName(), makeResponse(200, "OK", paramsRegister)),
CheckResponseResult::OK);
- BOOST_CHECK_EQUAL(checkResponse(1, commandUnregister.getName(), makeResponse(200, "Success", paramsUnregister)),
+ BOOST_CHECK_EQUAL(checkResponse(1, commandUnregister.getName(), makeResponse(200, "OK", paramsUnregister)),
CheckResponseResult::OK);
BOOST_REQUIRE_EQUAL(m_fibUpdater.updates.size(), 2);
@@ -495,14 +495,15 @@
paramsUnregister.setFaceId(announceFaceId);
BOOST_REQUIRE_EQUAL(m_responses.size(), 2);
- BOOST_CHECK_EQUAL(checkResponse(0, commandAnnounce.getName(), makeResponse(200, "Success", paramsAnnounceResponse)),
+ BOOST_CHECK_EQUAL(checkResponse(0, commandAnnounce.getName(), makeResponse(200, "OK", paramsAnnounceResponse)),
CheckResponseResult::OK);
- BOOST_CHECK_EQUAL(checkResponse(1, commandUnregister.getName(), makeResponse(200, "Success", paramsUnregister)),
+ BOOST_CHECK_EQUAL(checkResponse(1, commandUnregister.getName(), makeResponse(200, "OK", paramsUnregister)),
CheckResponseResult::OK);
BOOST_REQUIRE_EQUAL(m_fibUpdater.updates.size(), 2);
BOOST_CHECK_EQUAL(m_fibUpdater.updates.front(),
- rib::FibUpdate::createAddUpdate("/test-prefix-announce", announceFaceId, rib::Route::PA_ROUTE_COST));
+ rib::FibUpdate::createAddUpdate("/test-prefix-announce", announceFaceId,
+ rib::Route::PA_ROUTE_COST));
BOOST_CHECK_EQUAL(m_fibUpdater.updates.back(),
rib::FibUpdate::createRemoveUpdate("/test-prefix-announce", announceFaceId));
}
@@ -532,14 +533,15 @@
.setExpirationPeriod(10_s);
BOOST_REQUIRE_EQUAL(m_responses.size(), 2);
- BOOST_CHECK_EQUAL(checkResponse(0, commandAnnounce.getName(), makeResponse(200, "Success", paramsAnnounceResponse)),
+ BOOST_CHECK_EQUAL(checkResponse(0, commandAnnounce.getName(), makeResponse(200, "OK", paramsAnnounceResponse)),
CheckResponseResult::OK);
- BOOST_CHECK_EQUAL(checkResponse(1, commandUnregister.getName(), makeResponse(200, "Success", paramsUnregister)),
+ BOOST_CHECK_EQUAL(checkResponse(1, commandUnregister.getName(), makeResponse(200, "OK", paramsUnregister)),
CheckResponseResult::OK);
BOOST_REQUIRE_EQUAL(m_fibUpdater.updates.size(), 2);
BOOST_CHECK_EQUAL(m_fibUpdater.updates.front(),
- rib::FibUpdate::createAddUpdate("/test-prefix-announce", announceFaceId, rib::Route::PA_ROUTE_COST));
+ rib::FibUpdate::createAddUpdate("/test-prefix-announce", announceFaceId,
+ rib::Route::PA_ROUTE_COST));
BOOST_CHECK_EQUAL(m_fibUpdater.updates.back(),
rib::FibUpdate::createRemoveUpdate("/test-prefix-announce", announceFaceId));
}