summaryrefslogtreecommitdiff
path: root/tests/vmtests/test_simple.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/vmtests/test_simple.py')
-rw-r--r--tests/vmtests/test_simple.py56
1 files changed, 53 insertions, 3 deletions
diff --git a/tests/vmtests/test_simple.py b/tests/vmtests/test_simple.py
index 625f8412..9c31b659 100644
--- a/tests/vmtests/test_simple.py
+++ b/tests/vmtests/test_simple.py
@@ -1,9 +1,10 @@
# This file is part of curtin. See LICENSE file for copyright and license info.
-from . import VMBaseClass
+from . import VMBaseClass, SkipTest
from .releases import base_vm_classes as relbase
from .releases import centos_base_vm_classes as centos_relbase
+import os
import textwrap
@@ -20,14 +21,24 @@ class TestSimple(VMBaseClass):
""")]
-class Centos70TestSimple(centos_relbase.centos70_xenial, TestSimple):
+class Centos70XenialTestSimple(centos_relbase.centos70_xenial, TestSimple):
__test__ = True
-class TrustyTestSimple(relbase.trusty, TestSimple):
+class Centos70BionicTestSimple(centos_relbase.centos70_bionic, TestSimple):
__test__ = True
+class Centos66XenialTestSimple(centos_relbase.centos66_xenial, TestSimple):
+ __test__ = True
+
+
+class Centos66BionicTestSimple(centos_relbase.centos66_bionic, TestSimple):
+ __test__ = False
+ # LP: #1775424
+ raise SkipTest('Centos66 fails with Bionic Ephemeral ext4 features')
+
+
class XenialTestSimple(relbase.xenial, TestSimple):
__test__ = True
@@ -53,6 +64,13 @@ class DiscoTestSimple(relbase.disco, TestSimple):
self.output_files_exist(["netplan.yaml"])
+class EoanTestSimple(relbase.eoan, TestSimple):
+ __test__ = True
+
+ def test_output_files_exist(self):
+ self.output_files_exist(["netplan.yaml"])
+
+
class TestSimpleStorage(VMBaseClass):
""" Test curtin runs clear-holders when mode=simple with storage cfg. """
conf_file = "examples/tests/simple-storage.yaml"
@@ -109,4 +127,36 @@ class DiscoTestSimpleStorage(relbase.disco, TestSimpleStorage):
self.output_files_exist(["netplan.yaml"])
+class EoanTestSimpleStorage(relbase.eoan, TestSimpleStorage):
+ __test__ = True
+
+ def test_output_files_exist(self):
+ self.output_files_exist(["netplan.yaml"])
+
+
+class TestGrubNoDefaults(VMBaseClass):
+ """ Test that curtin does not emit any grub configuration files. """
+ conf_file = "examples/tests/no-grub-file.yaml"
+ extra_disks = []
+ extra_nics = []
+ extra_collect_scripts = [textwrap.dedent("""
+ cd OUTPUT_COLLECT_D
+ cp /etc/netplan/50-cloud-init.yaml netplan.yaml
+
+ exit 0
+ """)]
+
+ def test_no_grub_file_created(self):
+ """ Curtin did not write a grub configuration file. """
+ grub_d_path = self.collect_path('etc_default_grub_d')
+ grub_d_files = os.listdir(grub_d_path)
+ self.assertNotIn('50-curtin-settings.cfg', grub_d_files)
+
+
+class DiscoTestGrubNoDefaults(relbase.disco, TestGrubNoDefaults):
+ __test__ = True
+
+ def test_output_files_exist(self):
+ self.output_files_exist(["netplan.yaml"])
+
# vi: ts=4 expandtab syntax=python