Ashlesh Gawande | 85998a1 | 2017-12-07 22:22:13 -0600 | [diff] [blame] | 1 | /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ |
Ashlesh Gawande | 30d96e4 | 2021-03-21 19:15:33 -0700 | [diff] [blame] | 2 | /* |
Davide Pesavento | d1f1df8 | 2022-03-12 16:40:37 -0500 | [diff] [blame] | 3 | * Copyright (c) 2014-2022, The University of Memphis, |
Ashlesh Gawande | 85998a1 | 2017-12-07 22:22:13 -0600 | [diff] [blame] | 4 | * Regents of the University of California, |
| 5 | * Arizona Board of Regents. |
| 6 | * |
| 7 | * This file is part of NLSR (Named-data Link State Routing). |
| 8 | * See AUTHORS.md for complete list of NLSR authors and contributors. |
| 9 | * |
| 10 | * NLSR is free software: you can redistribute it and/or modify it under the terms |
| 11 | * of the GNU General Public License as published by the Free Software Foundation, |
| 12 | * either version 3 of the License, or (at your option) any later version. |
| 13 | * |
| 14 | * NLSR is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; |
| 15 | * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR |
| 16 | * PURPOSE. See the GNU General Public License for more details. |
| 17 | * |
| 18 | * You should have received a copy of the GNU General Public License along with |
| 19 | * NLSR, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>. |
Ashlesh Gawande | 30d96e4 | 2021-03-21 19:15:33 -0700 | [diff] [blame] | 20 | */ |
Ashlesh Gawande | 85998a1 | 2017-12-07 22:22:13 -0600 | [diff] [blame] | 21 | |
| 22 | #include "communication/sync-logic-handler.hpp" |
Ashlesh Gawande | 85998a1 | 2017-12-07 22:22:13 -0600 | [diff] [blame] | 23 | #include "nlsr.hpp" |
Ashlesh Gawande | 85998a1 | 2017-12-07 22:22:13 -0600 | [diff] [blame] | 24 | |
Davide Pesavento | 8de8a8b | 2022-05-12 01:26:43 -0400 | [diff] [blame] | 25 | #include "tests/io-key-chain-fixture.hpp" |
| 26 | #include "tests/test-common.hpp" |
| 27 | |
Ashlesh Gawande | 30d96e4 | 2021-03-21 19:15:33 -0700 | [diff] [blame] | 28 | #include <boost/lexical_cast.hpp> |
Ashlesh Gawande | 85998a1 | 2017-12-07 22:22:13 -0600 | [diff] [blame] | 29 | |
| 30 | namespace nlsr { |
| 31 | namespace test { |
| 32 | |
| 33 | using std::shared_ptr; |
| 34 | |
Davide Pesavento | 8de8a8b | 2022-05-12 01:26:43 -0400 | [diff] [blame] | 35 | class SyncLogicFixture : public IoKeyChainFixture |
Ashlesh Gawande | 85998a1 | 2017-12-07 22:22:13 -0600 | [diff] [blame] | 36 | { |
| 37 | public: |
| 38 | SyncLogicFixture() |
Davide Pesavento | d1f1df8 | 2022-03-12 16:40:37 -0500 | [diff] [blame] | 39 | : testIsLsaNew([] (auto&&...) { return true; }) |
Ashlesh Gawande | 85998a1 | 2017-12-07 22:22:13 -0600 | [diff] [blame] | 40 | , sync(face, testIsLsaNew, conf) |
| 41 | , updateNamePrefix(this->conf.getLsaPrefix().toUri() + |
| 42 | this->conf.getSiteName().toUri() + |
| 43 | "/%C1.Router/other-router/") |
| 44 | { |
Davide Pesavento | 8de8a8b | 2022-05-12 01:26:43 -0400 | [diff] [blame] | 45 | m_keyChain.createIdentity(conf.getRouterPrefix()); |
Ashlesh Gawande | 85998a1 | 2017-12-07 22:22:13 -0600 | [diff] [blame] | 46 | } |
| 47 | |
| 48 | void |
| 49 | receiveUpdate(const std::string& prefix, uint64_t seqNo) |
| 50 | { |
| 51 | this->advanceClocks(ndn::time::milliseconds(1), 10); |
| 52 | face.sentInterests.clear(); |
| 53 | |
Ashlesh Gawande | 30d96e4 | 2021-03-21 19:15:33 -0700 | [diff] [blame] | 54 | std::vector<psync::MissingDataInfo> updates; |
Alexander Afanasyev | 135288c | 2022-04-23 23:06:56 -0400 | [diff] [blame] | 55 | updates.push_back({ndn::Name(prefix), 0, seqNo, 0}); |
Ashlesh Gawande | 30d96e4 | 2021-03-21 19:15:33 -0700 | [diff] [blame] | 56 | sync.m_syncLogic.onPSyncUpdate(updates); |
Ashlesh Gawande | 85998a1 | 2017-12-07 22:22:13 -0600 | [diff] [blame] | 57 | |
| 58 | this->advanceClocks(ndn::time::milliseconds(1), 10); |
| 59 | } |
| 60 | |
| 61 | public: |
Davide Pesavento | 8de8a8b | 2022-05-12 01:26:43 -0400 | [diff] [blame] | 62 | ndn::util::DummyClientFace face{m_io, m_keyChain}; |
Davide Pesavento | d1f1df8 | 2022-03-12 16:40:37 -0500 | [diff] [blame] | 63 | ConfParameter conf{face, m_keyChain}; |
| 64 | DummyConfFileProcessor confProcessor{conf, SYNC_PROTOCOL_PSYNC}; |
Ashlesh Gawande | 85998a1 | 2017-12-07 22:22:13 -0600 | [diff] [blame] | 65 | SyncLogicHandler::IsLsaNew testIsLsaNew; |
| 66 | SyncLogicHandler sync; |
| 67 | |
| 68 | const std::string updateNamePrefix; |
Davide Pesavento | 8de8a8b | 2022-05-12 01:26:43 -0400 | [diff] [blame] | 69 | const std::vector<Lsa::Type> lsaTypes{Lsa::Type::NAME, |
| 70 | Lsa::Type::ADJACENCY, |
| 71 | Lsa::Type::COORDINATE}; |
Ashlesh Gawande | 85998a1 | 2017-12-07 22:22:13 -0600 | [diff] [blame] | 72 | }; |
| 73 | |
Davide Pesavento | d1f1df8 | 2022-03-12 16:40:37 -0500 | [diff] [blame] | 74 | BOOST_FIXTURE_TEST_SUITE(TestSyncLogicHandler, SyncLogicFixture) |
Ashlesh Gawande | 85998a1 | 2017-12-07 22:22:13 -0600 | [diff] [blame] | 75 | |
| 76 | /* Tests that when SyncLogicHandler receives an LSA of either Name or |
| 77 | Adjacency type that appears to be newer, it will emit to its signal |
| 78 | with those LSA details. |
| 79 | */ |
Davide Pesavento | d1f1df8 | 2022-03-12 16:40:37 -0500 | [diff] [blame] | 80 | BOOST_AUTO_TEST_CASE(UpdateForOtherLS) |
Ashlesh Gawande | 85998a1 | 2017-12-07 22:22:13 -0600 | [diff] [blame] | 81 | { |
Davide Pesavento | d1f1df8 | 2022-03-12 16:40:37 -0500 | [diff] [blame] | 82 | size_t nCallbacks = 0; |
Ashlesh Gawande | 85998a1 | 2017-12-07 22:22:13 -0600 | [diff] [blame] | 83 | uint64_t syncSeqNo = 1; |
| 84 | |
Davide Pesavento | d1f1df8 | 2022-03-12 16:40:37 -0500 | [diff] [blame] | 85 | for (auto lsaType : {Lsa::Type::NAME, Lsa::Type::ADJACENCY}) { |
Ashlesh Gawande | 0db4d4d | 2020-02-05 20:30:02 -0800 | [diff] [blame] | 86 | std::string updateName = this->updateNamePrefix + boost::lexical_cast<std::string>(lsaType); |
Ashlesh Gawande | 85998a1 | 2017-12-07 22:22:13 -0600 | [diff] [blame] | 87 | |
Ashlesh Gawande | 85998a1 | 2017-12-07 22:22:13 -0600 | [diff] [blame] | 88 | ndn::util::signal::ScopedConnection connection = this->sync.onNewLsa->connect( |
Alexander Afanasyev | 135288c | 2022-04-23 23:06:56 -0400 | [diff] [blame] | 89 | [&] (const auto& routerName, uint64_t sequenceNumber, const auto& originRouter, uint64_t incomingFaceId) { |
Ashlesh Gawande | 85998a1 | 2017-12-07 22:22:13 -0600 | [diff] [blame] | 90 | BOOST_CHECK_EQUAL(ndn::Name{updateName}, routerName); |
| 91 | BOOST_CHECK_EQUAL(sequenceNumber, syncSeqNo); |
Davide Pesavento | d1f1df8 | 2022-03-12 16:40:37 -0500 | [diff] [blame] | 92 | ++nCallbacks; |
Ashlesh Gawande | 85998a1 | 2017-12-07 22:22:13 -0600 | [diff] [blame] | 93 | }); |
| 94 | |
| 95 | this->receiveUpdate(updateName, syncSeqNo); |
| 96 | } |
Davide Pesavento | d1f1df8 | 2022-03-12 16:40:37 -0500 | [diff] [blame] | 97 | |
| 98 | BOOST_CHECK_EQUAL(nCallbacks, 2); |
Ashlesh Gawande | 85998a1 | 2017-12-07 22:22:13 -0600 | [diff] [blame] | 99 | } |
| 100 | |
| 101 | /* Tests that when SyncLogicHandler in HR mode receives an LSA of |
| 102 | either Coordinate or Name type that appears to be newer, it will |
| 103 | emit to its signal with those LSA details. |
| 104 | */ |
Davide Pesavento | d1f1df8 | 2022-03-12 16:40:37 -0500 | [diff] [blame] | 105 | BOOST_AUTO_TEST_CASE(UpdateForOtherHR) |
Ashlesh Gawande | 85998a1 | 2017-12-07 22:22:13 -0600 | [diff] [blame] | 106 | { |
| 107 | this->conf.setHyperbolicState(HYPERBOLIC_STATE_ON); |
| 108 | |
Davide Pesavento | d1f1df8 | 2022-03-12 16:40:37 -0500 | [diff] [blame] | 109 | size_t nCallbacks = 0; |
Ashlesh Gawande | 85998a1 | 2017-12-07 22:22:13 -0600 | [diff] [blame] | 110 | uint64_t syncSeqNo = 1; |
Ashlesh Gawande | 85998a1 | 2017-12-07 22:22:13 -0600 | [diff] [blame] | 111 | |
Davide Pesavento | d1f1df8 | 2022-03-12 16:40:37 -0500 | [diff] [blame] | 112 | for (auto lsaType : {Lsa::Type::NAME, Lsa::Type::COORDINATE}) { |
Ashlesh Gawande | 0db4d4d | 2020-02-05 20:30:02 -0800 | [diff] [blame] | 113 | std::string updateName = this->updateNamePrefix + boost::lexical_cast<std::string>(lsaType); |
Ashlesh Gawande | 85998a1 | 2017-12-07 22:22:13 -0600 | [diff] [blame] | 114 | |
| 115 | ndn::util::signal::ScopedConnection connection = this->sync.onNewLsa->connect( |
Alexander Afanasyev | 135288c | 2022-04-23 23:06:56 -0400 | [diff] [blame] | 116 | [&] (const auto& routerName, uint64_t sequenceNumber, const auto& originRouter, uint64_t incomingFaceId) { |
Ashlesh Gawande | 85998a1 | 2017-12-07 22:22:13 -0600 | [diff] [blame] | 117 | BOOST_CHECK_EQUAL(ndn::Name{updateName}, routerName); |
| 118 | BOOST_CHECK_EQUAL(sequenceNumber, syncSeqNo); |
Davide Pesavento | d1f1df8 | 2022-03-12 16:40:37 -0500 | [diff] [blame] | 119 | ++nCallbacks; |
Ashlesh Gawande | 85998a1 | 2017-12-07 22:22:13 -0600 | [diff] [blame] | 120 | }); |
| 121 | |
| 122 | this->receiveUpdate(updateName, syncSeqNo); |
| 123 | } |
Davide Pesavento | d1f1df8 | 2022-03-12 16:40:37 -0500 | [diff] [blame] | 124 | |
| 125 | BOOST_CHECK_EQUAL(nCallbacks, 2); |
Ashlesh Gawande | 85998a1 | 2017-12-07 22:22:13 -0600 | [diff] [blame] | 126 | } |
| 127 | |
| 128 | /* Tests that when SyncLogicHandler in HR-dry mode receives an LSA of |
| 129 | any type that appears to be newer, it will emit to its signal with |
| 130 | those LSA details. |
| 131 | */ |
Davide Pesavento | d1f1df8 | 2022-03-12 16:40:37 -0500 | [diff] [blame] | 132 | BOOST_AUTO_TEST_CASE(UpdateForOtherHRDry) |
Ashlesh Gawande | 85998a1 | 2017-12-07 22:22:13 -0600 | [diff] [blame] | 133 | { |
| 134 | this->conf.setHyperbolicState(HYPERBOLIC_STATE_DRY_RUN); |
| 135 | |
Davide Pesavento | d1f1df8 | 2022-03-12 16:40:37 -0500 | [diff] [blame] | 136 | size_t nCallbacks = 0; |
Ashlesh Gawande | 85998a1 | 2017-12-07 22:22:13 -0600 | [diff] [blame] | 137 | uint64_t syncSeqNo = 1; |
| 138 | |
Davide Pesavento | d1f1df8 | 2022-03-12 16:40:37 -0500 | [diff] [blame] | 139 | for (auto lsaType : this->lsaTypes) { |
Ashlesh Gawande | 0db4d4d | 2020-02-05 20:30:02 -0800 | [diff] [blame] | 140 | std::string updateName = this->updateNamePrefix + boost::lexical_cast<std::string>(lsaType); |
Ashlesh Gawande | 85998a1 | 2017-12-07 22:22:13 -0600 | [diff] [blame] | 141 | |
| 142 | ndn::util::signal::ScopedConnection connection = this->sync.onNewLsa->connect( |
Alexander Afanasyev | 135288c | 2022-04-23 23:06:56 -0400 | [diff] [blame] | 143 | [&] (const auto& routerName, uint64_t sequenceNumber, const auto& originRouter, uint64_t incomingFaceId) { |
Ashlesh Gawande | 85998a1 | 2017-12-07 22:22:13 -0600 | [diff] [blame] | 144 | BOOST_CHECK_EQUAL(ndn::Name{updateName}, routerName); |
| 145 | BOOST_CHECK_EQUAL(sequenceNumber, syncSeqNo); |
Davide Pesavento | d1f1df8 | 2022-03-12 16:40:37 -0500 | [diff] [blame] | 146 | ++nCallbacks; |
Ashlesh Gawande | 85998a1 | 2017-12-07 22:22:13 -0600 | [diff] [blame] | 147 | }); |
| 148 | |
| 149 | this->receiveUpdate(updateName, syncSeqNo); |
| 150 | } |
Davide Pesavento | d1f1df8 | 2022-03-12 16:40:37 -0500 | [diff] [blame] | 151 | |
| 152 | BOOST_CHECK_EQUAL(nCallbacks, 3); |
Ashlesh Gawande | 85998a1 | 2017-12-07 22:22:13 -0600 | [diff] [blame] | 153 | } |
| 154 | |
| 155 | /* Tests that when SyncLogicHandler receives an update for an LSA with |
| 156 | details matching this router's details, it will *not* emit to its |
| 157 | signal those LSA details. |
| 158 | */ |
Davide Pesavento | d1f1df8 | 2022-03-12 16:40:37 -0500 | [diff] [blame] | 159 | BOOST_AUTO_TEST_CASE(NoUpdateForSelf) |
Ashlesh Gawande | 85998a1 | 2017-12-07 22:22:13 -0600 | [diff] [blame] | 160 | { |
| 161 | const uint64_t sequenceNumber = 1; |
| 162 | |
Davide Pesavento | d1f1df8 | 2022-03-12 16:40:37 -0500 | [diff] [blame] | 163 | for (auto lsaType : this->lsaTypes) { |
Ashlesh Gawande | 85998a1 | 2017-12-07 22:22:13 -0600 | [diff] [blame] | 164 | // To ensure that we get correctly-separated components, create |
| 165 | // and modify a Name to hand off. |
Davide Pesavento | d1f1df8 | 2022-03-12 16:40:37 -0500 | [diff] [blame] | 166 | ndn::Name updateName{this->conf.getLsaPrefix()}; |
Ashlesh Gawande | 85998a1 | 2017-12-07 22:22:13 -0600 | [diff] [blame] | 167 | updateName.append(this->conf.getSiteName()) |
| 168 | .append(this->conf.getRouterName()) |
Ashlesh Gawande | 0db4d4d | 2020-02-05 20:30:02 -0800 | [diff] [blame] | 169 | .append(boost::lexical_cast<std::string>(lsaType)); |
Ashlesh Gawande | 85998a1 | 2017-12-07 22:22:13 -0600 | [diff] [blame] | 170 | |
| 171 | ndn::util::signal::ScopedConnection connection = this->sync.onNewLsa->connect( |
Alexander Afanasyev | 135288c | 2022-04-23 23:06:56 -0400 | [diff] [blame] | 172 | [&] (const auto& routerName, uint64_t sequenceNumber, const auto& originRouter, uint64_t incomingFaceId) { |
Ashlesh Gawande | 85998a1 | 2017-12-07 22:22:13 -0600 | [diff] [blame] | 173 | BOOST_FAIL("Updates for self should not be emitted!"); |
| 174 | }); |
| 175 | |
| 176 | this->receiveUpdate(updateName.toUri(), sequenceNumber); |
| 177 | } |
Davide Pesavento | d1f1df8 | 2022-03-12 16:40:37 -0500 | [diff] [blame] | 178 | |
| 179 | // avoid "test case [...] did not check any assertions" message from Boost.Test |
| 180 | BOOST_CHECK(true); |
Ashlesh Gawande | 85998a1 | 2017-12-07 22:22:13 -0600 | [diff] [blame] | 181 | } |
| 182 | |
| 183 | /* Tests that when SyncLogicHandler receives an update for an LSA with |
| 184 | details that do not match the expected format, it will *not* emit |
| 185 | to its signal those LSA details. |
| 186 | */ |
Davide Pesavento | d1f1df8 | 2022-03-12 16:40:37 -0500 | [diff] [blame] | 187 | BOOST_AUTO_TEST_CASE(MalformedUpdate) |
Ashlesh Gawande | 85998a1 | 2017-12-07 22:22:13 -0600 | [diff] [blame] | 188 | { |
| 189 | const uint64_t sequenceNumber = 1; |
| 190 | |
Davide Pesavento | d1f1df8 | 2022-03-12 16:40:37 -0500 | [diff] [blame] | 191 | for (auto lsaType : this->lsaTypes) { |
Ashlesh Gawande | 85998a1 | 2017-12-07 22:22:13 -0600 | [diff] [blame] | 192 | ndn::Name updateName{this->conf.getSiteName()}; |
Ashlesh Gawande | 0db4d4d | 2020-02-05 20:30:02 -0800 | [diff] [blame] | 193 | updateName.append(this->conf.getRouterName()).append(boost::lexical_cast<std::string>(lsaType)); |
Ashlesh Gawande | 85998a1 | 2017-12-07 22:22:13 -0600 | [diff] [blame] | 194 | |
| 195 | ndn::util::signal::ScopedConnection connection = this->sync.onNewLsa->connect( |
Alexander Afanasyev | 135288c | 2022-04-23 23:06:56 -0400 | [diff] [blame] | 196 | [&] (const auto& routerName, uint64_t sequenceNumber, const auto& originRouter, uint64_t incomingFaceId) { |
Ashlesh Gawande | 85998a1 | 2017-12-07 22:22:13 -0600 | [diff] [blame] | 197 | BOOST_FAIL("Malformed updates should not be emitted!"); |
| 198 | }); |
| 199 | |
| 200 | this->receiveUpdate(updateName.toUri(), sequenceNumber); |
| 201 | } |
Davide Pesavento | d1f1df8 | 2022-03-12 16:40:37 -0500 | [diff] [blame] | 202 | |
| 203 | // avoid "test case [...] did not check any assertions" message from Boost.Test |
| 204 | BOOST_CHECK(true); |
Ashlesh Gawande | 85998a1 | 2017-12-07 22:22:13 -0600 | [diff] [blame] | 205 | } |
| 206 | |
| 207 | /* Tests that when SyncLogicHandler receives an update for an LSA with |
| 208 | details that do not appear to be new, it will *not* emit to its |
| 209 | signal those LSA details. |
| 210 | */ |
Davide Pesavento | d1f1df8 | 2022-03-12 16:40:37 -0500 | [diff] [blame] | 211 | BOOST_AUTO_TEST_CASE(LsaNotNew) |
Ashlesh Gawande | 85998a1 | 2017-12-07 22:22:13 -0600 | [diff] [blame] | 212 | { |
| 213 | auto testLsaAlwaysFalse = [] (const ndn::Name& routerName, const Lsa::Type& lsaType, |
Alexander Afanasyev | 135288c | 2022-04-23 23:06:56 -0400 | [diff] [blame] | 214 | const uint64_t& sequenceNumber, uint64_t incomingFaceId) { |
Ashlesh Gawande | 85998a1 | 2017-12-07 22:22:13 -0600 | [diff] [blame] | 215 | return false; |
| 216 | }; |
| 217 | |
| 218 | const uint64_t sequenceNumber = 1; |
| 219 | SyncLogicHandler sync{this->face, testLsaAlwaysFalse, this->conf}; |
| 220 | ndn::util::signal::ScopedConnection connection = sync.onNewLsa->connect( |
Alexander Afanasyev | 135288c | 2022-04-23 23:06:56 -0400 | [diff] [blame] | 221 | [&] (const auto& routerName, uint64_t sequenceNumber, const auto& originRouter, uint64_t incomingFaceId) { |
Ashlesh Gawande | 85998a1 | 2017-12-07 22:22:13 -0600 | [diff] [blame] | 222 | BOOST_FAIL("An update for an LSA with non-new sequence number should not emit!"); |
| 223 | }); |
| 224 | |
Ashlesh Gawande | 0db4d4d | 2020-02-05 20:30:02 -0800 | [diff] [blame] | 225 | std::string updateName = this->updateNamePrefix + boost::lexical_cast<std::string>(Lsa::Type::NAME); |
Ashlesh Gawande | 85998a1 | 2017-12-07 22:22:13 -0600 | [diff] [blame] | 226 | this->receiveUpdate(updateName, sequenceNumber); |
Davide Pesavento | d1f1df8 | 2022-03-12 16:40:37 -0500 | [diff] [blame] | 227 | |
| 228 | // avoid "test case [...] did not check any assertions" message from Boost.Test |
| 229 | BOOST_CHECK(true); |
Ashlesh Gawande | 85998a1 | 2017-12-07 22:22:13 -0600 | [diff] [blame] | 230 | } |
| 231 | |
| 232 | /* Tests that SyncLogicHandler successfully concatenates configured |
| 233 | variables together to form the necessary prefixes to advertise |
Ashlesh Gawande | 30d96e4 | 2021-03-21 19:15:33 -0700 | [diff] [blame] | 234 | through sync. |
Ashlesh Gawande | 85998a1 | 2017-12-07 22:22:13 -0600 | [diff] [blame] | 235 | */ |
Davide Pesavento | d1f1df8 | 2022-03-12 16:40:37 -0500 | [diff] [blame] | 236 | BOOST_AUTO_TEST_CASE(UpdatePrefix) |
Ashlesh Gawande | 85998a1 | 2017-12-07 22:22:13 -0600 | [diff] [blame] | 237 | { |
| 238 | ndn::Name expectedPrefix = this->conf.getLsaPrefix(); |
| 239 | expectedPrefix.append(this->conf.getSiteName()); |
| 240 | expectedPrefix.append(this->conf.getRouterName()); |
| 241 | |
Ashlesh Gawande | 85998a1 | 2017-12-07 22:22:13 -0600 | [diff] [blame] | 242 | BOOST_CHECK_EQUAL(this->sync.m_nameLsaUserPrefix, |
Ashlesh Gawande | 0db4d4d | 2020-02-05 20:30:02 -0800 | [diff] [blame] | 243 | ndn::Name(expectedPrefix).append(boost::lexical_cast<std::string>(Lsa::Type::NAME))); |
Ashlesh Gawande | 85998a1 | 2017-12-07 22:22:13 -0600 | [diff] [blame] | 244 | BOOST_CHECK_EQUAL(this->sync.m_adjLsaUserPrefix, |
Ashlesh Gawande | 0db4d4d | 2020-02-05 20:30:02 -0800 | [diff] [blame] | 245 | ndn::Name(expectedPrefix).append(boost::lexical_cast<std::string>(Lsa::Type::ADJACENCY))); |
Ashlesh Gawande | 85998a1 | 2017-12-07 22:22:13 -0600 | [diff] [blame] | 246 | BOOST_CHECK_EQUAL(this->sync.m_coorLsaUserPrefix, |
Ashlesh Gawande | 0db4d4d | 2020-02-05 20:30:02 -0800 | [diff] [blame] | 247 | ndn::Name(expectedPrefix).append(boost::lexical_cast<std::string>(Lsa::Type::COORDINATE))); |
Ashlesh Gawande | 85998a1 | 2017-12-07 22:22:13 -0600 | [diff] [blame] | 248 | } |
| 249 | |
Ashlesh Gawande | 85998a1 | 2017-12-07 22:22:13 -0600 | [diff] [blame] | 250 | BOOST_AUTO_TEST_SUITE_END() |
| 251 | |
| 252 | } // namespace test |
| 253 | } // namespace nlsr |