summaryrefslogtreecommitdiff
path: root/tests/vmtests/test_basic.py
diff options
authorRyan Harper <[email protected]>2017-12-19 15:50:09 -0600
committerRyan Harper <[email protected]>2018-01-12 15:16:36 -0600
commit92e45a8bd98444bf92d15dc4781599dabb1ca8a7 (patch)
tree78e6e1207e91e1e410a458b39ea4a2d8b72a3b7c /tests/vmtests/test_basic.py
parentbe9ab3cb2259050dca59d25876a682dcca77cf80 (diff)
vmtests: switch to MAAS v3 streams for images and kernels
Switching to v3 streams enables testing of Xenial HWE and HWE-edge kernels and the squashfs root which MAAS 2.3 uses. - Add v3 streams URL - Introduce two attributes, ephemeral_ftype, target_ftype to determine which files are needed for the ephemeral environment and which for the target - Add kflavor and subarch filters to streams query and release classes to support kernel variants: ga, hwe, hwe-edge. We're currently only testing subarch 'generic' and ignoring 'low-latency' - When testing with hwe and hwe-edge, emit a kernel configuration to curtin to ensure we install the matching kernel in the target image - Make sure vmtests append collect scripts to the base class parameter so all tests run the BaseVM collect_scripts (dpkg-query) - Introduce new release classes, XenialGA, XenialHWE and XenialEdge Note, XenialGA replaces the general Xenial release class, and that not all test-cases run Xenial HWE/Edge kernels; most of the storage ones do. - Booting from a squashfs image requires some changes - publish the squashfs image and boot VMs with root=URL (except trusty) - utilize overlayfs to keep the ephemeral environment pristine and use the squashfs image as a the curtin install source. - Add some boot parameters to the ephemeral environment to enable networking, including DNS for package installation. - Use BOOTIF= parameter for multi-nic vmtests to ensure we only bring up one nic for ephemeral networking. Sometimes multiple nics would come online and then cause networking hiccups which prevented installs from completing. - Modify vmtest storage configurations for disks to all use a 'serial' attribute. Currently we use 'disk-X' as the serial value where X increments from 'a' -> 'z' as the test needs. - jenkins-runner now prints additional information about what images are found and available. - tools/launch - modify --append to allow multiple parameters to grow the array. - fix bug in --publish which prevented more than a single file being published - allow PUBURL to be expanded in root-arg - add a 'boot-image' parameter which is exported to the VM with a serial number to provide a consistent path to the device, /dev/disk/by-id/virtio-boot-disk - drop '2G' boot size parameter to boot disks, instead allow qemu-img to default to the size of backing image.
Diffstat (limited to 'tests/vmtests/test_basic.py')
-rw-r--r--tests/vmtests/test_basic.py24
1 files changed, 20 insertions, 4 deletions
diff --git a/tests/vmtests/test_basic.py b/tests/vmtests/test_basic.py
index b8422d99..a25ee107 100644
--- a/tests/vmtests/test_basic.py
+++ b/tests/vmtests/test_basic.py
@@ -15,7 +15,7 @@ class TestBasicAbs(VMBaseClass):
nvme_disks = ['4G']
disk_to_check = [('main_disk_with_in---valid--dname', 1),
('main_disk_with_in---valid--dname', 2)]
- collect_scripts = [textwrap.dedent("""
+ collect_scripts = VMBaseClass.collect_scripts + [textwrap.dedent("""
cd OUTPUT_COLLECT_D
blkid -o export /dev/vda > blkid_output_vda
blkid -o export /dev/vda1 > blkid_output_vda1
@@ -155,7 +155,15 @@ class TrustyHWEXTestBasic(relbase.trusty_hwe_x, TrustyTestBasic):
__test__ = True
-class XenialTestBasic(relbase.xenial, TestBasicAbs):
+class XenialGATestBasic(relbase.xenial_ga, TestBasicAbs):
+ __test__ = True
+
+
+class XenialHWETestBasic(relbase.xenial_hwe, TestBasicAbs):
+ __test__ = True
+
+
+class XenialEdgeTestBasic(relbase.xenial_edge, TestBasicAbs):
__test__ = True
@@ -176,7 +184,7 @@ class TestBasicScsiAbs(TestBasicAbs):
disk_driver = 'scsi-hd'
extra_disks = ['128G', '128G', '4G']
nvme_disks = ['4G']
- collect_scripts = [textwrap.dedent("""
+ collect_scripts = VMBaseClass.collect_scripts + [textwrap.dedent("""
cd OUTPUT_COLLECT_D
blkid -o export /dev/sda > blkid_output_sda
blkid -o export /dev/sda1 > blkid_output_sda1
@@ -268,7 +276,15 @@ class TestBasicScsiAbs(TestBasicAbs):
self.assertEqual(kname_uuid, btrfs_uuid)
-class XenialTestScsiBasic(relbase.xenial, TestBasicScsiAbs):
+class XenialGATestScsiBasic(relbase.xenial_ga, TestBasicScsiAbs):
+ __test__ = True
+
+
+class XenialHWETestScsiBasic(relbase.xenial_hwe, TestBasicScsiAbs):
+ __test__ = True
+
+
+class XenialEdgeTestScsiBasic(relbase.xenial_edge, TestBasicScsiAbs):
__test__ = True