aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2018-05-16 08:13:26 +0200
committerdec05eba <dec05eba@protonmail.com>2020-08-18 23:25:46 +0200
commite81a274f8b330005401c52bc281f5efeee05e116 (patch)
tree18a197312f7980eaccebd31366b064edabcbfd8b /tests
parent92d6393a34dac4b3d623a5169e2b50a9518b4976 (diff)
Return stored node users decrypted as hash map instead of vector
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