summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorArttu Tarkiainen <arttu.tarkiainen@qt.io>2021-03-22 16:54:36 +0200
committerArttu Tarkiainen <arttu.tarkiainen@qt.io>2021-03-23 11:17:41 +0200
commit34adba4642ed75ada0468c278e81b868f7c375f2 (patch)
tree98c98e82f563721c3298b0894b0b7e493edc1a91 /tests
parentef87d68de359dc136d8d71ed88e57741d33cae2a (diff)
CLI: Fix offline installer creation with empty component meta-archive
Task-number: QTIFW-2189 Change-Id: Ic6f56156194039cca7bebf095fad8c1fc66fc275 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Katja Marttila <katja.marttila@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/installer/createoffline/data/repository-componentmeta-emptymetafile/A/1.0.2-1content.7zbin0 -> 182 bytes
-rw-r--r--tests/auto/installer/createoffline/data/repository-componentmeta-emptymetafile/A/1.0.2-1content.7z.sha11
-rw-r--r--tests/auto/installer/createoffline/data/repository-componentmeta-emptymetafile/A/1.0.2-1meta.7zbin0 -> 106 bytes
-rw-r--r--tests/auto/installer/createoffline/data/repository-componentmeta-emptymetafile/Updates.xml16
-rw-r--r--tests/auto/installer/createoffline/settings.qrc5
-rw-r--r--tests/auto/installer/createoffline/tst_createoffline.cpp3
6 files changed, 25 insertions, 0 deletions
diff --git a/tests/auto/installer/createoffline/data/repository-componentmeta-emptymetafile/A/1.0.2-1content.7z b/tests/auto/installer/createoffline/data/repository-componentmeta-emptymetafile/A/1.0.2-1content.7z
new file mode 100644
index 000000000..1c5ff001a
--- /dev/null
+++ b/tests/auto/installer/createoffline/data/repository-componentmeta-emptymetafile/A/1.0.2-1content.7z
Binary files differ
diff --git a/tests/auto/installer/createoffline/data/repository-componentmeta-emptymetafile/A/1.0.2-1content.7z.sha1 b/tests/auto/installer/createoffline/data/repository-componentmeta-emptymetafile/A/1.0.2-1content.7z.sha1
new file mode 100644
index 000000000..b36346655
--- /dev/null
+++ b/tests/auto/installer/createoffline/data/repository-componentmeta-emptymetafile/A/1.0.2-1content.7z.sha1
@@ -0,0 +1 @@
+5097e37368b44fc5242f3bb2fce08f5ade6c4c40 \ No newline at end of file
diff --git a/tests/auto/installer/createoffline/data/repository-componentmeta-emptymetafile/A/1.0.2-1meta.7z b/tests/auto/installer/createoffline/data/repository-componentmeta-emptymetafile/A/1.0.2-1meta.7z
new file mode 100644
index 000000000..408550be6
--- /dev/null
+++ b/tests/auto/installer/createoffline/data/repository-componentmeta-emptymetafile/A/1.0.2-1meta.7z
Binary files differ
diff --git a/tests/auto/installer/createoffline/data/repository-componentmeta-emptymetafile/Updates.xml b/tests/auto/installer/createoffline/data/repository-componentmeta-emptymetafile/Updates.xml
new file mode 100644
index 000000000..d3b180e43
--- /dev/null
+++ b/tests/auto/installer/createoffline/data/repository-componentmeta-emptymetafile/Updates.xml
@@ -0,0 +1,16 @@
+<Updates>
+ <ApplicationName>{AnyApplication}</ApplicationName>
+ <ApplicationVersion>1.0.0</ApplicationVersion>
+ <Checksum>true</Checksum>
+ <PackageUpdate>
+ <Name>A</Name>
+ <DisplayName>A</DisplayName>
+ <Description>Example component A</Description>
+ <Version>1.0.2-1</Version>
+ <ReleaseDate>2015-01-01</ReleaseDate>
+ <Default>true</Default>
+ <UpdateFile UncompressedSize="72" OS="Any" CompressedSize="222"/>
+ <DownloadableArchives>content.7z</DownloadableArchives>
+ <SHA1>65c0db5bcf28139d434dce0e21674e33c87ab6d9</SHA1>
+ </PackageUpdate>
+</Updates>
diff --git a/tests/auto/installer/createoffline/settings.qrc b/tests/auto/installer/createoffline/settings.qrc
index 2c546d7f2..4b7666b4a 100644
--- a/tests/auto/installer/createoffline/settings.qrc
+++ b/tests/auto/installer/createoffline/settings.qrc
@@ -23,5 +23,10 @@
<file>data/repository-unifiedmeta-script/Updates.xml</file>
<file>data/repository-unifiedmeta-script/org.qtproject.ifw.example/1.0.0-1content.7z</file>
<file>data/repository-unifiedmeta-script/org.qtproject.ifw.example/1.0.0-1content.7z.sha1</file>
+
+ <file>data/repository-componentmeta-emptymetafile/Updates.xml</file>
+ <file>data/repository-componentmeta-emptymetafile/A/1.0.2-1content.7z</file>
+ <file>data/repository-componentmeta-emptymetafile/A/1.0.2-1content.7z.sha1</file>
+ <file>data/repository-componentmeta-emptymetafile/A/1.0.2-1meta.7z</file>
</qresource>
</RCC>
diff --git a/tests/auto/installer/createoffline/tst_createoffline.cpp b/tests/auto/installer/createoffline/tst_createoffline.cpp
index 474b1d5de..3a3431442 100644
--- a/tests/auto/installer/createoffline/tst_createoffline.cpp
+++ b/tests/auto/installer/createoffline/tst_createoffline.cpp
@@ -85,6 +85,9 @@ private slots:
QTest::newRow("Unified metaformat | Script")
<< ":///data/repository-unifiedmeta-script" << "org.qtproject.ifw.example"
<< PackageManagerCore::Success;
+ QTest::newRow("Component metaformat | Empty component meta-archive")
+ << ":///data/repository-componentmeta-emptymetafile" << "A"
+ << PackageManagerCore::Success;
QTest::newRow("Non-existing component")
<< ":///data/repository-unifiedmeta-script" << "a.dummy.component"
<< PackageManagerCore::Canceled;