fix
Change-Id: Ide41d541eda521cc8f2c1cce6ce8969c48b1af71
diff --git a/tests/unit-tests/protocol-encoders.t.cpp b/tests/unit-tests/protocol-encoders.t.cpp
index 6382194..0131e83 100644
--- a/tests/unit-tests/protocol-encoders.t.cpp
+++ b/tests/unit-tests/protocol-encoders.t.cpp
@@ -49,7 +49,7 @@
BOOST_CHECK_EQUAL(item.m_caInfo, config.m_caItem.m_caInfo);
BOOST_CHECK_EQUAL(item.m_caPrefix, config.m_caItem.m_caPrefix);
BOOST_CHECK_EQUAL_COLLECTIONS(item.m_probeParameterKeys.begin(), item.m_probeParameterKeys.end(),
- config.m_caItem.m_probeParameterKeys.begin(), config.m_caItem.m_probeParameterKeys.end())
+ config.m_caItem.m_probeParameterKeys.begin(), config.m_caItem.m_probeParameterKeys.end());
BOOST_CHECK_EQUAL(item.m_maxValidityPeriod, config.m_caItem.m_maxValidityPeriod);
}
@@ -145,7 +145,6 @@
{
const uint8_t key[] = {0x23, 0x70, 0xe3, 0x20, 0xd4, 0x34, 0x42, 0x08,
0xe0, 0xff, 0x56, 0x83, 0xf2, 0x43, 0xb2, 0x13};
- time::system_clock::TimePoint t = time::system_clock::now();
requester::ProfileStorage caCache;
caCache.load("tests/unit-tests/config-files/config-client-1");
security::Certificate certRequest = *caCache.m_caItems.front().m_cert;
@@ -153,13 +152,14 @@
std::array<uint8_t, 16> aesKey;
std::memcpy(aesKey.data(), key, sizeof(key));
ca::RequestState state(Name("/ndn/ucla"), id, RequestType::NEW, Status::PENDING,
- certRequest, "pin", "test", t, 3, time::seconds(321), JsonSection(),
+ certRequest, "pin", "test", time::system_clock::now(), 3, time::seconds(321), JsonSection(),
std::move(aesKey), 0);
- auto b = ChallengeEncoder::encodeDataContent(state, Name("/ndn/ucla/a/b/c"));
+ auto contentBlock = ChallengeEncoder::encodeDataContent(state, Name("/ndn/ucla/a/b/c"));
requester::RequestContext context(m_keyChain, caCache.m_caItems.front(), RequestType::NEW);
+ context.m_requestId = id;
std::memcpy(context.m_aesKey.data(), key, sizeof(key));
- ChallengeEncoder::decodeDataContent(b, context);
+ ChallengeEncoder::decodeDataContent(contentBlock, context);
BOOST_CHECK_EQUAL(static_cast<size_t>(context.m_status), static_cast<size_t>(Status::PENDING));
BOOST_CHECK_EQUAL(context.m_challengeStatus, "test");