Yanbiao Li | 8ee37ed | 2015-05-19 12:44:04 -0700 | [diff] [blame] | 1 | /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ |
Junxiao Shi | c542f63 | 2017-07-18 14:20:32 +0000 | [diff] [blame] | 2 | /* |
Davide Pesavento | 152ef44 | 2023-04-22 02:02:29 -0400 | [diff] [blame] | 3 | * Copyright (c) 2013-2023 Regents of the University of California. |
Yanbiao Li | 8ee37ed | 2015-05-19 12:44:04 -0700 | [diff] [blame] | 4 | * |
Alexander Afanasyev | 80b68e1 | 2015-09-17 17:01:04 -0700 | [diff] [blame] | 5 | * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions). |
Yanbiao Li | 8ee37ed | 2015-05-19 12:44:04 -0700 | [diff] [blame] | 6 | * |
Alexander Afanasyev | 80b68e1 | 2015-09-17 17:01:04 -0700 | [diff] [blame] | 7 | * ndn-cxx library is free software: you can redistribute it and/or modify it under the |
| 8 | * terms of the GNU Lesser General Public License as published by the Free Software |
| 9 | * Foundation, either version 3 of the License, or (at your option) any later version. |
Yanbiao Li | 8ee37ed | 2015-05-19 12:44:04 -0700 | [diff] [blame] | 10 | * |
Alexander Afanasyev | 80b68e1 | 2015-09-17 17:01:04 -0700 | [diff] [blame] | 11 | * ndn-cxx library is distributed in the hope that it will be useful, but WITHOUT ANY |
| 12 | * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A |
| 13 | * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. |
Yanbiao Li | 8ee37ed | 2015-05-19 12:44:04 -0700 | [diff] [blame] | 14 | * |
Alexander Afanasyev | 80b68e1 | 2015-09-17 17:01:04 -0700 | [diff] [blame] | 15 | * You should have received copies of the GNU General Public License and GNU Lesser |
| 16 | * General Public License along with ndn-cxx, e.g., in COPYING.md file. If not, see |
| 17 | * <http://www.gnu.org/licenses/>. |
| 18 | * |
| 19 | * See AUTHORS.md for complete list of ndn-cxx authors and contributors. |
Yanbiao Li | 8ee37ed | 2015-05-19 12:44:04 -0700 | [diff] [blame] | 20 | */ |
| 21 | |
Davide Pesavento | 7e78064 | 2018-11-24 15:51:34 -0500 | [diff] [blame] | 22 | #include "ndn-cxx/mgmt/dispatcher.hpp" |
| 23 | #include "ndn-cxx/mgmt/nfd/control-parameters.hpp" |
| 24 | #include "ndn-cxx/util/dummy-client-face.hpp" |
Yanbiao Li | 8ee37ed | 2015-05-19 12:44:04 -0700 | [diff] [blame] | 25 | |
Davide Pesavento | 4c1ad4c | 2020-11-16 21:12:02 -0500 | [diff] [blame] | 26 | #include "tests/test-common.hpp" |
| 27 | #include "tests/unit/io-key-chain-fixture.hpp" |
Yanbiao Li | 8ee37ed | 2015-05-19 12:44:04 -0700 | [diff] [blame] | 28 | |
Davide Pesavento | 47ce2ee | 2023-05-09 01:33:33 -0400 | [diff] [blame] | 29 | namespace ndn::tests { |
Yanbiao Li | 8ee37ed | 2015-05-19 12:44:04 -0700 | [diff] [blame] | 30 | |
Davide Pesavento | 47ce2ee | 2023-05-09 01:33:33 -0400 | [diff] [blame] | 31 | using namespace ndn::mgmt; |
Yanbiao Li | 8ee37ed | 2015-05-19 12:44:04 -0700 | [diff] [blame] | 32 | |
Davide Pesavento | 4c1ad4c | 2020-11-16 21:12:02 -0500 | [diff] [blame] | 33 | class DispatcherFixture : public IoKeyChainFixture |
Yanbiao Li | 8ee37ed | 2015-05-19 12:44:04 -0700 | [diff] [blame] | 34 | { |
| 35 | public: |
| 36 | DispatcherFixture() |
Davide Pesavento | 4c1ad4c | 2020-11-16 21:12:02 -0500 | [diff] [blame] | 37 | : face(m_io, m_keyChain, {true, true}) |
Alexander Afanasyev | 9bdbb83 | 2015-12-30 12:54:22 -0800 | [diff] [blame] | 38 | , dispatcher(face, m_keyChain, security::SigningInfo()) |
Yanbiao Li | 4b4f754 | 2016-03-11 02:04:43 +0800 | [diff] [blame] | 39 | , storage(dispatcher.m_storage) |
Yanbiao Li | 8ee37ed | 2015-05-19 12:44:04 -0700 | [diff] [blame] | 40 | { |
| 41 | } |
| 42 | |
| 43 | public: |
Davide Pesavento | 47ce2ee | 2023-05-09 01:33:33 -0400 | [diff] [blame] | 44 | DummyClientFace face; |
Yanbiao Li | 8ee37ed | 2015-05-19 12:44:04 -0700 | [diff] [blame] | 45 | mgmt::Dispatcher dispatcher; |
Junxiao Shi | c542f63 | 2017-07-18 14:20:32 +0000 | [diff] [blame] | 46 | InMemoryStorageFifo& storage; |
Yanbiao Li | 8ee37ed | 2015-05-19 12:44:04 -0700 | [diff] [blame] | 47 | }; |
| 48 | |
| 49 | class VoidParameters : public mgmt::ControlParameters |
| 50 | { |
| 51 | public: |
| 52 | explicit |
| 53 | VoidParameters(const Block& wire) |
| 54 | { |
| 55 | wireDecode(wire); |
| 56 | } |
| 57 | |
Junxiao Shi | d97c953 | 2017-04-27 16:17:04 +0000 | [diff] [blame] | 58 | Block |
Davide Pesavento | aa82eb6 | 2016-04-22 19:08:40 +0200 | [diff] [blame] | 59 | wireEncode() const final |
Yanbiao Li | 8ee37ed | 2015-05-19 12:44:04 -0700 | [diff] [blame] | 60 | { |
| 61 | return Block(128); |
| 62 | } |
| 63 | |
Junxiao Shi | d97c953 | 2017-04-27 16:17:04 +0000 | [diff] [blame] | 64 | void |
Davide Pesavento | aa82eb6 | 2016-04-22 19:08:40 +0200 | [diff] [blame] | 65 | wireDecode(const Block& wire) final |
Yanbiao Li | 8ee37ed | 2015-05-19 12:44:04 -0700 | [diff] [blame] | 66 | { |
| 67 | if (wire.type() != 128) |
Davide Pesavento | 923ba44 | 2019-02-12 22:00:38 -0500 | [diff] [blame] | 68 | NDN_THROW(tlv::Error("Expecting TLV type 128")); |
Yanbiao Li | 8ee37ed | 2015-05-19 12:44:04 -0700 | [diff] [blame] | 69 | } |
| 70 | }; |
| 71 | |
| 72 | static Authorization |
| 73 | makeTestAuthorization() |
| 74 | { |
Davide Pesavento | 3c34ec1 | 2021-03-28 21:50:06 -0400 | [diff] [blame] | 75 | return [] (const Name&, const Interest& interest, const ControlParameters*, |
| 76 | AcceptContinuation accept, RejectContinuation reject) { |
Yanbiao Li | 8ee37ed | 2015-05-19 12:44:04 -0700 | [diff] [blame] | 77 | if (interest.getName()[-1] == name::Component("valid")) { |
| 78 | accept(""); |
| 79 | } |
| 80 | else { |
| 81 | if (interest.getName()[-1] == name::Component("silent")) { |
| 82 | reject(RejectReply::SILENT); |
| 83 | } |
| 84 | else { |
| 85 | reject(RejectReply::STATUS403); |
| 86 | } |
| 87 | } |
| 88 | }; |
| 89 | } |
| 90 | |
Junxiao Shi | d97c953 | 2017-04-27 16:17:04 +0000 | [diff] [blame] | 91 | BOOST_AUTO_TEST_SUITE(Mgmt) |
| 92 | BOOST_FIXTURE_TEST_SUITE(TestDispatcher, DispatcherFixture) |
| 93 | |
| 94 | BOOST_AUTO_TEST_CASE(Basic) |
Yanbiao Li | 8ee37ed | 2015-05-19 12:44:04 -0700 | [diff] [blame] | 95 | { |
| 96 | BOOST_CHECK_NO_THROW(dispatcher |
| 97 | .addControlCommand<VoidParameters>("test/1", makeAcceptAllAuthorization(), |
Davide Pesavento | 152ef44 | 2023-04-22 02:02:29 -0400 | [diff] [blame] | 98 | std::bind([] { return true; }), |
| 99 | std::bind([]{}))); |
Yanbiao Li | 8ee37ed | 2015-05-19 12:44:04 -0700 | [diff] [blame] | 100 | BOOST_CHECK_NO_THROW(dispatcher |
| 101 | .addControlCommand<VoidParameters>("test/2", makeAcceptAllAuthorization(), |
Davide Pesavento | 152ef44 | 2023-04-22 02:02:29 -0400 | [diff] [blame] | 102 | std::bind([] { return true; }), |
| 103 | std::bind([]{}))); |
Yanbiao Li | 8ee37ed | 2015-05-19 12:44:04 -0700 | [diff] [blame] | 104 | |
| 105 | BOOST_CHECK_THROW(dispatcher |
| 106 | .addControlCommand<VoidParameters>("test", makeAcceptAllAuthorization(), |
Davide Pesavento | 152ef44 | 2023-04-22 02:02:29 -0400 | [diff] [blame] | 107 | std::bind([] { return true; }), |
| 108 | std::bind([]{})), |
Yanbiao Li | 8ee37ed | 2015-05-19 12:44:04 -0700 | [diff] [blame] | 109 | std::out_of_range); |
| 110 | |
| 111 | BOOST_CHECK_NO_THROW(dispatcher.addStatusDataset("status/1", |
Davide Pesavento | 152ef44 | 2023-04-22 02:02:29 -0400 | [diff] [blame] | 112 | makeAcceptAllAuthorization(), std::bind([]{}))); |
Yanbiao Li | 8ee37ed | 2015-05-19 12:44:04 -0700 | [diff] [blame] | 113 | BOOST_CHECK_NO_THROW(dispatcher.addStatusDataset("status/2", |
Davide Pesavento | 152ef44 | 2023-04-22 02:02:29 -0400 | [diff] [blame] | 114 | makeAcceptAllAuthorization(), std::bind([]{}))); |
Yanbiao Li | 8ee37ed | 2015-05-19 12:44:04 -0700 | [diff] [blame] | 115 | BOOST_CHECK_THROW(dispatcher.addStatusDataset("status", |
Davide Pesavento | 152ef44 | 2023-04-22 02:02:29 -0400 | [diff] [blame] | 116 | makeAcceptAllAuthorization(), std::bind([]{})), |
Yanbiao Li | 8ee37ed | 2015-05-19 12:44:04 -0700 | [diff] [blame] | 117 | std::out_of_range); |
| 118 | |
| 119 | BOOST_CHECK_NO_THROW(dispatcher.addNotificationStream("stream/1")); |
| 120 | BOOST_CHECK_NO_THROW(dispatcher.addNotificationStream("stream/2")); |
| 121 | BOOST_CHECK_THROW(dispatcher.addNotificationStream("stream"), std::out_of_range); |
| 122 | |
| 123 | |
| 124 | BOOST_CHECK_NO_THROW(dispatcher.addTopPrefix("/root/1")); |
| 125 | BOOST_CHECK_NO_THROW(dispatcher.addTopPrefix("/root/2")); |
| 126 | BOOST_CHECK_THROW(dispatcher.addTopPrefix("/root"), std::out_of_range); |
| 127 | |
| 128 | BOOST_CHECK_THROW(dispatcher |
| 129 | .addControlCommand<VoidParameters>("test/3", makeAcceptAllAuthorization(), |
Davide Pesavento | 152ef44 | 2023-04-22 02:02:29 -0400 | [diff] [blame] | 130 | std::bind([] { return true; }), |
| 131 | std::bind([]{})), |
Yanbiao Li | 8ee37ed | 2015-05-19 12:44:04 -0700 | [diff] [blame] | 132 | std::domain_error); |
| 133 | |
| 134 | BOOST_CHECK_THROW(dispatcher.addStatusDataset("status/3", |
Davide Pesavento | 152ef44 | 2023-04-22 02:02:29 -0400 | [diff] [blame] | 135 | makeAcceptAllAuthorization(), std::bind([]{})), |
Yanbiao Li | 8ee37ed | 2015-05-19 12:44:04 -0700 | [diff] [blame] | 136 | std::domain_error); |
| 137 | |
| 138 | BOOST_CHECK_THROW(dispatcher.addNotificationStream("stream/3"), std::domain_error); |
| 139 | } |
| 140 | |
Junxiao Shi | d97c953 | 2017-04-27 16:17:04 +0000 | [diff] [blame] | 141 | BOOST_AUTO_TEST_CASE(AddRemoveTopPrefix) |
Yanbiao Li | 8ee37ed | 2015-05-19 12:44:04 -0700 | [diff] [blame] | 142 | { |
| 143 | std::map<std::string, size_t> nCallbackCalled; |
| 144 | dispatcher |
| 145 | .addControlCommand<VoidParameters>("test/1", makeAcceptAllAuthorization(), |
Davide Pesavento | 152ef44 | 2023-04-22 02:02:29 -0400 | [diff] [blame] | 146 | std::bind([] { return true; }), |
| 147 | std::bind([&nCallbackCalled] { ++nCallbackCalled["test/1"]; })); |
Yanbiao Li | 8ee37ed | 2015-05-19 12:44:04 -0700 | [diff] [blame] | 148 | |
| 149 | dispatcher |
| 150 | .addControlCommand<VoidParameters>("test/2", makeAcceptAllAuthorization(), |
Davide Pesavento | 152ef44 | 2023-04-22 02:02:29 -0400 | [diff] [blame] | 151 | std::bind([] { return true; }), |
| 152 | std::bind([&nCallbackCalled] { ++nCallbackCalled["test/2"]; })); |
Yanbiao Li | 8ee37ed | 2015-05-19 12:44:04 -0700 | [diff] [blame] | 153 | |
Junxiao Shi | 85d9083 | 2016-08-04 03:19:46 +0000 | [diff] [blame] | 154 | face.receive(*makeInterest("/root/1/test/1/%80%00")); |
Davide Pesavento | 0f83080 | 2018-01-16 23:58:58 -0500 | [diff] [blame] | 155 | advanceClocks(1_ms); |
Yanbiao Li | 8ee37ed | 2015-05-19 12:44:04 -0700 | [diff] [blame] | 156 | BOOST_CHECK_EQUAL(nCallbackCalled["test/1"], 0); |
| 157 | BOOST_CHECK_EQUAL(nCallbackCalled["test/2"], 0); |
| 158 | |
| 159 | dispatcher.addTopPrefix("/root/1"); |
Davide Pesavento | 0f83080 | 2018-01-16 23:58:58 -0500 | [diff] [blame] | 160 | advanceClocks(1_ms); |
Yanbiao Li | 8ee37ed | 2015-05-19 12:44:04 -0700 | [diff] [blame] | 161 | |
Junxiao Shi | 85d9083 | 2016-08-04 03:19:46 +0000 | [diff] [blame] | 162 | face.receive(*makeInterest("/root/1/test/1/%80%00")); |
Davide Pesavento | 0f83080 | 2018-01-16 23:58:58 -0500 | [diff] [blame] | 163 | advanceClocks(1_ms); |
Yanbiao Li | 8ee37ed | 2015-05-19 12:44:04 -0700 | [diff] [blame] | 164 | BOOST_CHECK_EQUAL(nCallbackCalled["test/1"], 1); |
| 165 | BOOST_CHECK_EQUAL(nCallbackCalled["test/2"], 0); |
| 166 | |
Junxiao Shi | 85d9083 | 2016-08-04 03:19:46 +0000 | [diff] [blame] | 167 | face.receive(*makeInterest("/root/1/test/2/%80%00")); |
Davide Pesavento | 0f83080 | 2018-01-16 23:58:58 -0500 | [diff] [blame] | 168 | advanceClocks(1_ms); |
Yanbiao Li | 8ee37ed | 2015-05-19 12:44:04 -0700 | [diff] [blame] | 169 | BOOST_CHECK_EQUAL(nCallbackCalled["test/1"], 1); |
| 170 | BOOST_CHECK_EQUAL(nCallbackCalled["test/2"], 1); |
| 171 | |
Junxiao Shi | 85d9083 | 2016-08-04 03:19:46 +0000 | [diff] [blame] | 172 | face.receive(*makeInterest("/root/2/test/1/%80%00")); |
| 173 | face.receive(*makeInterest("/root/2/test/2/%80%00")); |
Davide Pesavento | 0f83080 | 2018-01-16 23:58:58 -0500 | [diff] [blame] | 174 | advanceClocks(1_ms); |
Yanbiao Li | 8ee37ed | 2015-05-19 12:44:04 -0700 | [diff] [blame] | 175 | BOOST_CHECK_EQUAL(nCallbackCalled["test/1"], 1); |
| 176 | BOOST_CHECK_EQUAL(nCallbackCalled["test/2"], 1); |
| 177 | |
| 178 | dispatcher.addTopPrefix("/root/2"); |
Davide Pesavento | 0f83080 | 2018-01-16 23:58:58 -0500 | [diff] [blame] | 179 | advanceClocks(1_ms); |
Yanbiao Li | 8ee37ed | 2015-05-19 12:44:04 -0700 | [diff] [blame] | 180 | |
Junxiao Shi | 85d9083 | 2016-08-04 03:19:46 +0000 | [diff] [blame] | 181 | face.receive(*makeInterest("/root/1/test/1/%80%00")); |
Davide Pesavento | 0f83080 | 2018-01-16 23:58:58 -0500 | [diff] [blame] | 182 | advanceClocks(1_ms); |
Yanbiao Li | 8ee37ed | 2015-05-19 12:44:04 -0700 | [diff] [blame] | 183 | BOOST_CHECK_EQUAL(nCallbackCalled["test/1"], 2); |
| 184 | |
Junxiao Shi | 85d9083 | 2016-08-04 03:19:46 +0000 | [diff] [blame] | 185 | face.receive(*makeInterest("/root/2/test/1/%80%00")); |
Davide Pesavento | 0f83080 | 2018-01-16 23:58:58 -0500 | [diff] [blame] | 186 | advanceClocks(1_ms); |
Yanbiao Li | 8ee37ed | 2015-05-19 12:44:04 -0700 | [diff] [blame] | 187 | BOOST_CHECK_EQUAL(nCallbackCalled["test/1"], 3); |
| 188 | |
| 189 | dispatcher.removeTopPrefix("/root/1"); |
Davide Pesavento | 0f83080 | 2018-01-16 23:58:58 -0500 | [diff] [blame] | 190 | advanceClocks(1_ms); |
Yanbiao Li | 8ee37ed | 2015-05-19 12:44:04 -0700 | [diff] [blame] | 191 | |
Junxiao Shi | 85d9083 | 2016-08-04 03:19:46 +0000 | [diff] [blame] | 192 | face.receive(*makeInterest("/root/1/test/1/%80%00")); |
Davide Pesavento | 0f83080 | 2018-01-16 23:58:58 -0500 | [diff] [blame] | 193 | advanceClocks(1_ms); |
Yanbiao Li | 8ee37ed | 2015-05-19 12:44:04 -0700 | [diff] [blame] | 194 | BOOST_CHECK_EQUAL(nCallbackCalled["test/1"], 3); |
| 195 | |
Junxiao Shi | 85d9083 | 2016-08-04 03:19:46 +0000 | [diff] [blame] | 196 | face.receive(*makeInterest("/root/2/test/1/%80%00")); |
Davide Pesavento | 0f83080 | 2018-01-16 23:58:58 -0500 | [diff] [blame] | 197 | advanceClocks(1_ms); |
Yanbiao Li | 8ee37ed | 2015-05-19 12:44:04 -0700 | [diff] [blame] | 198 | BOOST_CHECK_EQUAL(nCallbackCalled["test/1"], 4); |
| 199 | } |
| 200 | |
Junxiao Shi | d97c953 | 2017-04-27 16:17:04 +0000 | [diff] [blame] | 201 | BOOST_AUTO_TEST_CASE(ControlCommand) |
Yanbiao Li | 8ee37ed | 2015-05-19 12:44:04 -0700 | [diff] [blame] | 202 | { |
| 203 | size_t nCallbackCalled = 0; |
| 204 | dispatcher |
| 205 | .addControlCommand<VoidParameters>("test", |
| 206 | makeTestAuthorization(), |
Davide Pesavento | 152ef44 | 2023-04-22 02:02:29 -0400 | [diff] [blame] | 207 | std::bind([] { return true; }), |
| 208 | std::bind([&nCallbackCalled] { ++nCallbackCalled; })); |
Yanbiao Li | 8ee37ed | 2015-05-19 12:44:04 -0700 | [diff] [blame] | 209 | |
| 210 | dispatcher.addTopPrefix("/root"); |
Davide Pesavento | 0f83080 | 2018-01-16 23:58:58 -0500 | [diff] [blame] | 211 | advanceClocks(1_ms); |
Alexander Afanasyev | 9bdbb83 | 2015-12-30 12:54:22 -0800 | [diff] [blame] | 212 | face.sentData.clear(); |
Yanbiao Li | 8ee37ed | 2015-05-19 12:44:04 -0700 | [diff] [blame] | 213 | |
Junxiao Shi | 85d9083 | 2016-08-04 03:19:46 +0000 | [diff] [blame] | 214 | face.receive(*makeInterest("/root/test/%80%00")); // returns 403 |
| 215 | face.receive(*makeInterest("/root/test/%80%00/invalid")); // returns 403 |
| 216 | face.receive(*makeInterest("/root/test/%80%00/silent")); // silently ignored |
| 217 | face.receive(*makeInterest("/root/test/.../invalid")); // silently ignored (wrong format) |
| 218 | face.receive(*makeInterest("/root/test/.../valid")); // silently ignored (wrong format) |
Davide Pesavento | 0f83080 | 2018-01-16 23:58:58 -0500 | [diff] [blame] | 219 | advanceClocks(1_ms, 20); |
Yanbiao Li | 8ee37ed | 2015-05-19 12:44:04 -0700 | [diff] [blame] | 220 | BOOST_CHECK_EQUAL(nCallbackCalled, 0); |
Alexander Afanasyev | 9bdbb83 | 2015-12-30 12:54:22 -0800 | [diff] [blame] | 221 | BOOST_CHECK_EQUAL(face.sentData.size(), 2); |
Yanbiao Li | 8ee37ed | 2015-05-19 12:44:04 -0700 | [diff] [blame] | 222 | |
Junxiao Shi | 72c0c64 | 2018-04-20 15:41:09 +0000 | [diff] [blame] | 223 | BOOST_CHECK_EQUAL(face.sentData[0].getContentType(), tlv::ContentType_Blob); |
Alexander Afanasyev | 9bdbb83 | 2015-12-30 12:54:22 -0800 | [diff] [blame] | 224 | BOOST_CHECK_EQUAL(ControlResponse(face.sentData[0].getContent().blockFromValue()).getCode(), 403); |
Junxiao Shi | 72c0c64 | 2018-04-20 15:41:09 +0000 | [diff] [blame] | 225 | BOOST_CHECK_EQUAL(face.sentData[1].getContentType(), tlv::ContentType_Blob); |
Alexander Afanasyev | 9bdbb83 | 2015-12-30 12:54:22 -0800 | [diff] [blame] | 226 | BOOST_CHECK_EQUAL(ControlResponse(face.sentData[1].getContent().blockFromValue()).getCode(), 403); |
Yanbiao Li | 8ee37ed | 2015-05-19 12:44:04 -0700 | [diff] [blame] | 227 | |
Junxiao Shi | 85d9083 | 2016-08-04 03:19:46 +0000 | [diff] [blame] | 228 | face.receive(*makeInterest("/root/test/%80%00/valid")); |
Davide Pesavento | 0f83080 | 2018-01-16 23:58:58 -0500 | [diff] [blame] | 229 | advanceClocks(1_ms, 10); |
Yanbiao Li | 8ee37ed | 2015-05-19 12:44:04 -0700 | [diff] [blame] | 230 | BOOST_CHECK_EQUAL(nCallbackCalled, 1); |
| 231 | } |
| 232 | |
Junxiao Shi | d97c953 | 2017-04-27 16:17:04 +0000 | [diff] [blame] | 233 | class StatefulParameters : public mgmt::ControlParameters |
| 234 | { |
| 235 | public: |
| 236 | explicit |
| 237 | StatefulParameters(const Block& wire) |
| 238 | { |
| 239 | wireDecode(wire); |
| 240 | } |
| 241 | |
| 242 | Block |
| 243 | wireEncode() const final |
| 244 | { |
Davide Pesavento | fbea4fc | 2022-02-08 07:26:04 -0500 | [diff] [blame] | 245 | return {}; |
Junxiao Shi | d97c953 | 2017-04-27 16:17:04 +0000 | [diff] [blame] | 246 | } |
| 247 | |
| 248 | void |
Davide Pesavento | 3c34ec1 | 2021-03-28 21:50:06 -0400 | [diff] [blame] | 249 | wireDecode(const Block&) final |
Junxiao Shi | d97c953 | 2017-04-27 16:17:04 +0000 | [diff] [blame] | 250 | { |
| 251 | m_state = EXPECTED_STATE; |
| 252 | } |
| 253 | |
| 254 | bool |
| 255 | check() const |
| 256 | { |
| 257 | return m_state == EXPECTED_STATE; |
| 258 | } |
| 259 | |
| 260 | private: |
| 261 | static constexpr int EXPECTED_STATE = 12602; |
| 262 | int m_state = 0; |
| 263 | }; |
| 264 | |
| 265 | BOOST_AUTO_TEST_CASE(ControlCommandAsyncAuthorization) // Bug 4059 |
| 266 | { |
| 267 | AcceptContinuation authorizationAccept; |
| 268 | auto authorization = |
Davide Pesavento | 3c34ec1 | 2021-03-28 21:50:06 -0400 | [diff] [blame] | 269 | [&authorizationAccept] (const Name&, const Interest&, const ControlParameters*, |
| 270 | AcceptContinuation accept, RejectContinuation) { |
| 271 | authorizationAccept = std::move(accept); |
Junxiao Shi | d97c953 | 2017-04-27 16:17:04 +0000 | [diff] [blame] | 272 | }; |
| 273 | |
| 274 | auto validateParameters = |
| 275 | [] (const ControlParameters& params) { |
| 276 | return dynamic_cast<const StatefulParameters&>(params).check(); |
| 277 | }; |
| 278 | |
| 279 | size_t nCallbackCalled = 0; |
Davide Pesavento | 3c34ec1 | 2021-03-28 21:50:06 -0400 | [diff] [blame] | 280 | dispatcher.addControlCommand<StatefulParameters>("test", authorization, validateParameters, |
Davide Pesavento | 152ef44 | 2023-04-22 02:02:29 -0400 | [diff] [blame] | 281 | std::bind([&nCallbackCalled] { ++nCallbackCalled; })); |
Junxiao Shi | d97c953 | 2017-04-27 16:17:04 +0000 | [diff] [blame] | 282 | |
| 283 | dispatcher.addTopPrefix("/root"); |
Davide Pesavento | 0f83080 | 2018-01-16 23:58:58 -0500 | [diff] [blame] | 284 | advanceClocks(1_ms); |
Junxiao Shi | d97c953 | 2017-04-27 16:17:04 +0000 | [diff] [blame] | 285 | |
| 286 | face.receive(*makeInterest("/root/test/%80%00")); |
| 287 | BOOST_CHECK_EQUAL(nCallbackCalled, 0); |
| 288 | BOOST_REQUIRE(authorizationAccept != nullptr); |
| 289 | |
Davide Pesavento | 0f83080 | 2018-01-16 23:58:58 -0500 | [diff] [blame] | 290 | advanceClocks(1_ms); |
Junxiao Shi | d97c953 | 2017-04-27 16:17:04 +0000 | [diff] [blame] | 291 | authorizationAccept(""); |
Davide Pesavento | 0f83080 | 2018-01-16 23:58:58 -0500 | [diff] [blame] | 292 | advanceClocks(1_ms); |
Junxiao Shi | d97c953 | 2017-04-27 16:17:04 +0000 | [diff] [blame] | 293 | BOOST_CHECK_EQUAL(nCallbackCalled, 1); |
| 294 | } |
| 295 | |
| 296 | BOOST_AUTO_TEST_CASE(StatusDataset) |
Yanbiao Li | 8ee37ed | 2015-05-19 12:44:04 -0700 | [diff] [blame] | 297 | { |
Davide Pesavento | fbea4fc | 2022-02-08 07:26:04 -0500 | [diff] [blame] | 298 | const Block smallBlock({0x81, 0x01, 0x01}); |
Davide Pesavento | 3c34ec1 | 2021-03-28 21:50:06 -0400 | [diff] [blame] | 299 | const Block largeBlock = [] { |
| 300 | Block b(129, std::make_shared<const Buffer>(3000)); |
| 301 | b.encode(); |
| 302 | return b; |
| 303 | }(); |
Yanbiao Li | 8ee37ed | 2015-05-19 12:44:04 -0700 | [diff] [blame] | 304 | |
| 305 | dispatcher.addStatusDataset("test/small", |
| 306 | makeTestAuthorization(), |
Davide Pesavento | 3c34ec1 | 2021-03-28 21:50:06 -0400 | [diff] [blame] | 307 | [&smallBlock] (const Name&, const Interest&, |
Davide Pesavento | b10024c | 2017-09-22 01:36:44 -0400 | [diff] [blame] | 308 | StatusDatasetContext& context) { |
Yanbiao Li | 8ee37ed | 2015-05-19 12:44:04 -0700 | [diff] [blame] | 309 | context.append(smallBlock); |
| 310 | context.append(smallBlock); |
| 311 | context.append(smallBlock); |
| 312 | context.end(); |
| 313 | }); |
| 314 | |
| 315 | dispatcher.addStatusDataset("test/large", |
| 316 | makeTestAuthorization(), |
Davide Pesavento | 3c34ec1 | 2021-03-28 21:50:06 -0400 | [diff] [blame] | 317 | [&largeBlock] (const Name&, const Interest&, |
Davide Pesavento | b10024c | 2017-09-22 01:36:44 -0400 | [diff] [blame] | 318 | StatusDatasetContext& context) { |
Yanbiao Li | 8ee37ed | 2015-05-19 12:44:04 -0700 | [diff] [blame] | 319 | context.append(largeBlock); |
| 320 | context.append(largeBlock); |
| 321 | context.append(largeBlock); |
| 322 | context.end(); |
| 323 | }); |
| 324 | |
| 325 | dispatcher.addStatusDataset("test/reject", |
| 326 | makeTestAuthorization(), |
Davide Pesavento | 3c34ec1 | 2021-03-28 21:50:06 -0400 | [diff] [blame] | 327 | [] (const Name&, const Interest&, StatusDatasetContext& context) { |
Yanbiao Li | 8ee37ed | 2015-05-19 12:44:04 -0700 | [diff] [blame] | 328 | context.reject(); |
| 329 | }); |
| 330 | |
| 331 | dispatcher.addTopPrefix("/root"); |
Davide Pesavento | 0f83080 | 2018-01-16 23:58:58 -0500 | [diff] [blame] | 332 | advanceClocks(1_ms); |
Alexander Afanasyev | 9bdbb83 | 2015-12-30 12:54:22 -0800 | [diff] [blame] | 333 | face.sentData.clear(); |
Yanbiao Li | 8ee37ed | 2015-05-19 12:44:04 -0700 | [diff] [blame] | 334 | |
Junxiao Shi | 85d9083 | 2016-08-04 03:19:46 +0000 | [diff] [blame] | 335 | face.receive(*makeInterest("/root/test/small/%80%00")); // returns 403 |
| 336 | face.receive(*makeInterest("/root/test/small/%80%00/invalid")); // returns 403 |
| 337 | face.receive(*makeInterest("/root/test/small/%80%00/silent")); // silently ignored |
Davide Pesavento | 0f83080 | 2018-01-16 23:58:58 -0500 | [diff] [blame] | 338 | advanceClocks(1_ms, 20); |
Yanbiao Li | 8ee37ed | 2015-05-19 12:44:04 -0700 | [diff] [blame] | 339 | |
Davide Pesavento | 3c34ec1 | 2021-03-28 21:50:06 -0400 | [diff] [blame] | 340 | BOOST_REQUIRE_EQUAL(face.sentData.size(), 2); |
Junxiao Shi | 72c0c64 | 2018-04-20 15:41:09 +0000 | [diff] [blame] | 341 | BOOST_CHECK_EQUAL(face.sentData[0].getContentType(), tlv::ContentType_Blob); |
Alexander Afanasyev | 9bdbb83 | 2015-12-30 12:54:22 -0800 | [diff] [blame] | 342 | BOOST_CHECK_EQUAL(ControlResponse(face.sentData[0].getContent().blockFromValue()).getCode(), 403); |
Junxiao Shi | 72c0c64 | 2018-04-20 15:41:09 +0000 | [diff] [blame] | 343 | BOOST_CHECK_EQUAL(face.sentData[1].getContentType(), tlv::ContentType_Blob); |
Alexander Afanasyev | 9bdbb83 | 2015-12-30 12:54:22 -0800 | [diff] [blame] | 344 | BOOST_CHECK_EQUAL(ControlResponse(face.sentData[1].getContent().blockFromValue()).getCode(), 403); |
Yanbiao Li | 8ee37ed | 2015-05-19 12:44:04 -0700 | [diff] [blame] | 345 | |
Alexander Afanasyev | 9bdbb83 | 2015-12-30 12:54:22 -0800 | [diff] [blame] | 346 | face.sentData.clear(); |
Yanbiao Li | 4b4f754 | 2016-03-11 02:04:43 +0800 | [diff] [blame] | 347 | |
Junxiao Shi | b55e5d3 | 2018-07-18 13:32:00 -0600 | [diff] [blame] | 348 | auto interestSmall = *makeInterest("/root/test/small/valid", true); |
Yanbiao Li | 4b4f754 | 2016-03-11 02:04:43 +0800 | [diff] [blame] | 349 | face.receive(interestSmall); |
Davide Pesavento | 0f83080 | 2018-01-16 23:58:58 -0500 | [diff] [blame] | 350 | advanceClocks(1_ms, 10); |
Yanbiao Li | 4b4f754 | 2016-03-11 02:04:43 +0800 | [diff] [blame] | 351 | |
| 352 | // one data packet is generated and sent to both places |
Davide Pesavento | 3c34ec1 | 2021-03-28 21:50:06 -0400 | [diff] [blame] | 353 | BOOST_REQUIRE_EQUAL(face.sentData.size(), 1); |
Yanbiao Li | 4b4f754 | 2016-03-11 02:04:43 +0800 | [diff] [blame] | 354 | BOOST_CHECK_EQUAL(storage.size(), 1); |
| 355 | |
| 356 | auto fetchedData = storage.find(interestSmall); |
| 357 | BOOST_REQUIRE(fetchedData != nullptr); |
Junxiao Shi | 72c0c64 | 2018-04-20 15:41:09 +0000 | [diff] [blame] | 358 | BOOST_CHECK_EQUAL(face.sentData[0].wireEncode(), fetchedData->wireEncode()); |
Yanbiao Li | 8ee37ed | 2015-05-19 12:44:04 -0700 | [diff] [blame] | 359 | |
Junxiao Shi | 85d9083 | 2016-08-04 03:19:46 +0000 | [diff] [blame] | 360 | face.receive(*makeInterest(Name("/root/test/small/valid").appendVersion(10))); // should be ignored |
| 361 | face.receive(*makeInterest(Name("/root/test/small/valid").appendSegment(20))); // should be ignored |
Davide Pesavento | 0f83080 | 2018-01-16 23:58:58 -0500 | [diff] [blame] | 362 | advanceClocks(1_ms, 10); |
Davide Pesavento | 3c34ec1 | 2021-03-28 21:50:06 -0400 | [diff] [blame] | 363 | BOOST_REQUIRE_EQUAL(face.sentData.size(), 1); |
Yanbiao Li | 4b4f754 | 2016-03-11 02:04:43 +0800 | [diff] [blame] | 364 | BOOST_CHECK_EQUAL(storage.size(), 1); |
Yanbiao Li | 8ee37ed | 2015-05-19 12:44:04 -0700 | [diff] [blame] | 365 | |
Alexander Afanasyev | 9bdbb83 | 2015-12-30 12:54:22 -0800 | [diff] [blame] | 366 | Block content = face.sentData[0].getContent(); |
Yanbiao Li | 8ee37ed | 2015-05-19 12:44:04 -0700 | [diff] [blame] | 367 | BOOST_CHECK_NO_THROW(content.parse()); |
| 368 | |
Junxiao Shi | 72c0c64 | 2018-04-20 15:41:09 +0000 | [diff] [blame] | 369 | BOOST_REQUIRE_EQUAL(content.elements().size(), 3); |
| 370 | BOOST_CHECK_EQUAL(content.elements()[0], smallBlock); |
| 371 | BOOST_CHECK_EQUAL(content.elements()[1], smallBlock); |
| 372 | BOOST_CHECK_EQUAL(content.elements()[2], smallBlock); |
Yanbiao Li | 8ee37ed | 2015-05-19 12:44:04 -0700 | [diff] [blame] | 373 | |
Yanbiao Li | 4b4f754 | 2016-03-11 02:04:43 +0800 | [diff] [blame] | 374 | storage.erase("/", true); // clear the storage |
Alexander Afanasyev | 9bdbb83 | 2015-12-30 12:54:22 -0800 | [diff] [blame] | 375 | face.sentData.clear(); |
Junxiao Shi | 85d9083 | 2016-08-04 03:19:46 +0000 | [diff] [blame] | 376 | face.receive(*makeInterest("/root/test/large/valid")); |
Davide Pesavento | 0f83080 | 2018-01-16 23:58:58 -0500 | [diff] [blame] | 377 | advanceClocks(1_ms, 10); |
Yanbiao Li | 8ee37ed | 2015-05-19 12:44:04 -0700 | [diff] [blame] | 378 | |
Yanbiao Li | 4b4f754 | 2016-03-11 02:04:43 +0800 | [diff] [blame] | 379 | // two data packets are generated, the first one will be sent to both places |
| 380 | // while the second one will only be inserted into the in-memory storage |
Davide Pesavento | 3c34ec1 | 2021-03-28 21:50:06 -0400 | [diff] [blame] | 381 | BOOST_REQUIRE_EQUAL(face.sentData.size(), 1); |
| 382 | BOOST_REQUIRE_EQUAL(storage.size(), 2); |
Yanbiao Li | 4b4f754 | 2016-03-11 02:04:43 +0800 | [diff] [blame] | 383 | |
| 384 | // segment0 should be sent through the face |
| 385 | const auto& component = face.sentData[0].getName().at(-1); |
| 386 | BOOST_CHECK(component.isSegment()); |
| 387 | BOOST_CHECK_EQUAL(component.toSegment(), 0); |
| 388 | |
| 389 | std::vector<Data> dataInStorage; |
| 390 | std::copy(storage.begin(), storage.end(), std::back_inserter(dataInStorage)); |
| 391 | |
| 392 | // the Data sent through the face should be the same as the first Data in the storage |
| 393 | BOOST_CHECK_EQUAL(face.sentData[0].getName(), dataInStorage[0].getName()); |
Junxiao Shi | 72c0c64 | 2018-04-20 15:41:09 +0000 | [diff] [blame] | 394 | BOOST_CHECK_EQUAL(face.sentData[0].getContent(), dataInStorage[0].getContent()); |
Yanbiao Li | 4b4f754 | 2016-03-11 02:04:43 +0800 | [diff] [blame] | 395 | |
| 396 | content = [&dataInStorage] () -> Block { |
Yanbiao Li | 8ee37ed | 2015-05-19 12:44:04 -0700 | [diff] [blame] | 397 | EncodingBuffer encoder; |
Davide Pesavento | 258d51a | 2022-02-27 21:26:28 -0500 | [diff] [blame] | 398 | size_t valueLength = encoder.prependBytes(dataInStorage[1].getContent().value_bytes()); |
| 399 | valueLength += encoder.prependBytes(dataInStorage[0].getContent().value_bytes()); |
Yanbiao Li | 8ee37ed | 2015-05-19 12:44:04 -0700 | [diff] [blame] | 400 | encoder.prependVarNumber(valueLength); |
| 401 | encoder.prependVarNumber(tlv::Content); |
| 402 | return encoder.block(); |
| 403 | }(); |
| 404 | |
| 405 | BOOST_CHECK_NO_THROW(content.parse()); |
Junxiao Shi | 72c0c64 | 2018-04-20 15:41:09 +0000 | [diff] [blame] | 406 | BOOST_REQUIRE_EQUAL(content.elements().size(), 3); |
| 407 | BOOST_CHECK_EQUAL(content.elements()[0], largeBlock); |
| 408 | BOOST_CHECK_EQUAL(content.elements()[1], largeBlock); |
| 409 | BOOST_CHECK_EQUAL(content.elements()[2], largeBlock); |
Yanbiao Li | 8ee37ed | 2015-05-19 12:44:04 -0700 | [diff] [blame] | 410 | |
Yanbiao Li | 4b4f754 | 2016-03-11 02:04:43 +0800 | [diff] [blame] | 411 | storage.erase("/", true);// clear the storage |
Alexander Afanasyev | 9bdbb83 | 2015-12-30 12:54:22 -0800 | [diff] [blame] | 412 | face.sentData.clear(); |
Junxiao Shi | 85d9083 | 2016-08-04 03:19:46 +0000 | [diff] [blame] | 413 | face.receive(*makeInterest("/root/test/reject/%80%00/valid")); // returns nack |
Davide Pesavento | 0f83080 | 2018-01-16 23:58:58 -0500 | [diff] [blame] | 414 | advanceClocks(1_ms); |
Davide Pesavento | 3c34ec1 | 2021-03-28 21:50:06 -0400 | [diff] [blame] | 415 | |
| 416 | BOOST_REQUIRE_EQUAL(face.sentData.size(), 1); |
Junxiao Shi | 72c0c64 | 2018-04-20 15:41:09 +0000 | [diff] [blame] | 417 | BOOST_CHECK_EQUAL(face.sentData[0].getContentType(), tlv::ContentType_Nack); |
Alexander Afanasyev | 9bdbb83 | 2015-12-30 12:54:22 -0800 | [diff] [blame] | 418 | BOOST_CHECK_EQUAL(ControlResponse(face.sentData[0].getContent().blockFromValue()).getCode(), 400); |
Yanbiao Li | 4b4f754 | 2016-03-11 02:04:43 +0800 | [diff] [blame] | 419 | BOOST_CHECK_EQUAL(storage.size(), 0); // the nack packet will not be inserted into the in-memory storage |
Yanbiao Li | 8ee37ed | 2015-05-19 12:44:04 -0700 | [diff] [blame] | 420 | } |
| 421 | |
Junxiao Shi | d97c953 | 2017-04-27 16:17:04 +0000 | [diff] [blame] | 422 | BOOST_AUTO_TEST_CASE(NotificationStream) |
Yanbiao Li | 8ee37ed | 2015-05-19 12:44:04 -0700 | [diff] [blame] | 423 | { |
Davide Pesavento | fbea4fc | 2022-02-08 07:26:04 -0500 | [diff] [blame] | 424 | const Block block({0x82, 0x01, 0x02}); |
Yanbiao Li | 8ee37ed | 2015-05-19 12:44:04 -0700 | [diff] [blame] | 425 | auto post = dispatcher.addNotificationStream("test"); |
| 426 | |
| 427 | post(block); |
Davide Pesavento | 0f83080 | 2018-01-16 23:58:58 -0500 | [diff] [blame] | 428 | advanceClocks(1_ms); |
Alexander Afanasyev | 9bdbb83 | 2015-12-30 12:54:22 -0800 | [diff] [blame] | 429 | BOOST_CHECK_EQUAL(face.sentData.size(), 0); |
Yanbiao Li | 8ee37ed | 2015-05-19 12:44:04 -0700 | [diff] [blame] | 430 | |
| 431 | dispatcher.addTopPrefix("/root"); |
Davide Pesavento | 0f83080 | 2018-01-16 23:58:58 -0500 | [diff] [blame] | 432 | advanceClocks(1_ms); |
Alexander Afanasyev | 9bdbb83 | 2015-12-30 12:54:22 -0800 | [diff] [blame] | 433 | face.sentData.clear(); |
Yanbiao Li | 8ee37ed | 2015-05-19 12:44:04 -0700 | [diff] [blame] | 434 | |
| 435 | post(block); |
Davide Pesavento | 0f83080 | 2018-01-16 23:58:58 -0500 | [diff] [blame] | 436 | advanceClocks(1_ms); |
Alexander Afanasyev | 9bdbb83 | 2015-12-30 12:54:22 -0800 | [diff] [blame] | 437 | BOOST_CHECK_EQUAL(face.sentData.size(), 1); |
Yanbiao Li | 4b4f754 | 2016-03-11 02:04:43 +0800 | [diff] [blame] | 438 | BOOST_CHECK_EQUAL(storage.size(), 1); |
Yanbiao Li | 8ee37ed | 2015-05-19 12:44:04 -0700 | [diff] [blame] | 439 | |
| 440 | post(block); |
| 441 | post(block); |
| 442 | post(block); |
Davide Pesavento | 0f83080 | 2018-01-16 23:58:58 -0500 | [diff] [blame] | 443 | advanceClocks(1_ms, 10); |
Yanbiao Li | 8ee37ed | 2015-05-19 12:44:04 -0700 | [diff] [blame] | 444 | |
Junxiao Shi | 72c0c64 | 2018-04-20 15:41:09 +0000 | [diff] [blame] | 445 | BOOST_REQUIRE_EQUAL(face.sentData.size(), 4); |
Eric Newberry | c25e463 | 2021-02-11 10:48:11 -0800 | [diff] [blame] | 446 | BOOST_CHECK_EQUAL(face.sentData[0].getName(), "/root/test/seq=0"); |
| 447 | BOOST_CHECK_EQUAL(face.sentData[1].getName(), "/root/test/seq=1"); |
| 448 | BOOST_CHECK_EQUAL(face.sentData[2].getName(), "/root/test/seq=2"); |
| 449 | BOOST_CHECK_EQUAL(face.sentData[3].getName(), "/root/test/seq=3"); |
Yanbiao Li | 8ee37ed | 2015-05-19 12:44:04 -0700 | [diff] [blame] | 450 | |
Junxiao Shi | 72c0c64 | 2018-04-20 15:41:09 +0000 | [diff] [blame] | 451 | BOOST_CHECK_EQUAL(face.sentData[0].getContent().blockFromValue(), block); |
| 452 | BOOST_CHECK_EQUAL(face.sentData[1].getContent().blockFromValue(), block); |
| 453 | BOOST_CHECK_EQUAL(face.sentData[2].getContent().blockFromValue(), block); |
| 454 | BOOST_CHECK_EQUAL(face.sentData[3].getContent().blockFromValue(), block); |
Yanbiao Li | 4b4f754 | 2016-03-11 02:04:43 +0800 | [diff] [blame] | 455 | |
| 456 | // each version of notification will be sent to both places |
| 457 | std::vector<Data> dataInStorage; |
| 458 | std::copy(storage.begin(), storage.end(), std::back_inserter(dataInStorage)); |
Junxiao Shi | 72c0c64 | 2018-04-20 15:41:09 +0000 | [diff] [blame] | 459 | BOOST_REQUIRE_EQUAL(dataInStorage.size(), 4); |
Eric Newberry | c25e463 | 2021-02-11 10:48:11 -0800 | [diff] [blame] | 460 | BOOST_CHECK_EQUAL(dataInStorage[0].getName(), "/root/test/seq=0"); |
| 461 | BOOST_CHECK_EQUAL(dataInStorage[1].getName(), "/root/test/seq=1"); |
| 462 | BOOST_CHECK_EQUAL(dataInStorage[2].getName(), "/root/test/seq=2"); |
| 463 | BOOST_CHECK_EQUAL(dataInStorage[3].getName(), "/root/test/seq=3"); |
Yanbiao Li | 4b4f754 | 2016-03-11 02:04:43 +0800 | [diff] [blame] | 464 | |
Junxiao Shi | 72c0c64 | 2018-04-20 15:41:09 +0000 | [diff] [blame] | 465 | BOOST_CHECK_EQUAL(dataInStorage[0].getContent().blockFromValue(), block); |
| 466 | BOOST_CHECK_EQUAL(dataInStorage[1].getContent().blockFromValue(), block); |
| 467 | BOOST_CHECK_EQUAL(dataInStorage[2].getContent().blockFromValue(), block); |
| 468 | BOOST_CHECK_EQUAL(dataInStorage[3].getContent().blockFromValue(), block); |
Yanbiao Li | 8ee37ed | 2015-05-19 12:44:04 -0700 | [diff] [blame] | 469 | } |
| 470 | |
Yanbiao Li | 4b4f754 | 2016-03-11 02:04:43 +0800 | [diff] [blame] | 471 | BOOST_AUTO_TEST_SUITE_END() // TestDispatcher |
| 472 | BOOST_AUTO_TEST_SUITE_END() // Mgmt |
Yanbiao Li | 8ee37ed | 2015-05-19 12:44:04 -0700 | [diff] [blame] | 473 | |
Davide Pesavento | 47ce2ee | 2023-05-09 01:33:33 -0400 | [diff] [blame] | 474 | } // namespace ndn::tests |