diff options
author | dec05eba <0xdec05eba@gmail.com> | 2018-05-16 08:13:26 +0200 |
---|---|---|
committer | dec05eba <0xdec05eba@gmail.com> | 2018-05-16 08:13:28 +0200 |
commit | 4254486345167d4800f4a8f2a9b84975f0a4c886 (patch) | |
tree | afb6fcd6d2110b8f86acc9559d728706e767ac05 /tests | |
parent | ba8631c5f75df45fb07726e0aab3bb0834d6a5b6 (diff) |
Return stored node users decrypted as hash map instead of vector
Diffstat (limited to 'tests')
-rw-r--r-- | tests/main.cpp | 7 |
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 |