summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/installer/commandlineupdate/tst_commandlineupdate.cpp3
-rw-r--r--tests/auto/installer/createshortcutoperation/tst_createshortcutoperation.cpp1
-rw-r--r--tests/auto/installer/messageboxhandler/tst_messageboxhandler.cpp3
-rw-r--r--tests/auto/installer/shared/packagemanager.h1
4 files changed, 6 insertions, 2 deletions
diff --git a/tests/auto/installer/commandlineupdate/tst_commandlineupdate.cpp b/tests/auto/installer/commandlineupdate/tst_commandlineupdate.cpp
index e260ab175..8d223ae09 100644
--- a/tests/auto/installer/commandlineupdate/tst_commandlineupdate.cpp
+++ b/tests/auto/installer/commandlineupdate/tst_commandlineupdate.cpp
@@ -90,7 +90,8 @@ private slots:
void testUpdateNoUpdatesForSelectedPackage()
{
setRepository(":///data/installPackagesRepositoryUpdate");
- QVERIFY(!core->updateComponentsSilently(QStringList() << "componentInvalid"));
+ // Succeeds as no updates available for component so nothing to do
+ QVERIFY(core->updateComponentsSilently(QStringList() << "componentInvalid"));
}
void testUpdateTwoPackageSilently()
diff --git a/tests/auto/installer/createshortcutoperation/tst_createshortcutoperation.cpp b/tests/auto/installer/createshortcutoperation/tst_createshortcutoperation.cpp
index f3c1132f3..a8826124e 100644
--- a/tests/auto/installer/createshortcutoperation/tst_createshortcutoperation.cpp
+++ b/tests/auto/installer/createshortcutoperation/tst_createshortcutoperation.cpp
@@ -70,6 +70,7 @@ private slots:
QString(), Protocol::DefaultAuthorizationKey, Protocol::Mode::Production,
QHash<QString, QString>(), true);
core->setAllowedRunningProcesses(QStringList() << QCoreApplication::applicationFilePath());
+ core->disableWriteMaintenanceTool();
QSet<Repository> repoList;
Repository repo = Repository::fromUserInput(":///data/repository");
repoList.insert(repo);
diff --git a/tests/auto/installer/messageboxhandler/tst_messageboxhandler.cpp b/tests/auto/installer/messageboxhandler/tst_messageboxhandler.cpp
index 9dc3367f8..83d93d647 100644
--- a/tests/auto/installer/messageboxhandler/tst_messageboxhandler.cpp
+++ b/tests/auto/installer/messageboxhandler/tst_messageboxhandler.cpp
@@ -96,6 +96,7 @@ private slots:
QString(), Protocol::DefaultAuthorizationKey, Protocol::Mode::Production,
QHash<QString, QString>(), true);
core->setAllowedRunningProcesses(QStringList() << QCoreApplication::applicationFilePath());
+ core->disableWriteMaintenanceTool();
m_installDir = QInstaller::generateTemporaryFileName();
QVERIFY(QDir().mkpath(m_installDir));
core->setValue(scTargetDir, m_installDir);
@@ -162,7 +163,7 @@ private slots:
setRepository(":///data/invalidoperation");
core->autoAcceptMessageBoxes();
core->installDefaultComponentsSilently();
- QCOMPARE(PackageManagerCore::Running, core->status());
+ QCOMPARE(PackageManagerCore::Success, core->status());
}
void invalidHashAutoReject()
diff --git a/tests/auto/installer/shared/packagemanager.h b/tests/auto/installer/shared/packagemanager.h
index 762edc61f..a62f13484 100644
--- a/tests/auto/installer/shared/packagemanager.h
+++ b/tests/auto/installer/shared/packagemanager.h
@@ -46,6 +46,7 @@ struct PackageManager
PackageManagerCore *core = new PackageManagerCore(BinaryContent::MagicInstallerMarker, QList<OperationBlob> ());
QString appFilePath = QCoreApplication::applicationFilePath();
core->setAllowedRunningProcesses(QStringList() << appFilePath);
+ core->disableWriteMaintenanceTool();
QSet<Repository> repoList;
Repository repo = Repository::fromUserInput(repository);
repoList.insert(repo);