aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/main.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/main.cpp b/tests/main.cpp
index e819684..3f9bbf9 100644
--- a/tests/main.cpp
+++ b/tests/main.cpp
@@ -221,11 +221,12 @@ int main()
auto nodeUserData = database.getStoredUserNodeDataDecrypted(username, password);
assertEquals((size_t)1, nodeUserData.size());
- if(nodeUserData[0].nodeHash != *databaseNode.getRequestHash())
+ auto userDataIt = nodeUserData.find(*databaseNode.getRequestHash());
+ if(userDataIt == nodeUserData.end())
fail("Expected stored node hash to match node hash");
- if(nodeUserData[0].keyPair.getPublicKey() != adminUserKey->getPublicKey())
+ if(userDataIt->second.getPublicKey() != adminUserKey->getPublicKey())
fail("Expected stored public key to match admin user public key");
- if(nodeUserData[0].keyPair.getPrivateKey() != adminUserKey->getPrivateKey())
+ if(userDataIt->second.getPrivateKey() != adminUserKey->getPrivateKey())
fail("Expected stored private key to match admin user private key");
try