Commit 80389eea authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Exclude path

parent 10b7de9a
......@@ -81,6 +81,7 @@ void ImportAddressbookJobInterfaceTest::importAddressbookConfig()
TestImportFile *file = new TestImportFile(zipFilePath + testPath, this);
file->setPathConfig(zipFilePath + testPath);
file->setExtractPath(QDir::tempPath() + testPath);
file->setExcludePath(Utils::addressbookPath());
ImportAddressbookJobInterfaceTestImpl *impl = new ImportAddressbookJobInterfaceTestImpl(this, {Utils::StoredType::Config}, file->archiveStorage(), 1);
file->setAbstractImportExportJob(impl);
file->start();
......
......@@ -66,7 +66,7 @@ ImportAlarmJobInterfaceTest::ImportAlarmJobInterfaceTest(QObject *parent)
{
}
void ImportAlarmJobInterfaceTest::importCalendarConfig_data()
void ImportAlarmJobInterfaceTest::importAlarmConfig_data()
{
QTest::addColumn<QString>("zipFilePath");
QTest::addColumn<QString>("testPath");
......@@ -74,12 +74,13 @@ void ImportAlarmJobInterfaceTest::importCalendarConfig_data()
QTest::newRow("test1") << QString::fromLatin1(pathConfig) << QStringLiteral("/test1/");
}
void ImportAlarmJobInterfaceTest::importCalendarConfig()
void ImportAlarmJobInterfaceTest::importAlarmConfig()
{
QFETCH(QString, zipFilePath);
QFETCH(QString, testPath);
TestImportFile *file = new TestImportFile(zipFilePath + testPath, this);
file->setPathConfig(zipFilePath + testPath);
file->setExcludePath(Utils::alarmPath());
file->setExtractPath(QDir::tempPath() + testPath);
ImportAlarmJobInterfaceTestImpl *impl = new ImportAlarmJobInterfaceTestImpl(this, {Utils::StoredType::Config}, file->archiveStorage(), 1);
file->setAbstractImportExportJob(impl);
......
......@@ -46,8 +46,8 @@ public:
explicit ImportAlarmJobInterfaceTest(QObject *parent = nullptr);
~ImportAlarmJobInterfaceTest() = default;
private Q_SLOTS:
void importCalendarConfig();
void importCalendarConfig_data();
void importAlarmConfig();
void importAlarmConfig_data();
};
#endif // IMPORTALARMJOBINTERFACETEST_H
......@@ -81,6 +81,7 @@ void ImportCalendarJobInterfaceTest::importCalendarConfig()
TestImportFile *file = new TestImportFile(zipFilePath + testPath, this);
file->setPathConfig(zipFilePath + testPath);
file->setExtractPath(QDir::tempPath() + testPath);
file->setExcludePath(Utils::calendarPath());
ImportCalendarJobInterfaceTestImpl *impl = new ImportCalendarJobInterfaceTestImpl(this, {Utils::StoredType::Config}, file->archiveStorage(), 1);
file->setAbstractImportExportJob(impl);
file->start();
......
......@@ -50,6 +50,7 @@ void CompareImportFile::compareFile()
if (file == QLatin1String("information/exportdatatype.xml") || file == QLatin1String("information/VERSION_2")) {
continue;
}
//Allow to remove some file from resources path
if (file.startsWith(mExcludePath)) {
continue;
}
......
......@@ -91,6 +91,7 @@ void ImportMailJobInterfaceTest::importMailConfig()
TestImportFile *file = new TestImportFile(zipFilePath + testPath, this);
file->setPathConfig(zipFilePath + testPath);
file->setExtractPath(QDir::tempPath() + testPath);
file->setExcludePath(Utils::mailsPath()); // ???
ImportMailJobInterfaceTestImpl *impl = new ImportMailJobInterfaceTestImpl(this, {Utils::StoredType::Config}, file->archiveStorage(), 1);
file->setAbstractImportExportJob(impl);
file->start();
......
......@@ -83,7 +83,7 @@ void ImportNotesJobInterfaceTest::importNoteConfig()
TestImportFile *file = new TestImportFile(zipFilePath + testPath, this);
file->setPathConfig(zipFilePath + testPath);
file->setExtractPath(QDir::tempPath() + testPath);
file->setExcludePath(QStringLiteral("note/"));
file->setExcludePath(Utils::notePath());
ImportNotesJobInterfaceTestImpl *impl = new ImportNotesJobInterfaceTestImpl(this, {Utils::StoredType::Config}, file->archiveStorage(), 1);
file->setAbstractImportExportJob(impl);
file->start();
......@@ -106,6 +106,7 @@ void ImportNotesJobInterfaceTest::importNoteConfigAndResources()
TestImportFile *file = new TestImportFile(zipFilePath + testPath, this);
file->setPathConfig(zipFilePath + testPath);
file->setExtractPath(QDir::tempPath() + testPath);
file->setExcludePath(Utils::notePath());
ImportNotesJobInterfaceTestImpl *impl = new ImportNotesJobInterfaceTestImpl(this, {Utils::StoredType::Config|Utils::StoredType::Resources}, file->archiveStorage(), 1);
file->setAbstractImportExportJob(impl);
file->start();
......
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