Prepare for testbed deployment: name assignment and redirection policy
Change-Id: I7f4da10b763f3891d33820e9c6f4c7cb0eea60ce
diff --git a/tests/unit-tests/protocol-encoders.t.cpp b/tests/unit-tests/protocol-encoders.t.cpp
index bc1daa0..720c10e 100644
--- a/tests/unit-tests/protocol-encoders.t.cpp
+++ b/tests/unit-tests/protocol-encoders.t.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2017-2021, Regents of the University of California.
+ * Copyright (c) 2017-2022, Regents of the University of California.
*
* This file is part of ndncert, a certificate management system based on NDN.
*
@@ -79,7 +79,9 @@
std::vector<Name> names;
names.emplace_back("/ndn/1");
names.emplace_back("/ndn/2");
- auto b = probetlv::encodeDataContent(names, 2, config.redirection);
+ std::vector<Name> redirectionNames;
+ for (const auto& i : config.redirection) redirectionNames.push_back(i.first->getFullName());
+ auto b = probetlv::encodeDataContent(names, 2, redirectionNames);
std::vector<std::pair<Name, int>> retNames;
std::vector<Name> redirection;
probetlv::decodeDataContent(b, retNames, redirection);
@@ -94,7 +96,7 @@
auto it3 = redirection.begin();
auto it4 = config.redirection.begin();
for (; it3 != redirection.end() && it4 != config.redirection.end(); it3++, it4++) {
- BOOST_CHECK_EQUAL(*it3, (*it4)->getFullName());
+ BOOST_CHECK_EQUAL(*it3, it4->first->getFullName());
}
}