Skip to content

Commit

Permalink
Fix some tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristopheLarchier committed Oct 21, 2024
1 parent 99f6ddb commit 6ce281d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
2 changes: 1 addition & 1 deletion test/libsyncengine/jobs/local/testlocaljobs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class LocalDeleteJobMockingTrash : public LocalDeleteJob {
};

void KDC::TestLocalJobs::setUp() {
// Setup parameter in test mode
// Setup parameters cache in test mode
ParametersCache::instance(true);
}

Expand Down
16 changes: 13 additions & 3 deletions test/server/logarchiver/testlogarchiver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,14 @@

#include "testlogarchiver.h"
#include "server/logarchiver.h"
#include "requests/parameterscache.h"
#include "db/parmsdb.h"
#include "version.h"
#include "libcommonserver/log/log.h"
#include "test_utility/localtemporarydirectory.h"
#include "libcommonserver/io/iohelper.h"
#include "libcommon/utility/utility.h"
#include "libcommonserver/db/db.h"
#include "test_utility/localtemporarydirectory.h"

#include <log4cplus/loggingmacros.h>

Expand All @@ -34,8 +37,15 @@ namespace KDC {

void TestLogArchiver::setUp() {
_logger = Log::instance()->getLogger();
bool alreadyExist = false;
Db::makeDbName(alreadyExist);

// Create parmsDb
bool alreadyExists = false;
std::filesystem::path parmsDbPath = Db::makeDbName(alreadyExists, true);
std::filesystem::remove(parmsDbPath);
ParmsDb::instance(parmsDbPath, KDRIVE_VERSION_STRING, true, true);

// Setup parameters cache in test mode
ParametersCache::instance(true);
}

void TestLogArchiver::testGetLogEstimatedSize() {
Expand Down

0 comments on commit 6ce281d

Please sign in to comment.