summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Styk <mastyk@redhat.com>2020-03-27 13:10:52 +0100
committerMartin Styk <188918+StykMartin@users.noreply.github.com>2020-03-27 16:03:50 +0100
commita12ba3a21639d92cdb63fa1da7b9ceb7f58eaf87 (patch)
treecb8d62f7a784d54ba2807148e1dcdcd5e9c2a503
parentbf7ead76125feabf89baa40226b7fe1614db9c22 (diff)
tests: new test for RHVH distribution import
Signed-off-by: Martin Styk <mastyk@redhat.com>
-rw-r--r--IntegrationTests/src/bkr/inttest/labcontroller/compose_layout/RHVH4/RHVH-4.3-20200323.0/compose/.composeinfo45
-rw-r--r--IntegrationTests/src/bkr/inttest/labcontroller/compose_layout/RHVH4/RHVH-4.3-20200323.0/compose/RHVH/x86_64/debug/tree/repodata/.emptyfile0
-rw-r--r--IntegrationTests/src/bkr/inttest/labcontroller/compose_layout/RHVH4/RHVH-4.3-20200323.0/compose/RHVH/x86_64/os/.treeinfo58
-rw-r--r--IntegrationTests/src/bkr/inttest/labcontroller/compose_layout/RHVH4/RHVH-4.3-20200323.0/compose/RHVH/x86_64/os/Packages/redhat-virtualization-host-image-update-1.0.0-1.noarch.rpmbin0 -> 6044 bytes
-rw-r--r--IntegrationTests/src/bkr/inttest/labcontroller/compose_layout/RHVH4/RHVH-4.3-20200323.0/compose/RHVH/x86_64/os/repodata/5a7f415cb1944486872b47158b3069b4ae9c3cd6a803d37a88d332cc670e76a3-primary.xml.gzbin0 -> 623 bytes
-rw-r--r--IntegrationTests/src/bkr/inttest/labcontroller/compose_layout/RHVH4/RHVH-4.3-20200323.0/compose/RHVH/x86_64/os/repodata/804e05b0170e258f81fff96691abdbe0d6c6a4f143b9a833d617aaad31e1505c-filelists.xml.gzbin0 -> 253 bytes
-rw-r--r--IntegrationTests/src/bkr/inttest/labcontroller/compose_layout/RHVH4/RHVH-4.3-20200323.0/compose/RHVH/x86_64/os/repodata/8a724cce1aea6e56ed4cf1f2a1382e258db8c0390287818b06b08d3e84c7126d-other.xml.gzbin0 -> 251 bytes
-rw-r--r--IntegrationTests/src/bkr/inttest/labcontroller/compose_layout/RHVH4/RHVH-4.3-20200323.0/compose/RHVH/x86_64/os/repodata/repomd.xml28
-rw-r--r--IntegrationTests/src/bkr/inttest/labcontroller/test_distro_import.py48
9 files changed, 179 insertions, 0 deletions
diff --git a/IntegrationTests/src/bkr/inttest/labcontroller/compose_layout/RHVH4/RHVH-4.3-20200323.0/compose/.composeinfo b/IntegrationTests/src/bkr/inttest/labcontroller/compose_layout/RHVH4/RHVH-4.3-20200323.0/compose/.composeinfo
new file mode 100644
index 0000000..b2692c7
--- /dev/null
+++ b/IntegrationTests/src/bkr/inttest/labcontroller/compose_layout/RHVH4/RHVH-4.3-20200323.0/compose/.composeinfo
@@ -0,0 +1,45 @@
+[compose]
+date = 20200323
+id = RHVH-4.3-20200323.0
+label = RC-20200323.0
+respin = 0
+type = production
+
+[product]
+family = RHVH
+name = RHVH-4.3-20200323.0
+short = RHVH
+type = ga
+variants = RHVH
+version = 4.3
+
+[variant-RHVH]
+arches = x86_64
+id = RHVH
+name = RHVH
+type = variant
+uid = RHVH
+
+[variant-RHVH.x86_64]
+debug_dir = RHVH/x86_64/debug/tree
+debug_packages = RHVH/x86_64/debug/tree/Packages
+debug_repository = RHVH/x86_64/debug/tree
+debug_tree = RHVH/x86_64/debug/tree
+debuginfo = RHVH/x86_64/debug/tree
+iso_dir = RHVH/x86_64/iso
+isos = RHVH/x86_64/iso
+jigdo_dir = RHVH/x86_64/jigdo
+jigdos = RHVH/x86_64/jigdo
+os_dir = RHVH/x86_64/os
+os_tree = RHVH/x86_64/os
+packages = RHVH/x86_64/os/Packages
+repository = RHVH/x86_64/os
+source_dir = RHVH/source/tree
+source_iso_dir = RHVH/source/iso
+source_isos = RHVH/source/iso
+source_jigdo_dir = RHVH/source/jigdo
+source_jigdos = RHVH/source/jigdo
+source_packages = RHVH/source/tree/Packages
+source_repository = RHVH/source/tree
+source_tree = RHVH/source/tree
+
diff --git a/IntegrationTests/src/bkr/inttest/labcontroller/compose_layout/RHVH4/RHVH-4.3-20200323.0/compose/RHVH/x86_64/debug/tree/repodata/.emptyfile b/IntegrationTests/src/bkr/inttest/labcontroller/compose_layout/RHVH4/RHVH-4.3-20200323.0/compose/RHVH/x86_64/debug/tree/repodata/.emptyfile
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/IntegrationTests/src/bkr/inttest/labcontroller/compose_layout/RHVH4/RHVH-4.3-20200323.0/compose/RHVH/x86_64/debug/tree/repodata/.emptyfile
diff --git a/IntegrationTests/src/bkr/inttest/labcontroller/compose_layout/RHVH4/RHVH-4.3-20200323.0/compose/RHVH/x86_64/os/.treeinfo b/IntegrationTests/src/bkr/inttest/labcontroller/compose_layout/RHVH4/RHVH-4.3-20200323.0/compose/RHVH/x86_64/os/.treeinfo
new file mode 100644
index 0000000..2481029
--- /dev/null
+++ b/IntegrationTests/src/bkr/inttest/labcontroller/compose_layout/RHVH4/RHVH-4.3-20200323.0/compose/RHVH/x86_64/os/.treeinfo
@@ -0,0 +1,58 @@
+[checksums]
+LiveOS/squashfs.img = sha256:c3ded74c6e0c2a1e073b4cf0944f309994793d94a2b6caffbb875c81081ee6ae
+images/boot.iso = sha256:2bb03f86c4e3a8ae1024f99e190bf8a3a0e842da4181889fa2c9f0944a3221ef
+images/product.img = sha256:0d37d61234659569203efeadc971b9af6b6c6c06405bd8f2e944473a40ffa5cc
+images/pxeboot/initrd.img = sha256:7b74dac8699c04e7d247b28d1bdfda4df279d81d03dfd1ad9bf56ef5b023c7f8
+images/pxeboot/vmlinuz = sha256:ca7fddf874856b3c99afd671e0aea30acc1f3fe095ca75b1dc432273381210a0
+
+[general]
+; WARNING.0 = This section provides compatibility with pre-productmd treeinfos.
+; WARNING.1 = Read productmd documentation for details about new format.
+arch = x86_64
+family = RHVH
+name = RHVH 4.3
+packagedir = Packages
+platforms = x86_64,xen
+repository = .
+timestamp = 1584961599
+variant = RHVH
+variants = RHVH
+version = 4.3
+
+[header]
+type = productmd.treeinfo
+version = 1.2
+
+[images-x86_64]
+boot.iso = images/boot.iso
+initrd = images/pxeboot/initrd.img
+kernel = images/pxeboot/vmlinuz
+product.img = images/product.img
+
+[images-xen]
+initrd = images/pxeboot/initrd.img
+kernel = images/pxeboot/vmlinuz
+product.img = images/product.img
+
+[release]
+name = RHVH
+short = RHVH
+version = 4.3
+
+[stage2]
+mainimage = LiveOS/squashfs.img
+
+[tree]
+arch = x86_64
+build_timestamp = 1584961599
+platforms = x86_64,xen
+variants = RHVH
+
+[variant-RHVH]
+id = RHVH
+name = RHVH
+packages = Packages
+repository = .
+type = variant
+uid = RHVH
+
diff --git a/IntegrationTests/src/bkr/inttest/labcontroller/compose_layout/RHVH4/RHVH-4.3-20200323.0/compose/RHVH/x86_64/os/Packages/redhat-virtualization-host-image-update-1.0.0-1.noarch.rpm b/IntegrationTests/src/bkr/inttest/labcontroller/compose_layout/RHVH4/RHVH-4.3-20200323.0/compose/RHVH/x86_64/os/Packages/redhat-virtualization-host-image-update-1.0.0-1.noarch.rpm
new file mode 100644
index 0000000..63939e1
--- /dev/null
+++ b/IntegrationTests/src/bkr/inttest/labcontroller/compose_layout/RHVH4/RHVH-4.3-20200323.0/compose/RHVH/x86_64/os/Packages/redhat-virtualization-host-image-update-1.0.0-1.noarch.rpm
Binary files differ
diff --git a/IntegrationTests/src/bkr/inttest/labcontroller/compose_layout/RHVH4/RHVH-4.3-20200323.0/compose/RHVH/x86_64/os/repodata/5a7f415cb1944486872b47158b3069b4ae9c3cd6a803d37a88d332cc670e76a3-primary.xml.gz b/IntegrationTests/src/bkr/inttest/labcontroller/compose_layout/RHVH4/RHVH-4.3-20200323.0/compose/RHVH/x86_64/os/repodata/5a7f415cb1944486872b47158b3069b4ae9c3cd6a803d37a88d332cc670e76a3-primary.xml.gz
new file mode 100644
index 0000000..8325d6c
--- /dev/null
+++ b/IntegrationTests/src/bkr/inttest/labcontroller/compose_layout/RHVH4/RHVH-4.3-20200323.0/compose/RHVH/x86_64/os/repodata/5a7f415cb1944486872b47158b3069b4ae9c3cd6a803d37a88d332cc670e76a3-primary.xml.gz
Binary files differ
diff --git a/IntegrationTests/src/bkr/inttest/labcontroller/compose_layout/RHVH4/RHVH-4.3-20200323.0/compose/RHVH/x86_64/os/repodata/804e05b0170e258f81fff96691abdbe0d6c6a4f143b9a833d617aaad31e1505c-filelists.xml.gz b/IntegrationTests/src/bkr/inttest/labcontroller/compose_layout/RHVH4/RHVH-4.3-20200323.0/compose/RHVH/x86_64/os/repodata/804e05b0170e258f81fff96691abdbe0d6c6a4f143b9a833d617aaad31e1505c-filelists.xml.gz
new file mode 100644
index 0000000..c2e9888
--- /dev/null
+++ b/IntegrationTests/src/bkr/inttest/labcontroller/compose_layout/RHVH4/RHVH-4.3-20200323.0/compose/RHVH/x86_64/os/repodata/804e05b0170e258f81fff96691abdbe0d6c6a4f143b9a833d617aaad31e1505c-filelists.xml.gz
Binary files differ
diff --git a/IntegrationTests/src/bkr/inttest/labcontroller/compose_layout/RHVH4/RHVH-4.3-20200323.0/compose/RHVH/x86_64/os/repodata/8a724cce1aea6e56ed4cf1f2a1382e258db8c0390287818b06b08d3e84c7126d-other.xml.gz b/IntegrationTests/src/bkr/inttest/labcontroller/compose_layout/RHVH4/RHVH-4.3-20200323.0/compose/RHVH/x86_64/os/repodata/8a724cce1aea6e56ed4cf1f2a1382e258db8c0390287818b06b08d3e84c7126d-other.xml.gz
new file mode 100644
index 0000000..cbf2ccf
--- /dev/null
+++ b/IntegrationTests/src/bkr/inttest/labcontroller/compose_layout/RHVH4/RHVH-4.3-20200323.0/compose/RHVH/x86_64/os/repodata/8a724cce1aea6e56ed4cf1f2a1382e258db8c0390287818b06b08d3e84c7126d-other.xml.gz
Binary files differ
diff --git a/IntegrationTests/src/bkr/inttest/labcontroller/compose_layout/RHVH4/RHVH-4.3-20200323.0/compose/RHVH/x86_64/os/repodata/repomd.xml b/IntegrationTests/src/bkr/inttest/labcontroller/compose_layout/RHVH4/RHVH-4.3-20200323.0/compose/RHVH/x86_64/os/repodata/repomd.xml
new file mode 100644
index 0000000..16e855e
--- /dev/null
+++ b/IntegrationTests/src/bkr/inttest/labcontroller/compose_layout/RHVH4/RHVH-4.3-20200323.0/compose/RHVH/x86_64/os/repodata/repomd.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<repomd xmlns="http://linux.duke.edu/metadata/repo" xmlns:rpm="http://linux.duke.edu/metadata/rpm">
+ <revision>1585308106</revision>
+ <data type="primary">
+ <checksum type="sha256">5a7f415cb1944486872b47158b3069b4ae9c3cd6a803d37a88d332cc670e76a3</checksum>
+ <open-checksum type="sha256">9b740707a450393521856f8b15ac8e8dedc4e375a6d1f61975f8a123674517e1</open-checksum>
+ <location href="repodata/5a7f415cb1944486872b47158b3069b4ae9c3cd6a803d37a88d332cc670e76a3-primary.xml.gz"/>
+ <timestamp>1585308106</timestamp>
+ <size>623</size>
+ <open-size>1336</open-size>
+ </data>
+ <data type="filelists">
+ <checksum type="sha256">804e05b0170e258f81fff96691abdbe0d6c6a4f143b9a833d617aaad31e1505c</checksum>
+ <open-checksum type="sha256">2994a58d16ff98c4d314841d8f927b5c84e8833433984e15d09d1d6f8aee1f4c</open-checksum>
+ <location href="repodata/804e05b0170e258f81fff96691abdbe0d6c6a4f143b9a833d617aaad31e1505c-filelists.xml.gz"/>
+ <timestamp>1585308106</timestamp>
+ <size>253</size>
+ <open-size>323</open-size>
+ </data>
+ <data type="other">
+ <checksum type="sha256">8a724cce1aea6e56ed4cf1f2a1382e258db8c0390287818b06b08d3e84c7126d</checksum>
+ <open-checksum type="sha256">423e8fc8c24f88017ef181e2cf4159d72175fd241d5343b4badf9aacaa8ab605</open-checksum>
+ <location href="repodata/8a724cce1aea6e56ed4cf1f2a1382e258db8c0390287818b06b08d3e84c7126d-other.xml.gz"/>
+ <timestamp>1585308106</timestamp>
+ <size>251</size>
+ <open-size>319</open-size>
+ </data>
+</repomd>
diff --git a/IntegrationTests/src/bkr/inttest/labcontroller/test_distro_import.py b/IntegrationTests/src/bkr/inttest/labcontroller/test_distro_import.py
index b4240e9..e117a0e 100644
--- a/IntegrationTests/src/bkr/inttest/labcontroller/test_distro_import.py
+++ b/IntegrationTests/src/bkr/inttest/labcontroller/test_distro_import.py
@@ -9,6 +9,7 @@ import os
import subprocess
import json
import pkg_resources
+import urlparse
from copy import copy, deepcopy
from bkr.inttest import Process
from bkr.inttest.labcontroller import LabControllerTestCase
@@ -1184,6 +1185,48 @@ class DistroImportTest(LabControllerTestCase):
u'variant': u'BaseOS',
}
+ self.x86_64_rhvh43 = {
+ u"arch": u"x86_64",
+ u"arches": [],
+ u"images": [
+ {
+ u"path": u"images/pxeboot/vmlinuz",
+ u"type": u"kernel"
+ },
+ {
+ u"path": u"images/pxeboot/initrd.img",
+ u"type": u"initrd"
+ }
+ ],
+ u"kernel_options": u" inst.stage2={}".format(urlparse.urljoin(
+ self.distro_url, u'RHVH4/RHVH-4.3-20200323.0/compose/RHVH/x86_64/os')),
+ u"kernel_options_post": None,
+ u"ks_meta": u" autopart_type=thinp liveimg=Packages/redhat-virtualization-host-image-update-1.0.0-1.noarch.rpm ks_keyword=inst.ks",
+ u"name": u"RHVH-4.3-20200323.0",
+ u"osmajor": u"RHVH4",
+ u"osminor": u"3",
+ u"repos": [
+ {
+ u"path": u"../../../RHVH/x86_64/os",
+ u"repoid": u"RHVH",
+ u"type": u"variant"
+ },
+ {
+ u"path": u"../../../RHVH/x86_64/debug/tree",
+ u"repoid": u"RHVH-debuginfo",
+ u"type": u"debug"
+ }
+ ],
+ u"tags": [
+ u"RC-20200323.0"
+ ],
+ u"tree_build_time": u"1584961599",
+ u"urls": [
+ u"{}".format(urlparse.urljoin(self.distro_url, u'RHVH4/RHVH-4.3-20200323.0/compose/RHVH/x86_64/os/'))
+ ],
+ u"variant": u"RHVH"
+ }
+
def _run_import(self, import_args):
p = subprocess.Popen(import_args,
stdout=subprocess.PIPE,
@@ -1515,3 +1558,8 @@ class DistroImportTest(LabControllerTestCase):
def test_rhel8_partner_import(self):
trees = self.dry_run_import_trees(['%sRHEL8Alpha/Partners/RHEL-8.0-20180531.2/compose' % self.distro_url])
self.assertItemsEqual(trees, [self.x86_64_rhel8_partner])
+
+ def test_rhvh43_import(self):
+ trees = self.dry_run_import_trees(['{}'.format(urlparse.urljoin(self.distro_url,
+ 'RHVH4/RHVH-4.3-20200323.0/compose'))])
+ self.assertItemsEqual(trees, [self.x86_64_rhvh43])