diff options
author | Jack Mulrow <jack.mulrow@mongodb.com> | 2017-02-03 14:37:27 -0500 |
---|---|---|
committer | Jack Mulrow <jack.mulrow@mongodb.com> | 2017-03-02 12:24:37 -0500 |
commit | 0d408153594e2e2366e0729397ca2890f00b026c (patch) | |
tree | 5201e5e9fd707447543bf8c638b0a701f314ca5e /src/mongo/db/logical_clock_test.cpp | |
parent | 8c173ff0776c2c4ab1698a26aee2d087f973a3de (diff) | |
download | mongo-0d408153594e2e2366e0729397ca2890f00b026c.tar.gz |
SERVER-27768 Implement HMAC key for signing Logical clock's storage & distribution
Diffstat (limited to 'src/mongo/db/logical_clock_test.cpp')
-rw-r--r-- | src/mongo/db/logical_clock_test.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/mongo/db/logical_clock_test.cpp b/src/mongo/db/logical_clock_test.cpp index 729edaf650c..e3e75acd9dc 100644 --- a/src/mongo/db/logical_clock_test.cpp +++ b/src/mongo/db/logical_clock_test.cpp @@ -46,7 +46,9 @@ class LogicalClockTestBase : public unittest::Test { protected: void setUp() { _serviceContext = stdx::make_unique<ServiceContextNoop>(); - auto pTps = stdx::make_unique<TimeProofService>(); + std::array<std::uint8_t, 20> tempKey = {}; + TimeProofService::Key key(std::move(tempKey)); + auto pTps = stdx::make_unique<TimeProofService>(std::move(key)); _timeProofService = pTps.get(); _clock = stdx::make_unique<LogicalClock>(_serviceContext.get(), std::move(pTps), true); } @@ -75,7 +77,9 @@ TEST_F(LogicalClockTestBase, roundtrip) { // Create different logicalClock instance to validate that the initial time is preserved. ServiceContextNoop serviceContext; Timestamp tX(1); - auto pTps = stdx::make_unique<TimeProofService>(); + std::array<std::uint8_t, 20> tempKey = {}; + TimeProofService::Key key(std::move(tempKey)); + auto pTps = stdx::make_unique<TimeProofService>(std::move(key)); auto time = LogicalTime(tX); LogicalClock logicalClock(&serviceContext, std::move(pTps), true); |