summaryrefslogtreecommitdiff
path: root/tests/vmtests/test_preserve_raid.py
blob: cf3a6bb718a5b3def2bd96a77f73e9bfd98ee226 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# This file is part of curtin. See LICENSE file for copyright and license info.

from . import VMBaseClass
from .releases import base_vm_classes as relbase

import textwrap


class TestPreserveRAID(VMBaseClass):
    """ Test that curtin can reuse a RAID. """
    conf_file = "examples/tests/preserve-raid.yaml"
    extra_disks = ['10G', '10G', '10G']
    uefi = True
    extra_collect_scripts = [textwrap.dedent("""
        cd OUTPUT_COLLECT_D
        ls /srv > ls-srv
        exit 0
        """)]

    def test_existing_exists(self):
        self.assertIn('existing', self.load_collect_file('ls-srv'))


class BionicTestPreserveRAID(relbase.bionic, TestPreserveRAID):
    __test__ = True


class EoanTestPreserveRAID(relbase.eoan, TestPreserveRAID):
    __test__ = True


class FocalTestPreserveRAID(relbase.focal, TestPreserveRAID):
    __test__ = True


# vi: ts=4 expandtab syntax=python