summaryrefslogtreecommitdiffstats
path: root/tests/auto/installer/commandlineupdate/tst_commandlineupdate.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/installer/commandlineupdate/tst_commandlineupdate.cpp')
-rw-r--r--tests/auto/installer/commandlineupdate/tst_commandlineupdate.cpp28
1 files changed, 26 insertions, 2 deletions
diff --git a/tests/auto/installer/commandlineupdate/tst_commandlineupdate.cpp b/tests/auto/installer/commandlineupdate/tst_commandlineupdate.cpp
index e465f8a75..5a25bbb39 100644
--- a/tests/auto/installer/commandlineupdate/tst_commandlineupdate.cpp
+++ b/tests/auto/installer/commandlineupdate/tst_commandlineupdate.cpp
@@ -108,6 +108,30 @@ private slots:
core->setFoundEssentialUpdate(false);
}
+ void testUpdateForceUpdatePackagesSilently()
+ {
+ setRepository(":///data/installPackagesRepository");
+ QCOMPARE(PackageManagerCore::Success, core->installSelectedComponentsSilently(QStringList()
+ << "componentH"));
+ VerifyInstaller::verifyInstallerResources(m_installDir, "componentH", "1.0.0content.txt");
+ VerifyInstaller::verifyInstallerResources(m_installDir, "componentE", "1.0.0content.txt");
+ VerifyInstaller::verifyFileExistence(m_installDir, QStringList() << "components.xml"
+ << "installcontentA_update.txt" << "installcontentE.txt" << "installcontentG.txt"
+ << "installContentAutoDependOnA.txt" << "installcontentH.txt");
+ core->commitSessionOperations();
+
+ setRepository(":///data/installPackagesRepositoryUpdate");
+ QCOMPARE(PackageManagerCore::EssentialUpdated, core->updateComponentsSilently(QStringList()));
+ VerifyInstaller::verifyInstallerResourceFileDeletion(m_installDir, "componentH", "1.0.0content.txt");
+ VerifyInstaller::verifyInstallerResources(m_installDir, "componentH", "2.0.0content.txt");
+ //Verify that no other installed components got update
+ VerifyInstaller::verifyInstallerResources(m_installDir, "componentE", "1.0.0content.txt");
+ VerifyInstaller::verifyFileExistence(m_installDir, QStringList() << "components.xml"
+ << "installcontentA_update.txt" << "installcontentE.txt" << "installcontentG.txt"
+ << "installContentAutoDependOnA.txt" << "installcontentH_update.txt");
+ core->setFoundEssentialUpdate(false);
+ }
+
void testUpdatePackageSilently()
{
setRepository(":///data/installPackagesRepository");
@@ -122,7 +146,7 @@ private slots:
VerifyInstaller::verifyFileExistence(m_installDir, QStringList() << "components.xml"
<< "installcontentA_update.txt" << "installcontentE.txt" << "installcontentG.txt"
<< "installcontentB.txt" << "installcontentD.txt"
- << "installContentAutoDependOnA.txt");
+ << "installContentAutoDependOnA.txt" << "installcontentH_update.txt");
core->commitSessionOperations();
setRepository(":///data/installPackagesRepositoryUpdate");
@@ -141,7 +165,7 @@ private slots:
VerifyInstaller::verifyFileExistence(m_installDir, QStringList() << "components.xml" << "installcontentA_update.txt"
<< "installcontentE_update.txt" << "installcontentG.txt"
<< "installcontentB_update.txt" << "installcontentD_update.txt"
- << "installContentAutoDependOnA.txt");
+ << "installContentAutoDependOnA.txt" << "installcontentH_update.txt");
}
void testUpdateNoUpdatesForSelectedPackage()