mirror of
https://git.jami.net/savoirfairelinux/jami-daemon.git
synced 2025-08-12 22:09:25 +08:00
tests/fileTransfer: testTooLarge
GitLab: #972 Change-Id: Ic345e31ff51c9d51b50df0c911594e9d7f07ebbb
This commit is contained in:
@ -333,8 +333,8 @@ ConversationRequestTest::connectSignals()
|
||||
void
|
||||
ConversationRequestTest::tearDown()
|
||||
{
|
||||
auto bobArchive = std::filesystem::current_path().string() + "/bob.gz";
|
||||
std::remove(bobArchive.c_str());
|
||||
auto bobArchive = std::filesystem::current_path() / "bob.gz";
|
||||
std::filesystem::remove(bobArchive);
|
||||
|
||||
if (bob2Id.empty()) {
|
||||
wait_for_removal_of({aliceId, bobId, carlaId});
|
||||
@ -604,8 +604,8 @@ ConversationRequestTest::testRemoveContactMultiDevice()
|
||||
|
||||
// Add second device for Bob
|
||||
std::map<std::string, std::shared_ptr<libjami::CallbackWrapperBase>> confHandlers;
|
||||
auto bobArchive = std::filesystem::current_path().string() + "/bob.gz";
|
||||
std::remove(bobArchive.c_str());
|
||||
auto bobArchive = std::filesystem::current_path() / "bob.gz";
|
||||
std::filesystem::remove(bobArchive);
|
||||
bobAccount->exportArchive(bobArchive);
|
||||
|
||||
std::map<std::string, std::string> details = libjami::getAccountTemplate("RING");
|
||||
|
@ -192,6 +192,7 @@ FileTransferTest::connectSignals()
|
||||
[&](const std::string& accountId,
|
||||
const std::string& /* conversationId */,
|
||||
libjami::SwarmMessage message) {
|
||||
std::unique_lock<std::mutex> lk {mtx};
|
||||
if (accountId == aliceId) {
|
||||
aliceData.messages.emplace_back(message);
|
||||
} else if (accountId == bobId) {
|
||||
@ -389,7 +390,7 @@ FileTransferTest::testBadSha3sumOut()
|
||||
CPPUNIT_ASSERT(cv.wait_for(lk, 30s, [&]() { return bobMsgSize + 1 == bobData.messages.size(); }));
|
||||
|
||||
// modifiy file
|
||||
sendFile = std::ofstream(sendPath);
|
||||
sendFile = std::ofstream(sendPath, std::ios::trunc);
|
||||
CPPUNIT_ASSERT(sendFile.is_open());
|
||||
sendFile << std::string(64000, 'B');
|
||||
sendFile.close();
|
||||
@ -635,7 +636,7 @@ FileTransferTest::testTooLarge()
|
||||
auto fileId = bobData.messages.rbegin()->body["fileId"];
|
||||
|
||||
// Add some data for the reception. This will break the final shasum
|
||||
std::ofstream recvFile(recvPath);
|
||||
std::ofstream recvFile(recvPath + std::string(".tmp"));
|
||||
CPPUNIT_ASSERT(recvFile.is_open());
|
||||
recvFile << std::string(1000, 'B');
|
||||
recvFile.close();
|
||||
|
Reference in New Issue
Block a user