Commit 1e2bc795 authored by johan's avatar johan

Cleaning db files in "without OPk" test

parent 229b5d87
...@@ -143,9 +143,22 @@ static void x3dh_without_OPk_test(const lime::CurveId curve, const std::string & ...@@ -143,9 +143,22 @@ static void x3dh_without_OPk_test(const lime::CurveId curve, const std::string &
auto receivedMessageString = std::string{receivedMessage.begin(), receivedMessage.end()}; auto receivedMessageString = std::string{receivedMessage.begin(), receivedMessage.end()};
BC_ASSERT_TRUE(receivedMessageString == lime_messages_pattern[messagePatternIndex]); BC_ASSERT_TRUE(receivedMessageString == lime_messages_pattern[messagePatternIndex]);
if (cleanDatabase) {
bobManager->delete_user(*bobDeviceId, callback);
BC_ASSERT_TRUE(wait_for(stack,&counters.operation_success,++expected_success,wait_for_timeout)); // we must get a callback saying all went well
}
// destroy and reload the Managers(tests everything is correctly saved/load from local Storage) // destroy and reload the Managers(tests everything is correctly saved/load from local Storage)
if (!continuousSession) { managersClean (aliceManager, bobManager, dbFilenameAlice, dbFilenameBob);} if (!continuousSession) { managersClean (aliceManager, bobManager, dbFilenameAlice, dbFilenameBob);}
} }
// delete the users so the remote DB will be clean too
if (cleanDatabase) {
aliceManager->delete_user(*aliceDeviceId, callback);
BC_ASSERT_TRUE(wait_for(stack,&counters.operation_success,++expected_success,wait_for_timeout)); // we must get a callback saying all went well
remove(dbFilenameAlice.data());
remove(dbFilenameBob.data());
}
} catch (BctbxException &e) { } catch (BctbxException &e) {
BCTBX_SLOGE <<e;; BCTBX_SLOGE <<e;;
BC_FAIL(); BC_FAIL();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment