File: ec2_ebs_hvm_tests.py

package info (click to toggle)
bootstrap-vz 0.9.11%2B20180121git-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 2,244 kB
  • sloc: python: 8,800; sh: 813; makefile: 16
file content (130 lines) | stat: -rw-r--r-- 5,778 bytes parent folder | download | duplicates (2)
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
from manifests import merge_manifest_data
from tools import boot_manifest

partials = {'ebs_hvm': '''
provider:
  name: ec2
  virtualization: hvm
  description: Debian {system.release} {system.architecture}
volume: {backing: ebs}
''',
            'extlinux': 'system: {bootloader: extlinux}',
            'grub': 'system: {bootloader: grub}',
            }


def test_unpartitioned_extlinux_oldstable():
    std_partials = ['base', 'oldstable64', 'unpartitioned', 'root_password']
    custom_partials = [partials['ebs_hvm'], partials['extlinux']]
    manifest_data = merge_manifest_data(std_partials, custom_partials)
    boot_vars = {'instance_type': 't2.micro'}
    with boot_manifest(manifest_data, boot_vars) as instance:
        print(instance.get_console_output().output)


def test_msdos_extlinux_oldstable():
    std_partials = ['base', 'oldstable64', 'msdos', 'single_partition', 'root_password']
    custom_partials = [partials['ebs_hvm'], partials['extlinux']]
    manifest_data = merge_manifest_data(std_partials, custom_partials)
    boot_vars = {'instance_type': 't2.micro'}
    with boot_manifest(manifest_data, boot_vars) as instance:
        print(instance.get_console_output().output)


def test_gpt_extlinux_oldstable():
    std_partials = ['base', 'oldstable64', 'gpt', 'single_partition', 'root_password']
    custom_partials = [partials['ebs_hvm'], partials['extlinux']]
    manifest_data = merge_manifest_data(std_partials, custom_partials)
    boot_vars = {'instance_type': 't2.micro'}
    with boot_manifest(manifest_data, boot_vars) as instance:
        print(instance.get_console_output().output)


def test_unpartitioned_extlinux_stable():
    std_partials = ['base', 'stable64', 'unpartitioned', 'root_password']
    custom_partials = [partials['ebs_hvm'], partials['extlinux']]
    manifest_data = merge_manifest_data(std_partials, custom_partials)
    boot_vars = {'instance_type': 't2.micro'}
    with boot_manifest(manifest_data, boot_vars) as instance:
        print(instance.get_console_output().output)


def test_msdos_extlinux_stable():
    std_partials = ['base', 'stable64', 'msdos', 'single_partition', 'root_password']
    custom_partials = [partials['ebs_hvm'], partials['extlinux']]
    manifest_data = merge_manifest_data(std_partials, custom_partials)
    boot_vars = {'instance_type': 't2.micro'}
    with boot_manifest(manifest_data, boot_vars) as instance:
        print(instance.get_console_output().output)


def test_gpt_extlinux_stable():
    std_partials = ['base', 'stable64', 'gpt', 'single_partition', 'root_password']
    custom_partials = [partials['ebs_hvm'], partials['extlinux']]
    manifest_data = merge_manifest_data(std_partials, custom_partials)
    boot_vars = {'instance_type': 't2.micro'}
    with boot_manifest(manifest_data, boot_vars) as instance:
        print(instance.get_console_output().output)


def test_msdos_grub_stable():
    std_partials = ['base', 'stable64', 'msdos', 'single_partition', 'root_password']
    custom_partials = [partials['ebs_hvm'], partials['grub']]
    manifest_data = merge_manifest_data(std_partials, custom_partials)
    boot_vars = {'instance_type': 't2.micro'}
    with boot_manifest(manifest_data, boot_vars) as instance:
        print(instance.get_console_output().output)


def test_gpt_grub_stable():
    std_partials = ['base', 'stable64', 'gpt', 'single_partition', 'root_password']
    custom_partials = [partials['ebs_hvm'], partials['grub']]
    manifest_data = merge_manifest_data(std_partials, custom_partials)
    boot_vars = {'instance_type': 't2.micro'}
    with boot_manifest(manifest_data, boot_vars) as instance:
        print(instance.get_console_output().output)


def test_unpartitioned_extlinux_unstable():
    std_partials = ['base', 'unstable64', 'unpartitioned', 'root_password']
    custom_partials = [partials['ebs_hvm'], partials['extlinux']]
    manifest_data = merge_manifest_data(std_partials, custom_partials)
    boot_vars = {'instance_type': 't2.micro'}
    with boot_manifest(manifest_data, boot_vars) as instance:
        print(instance.get_console_output().output)


def test_msdos_extlinux_unstable():
    std_partials = ['base', 'unstable64', 'msdos', 'single_partition', 'root_password']
    custom_partials = [partials['ebs_hvm'], partials['extlinux']]
    manifest_data = merge_manifest_data(std_partials, custom_partials)
    boot_vars = {'instance_type': 't2.micro'}
    with boot_manifest(manifest_data, boot_vars) as instance:
        print(instance.get_console_output().output)


def test_gpt_extlinux_unstable():
    std_partials = ['base', 'unstable64', 'gpt', 'single_partition', 'root_password']
    custom_partials = [partials['ebs_hvm'], partials['extlinux']]
    manifest_data = merge_manifest_data(std_partials, custom_partials)
    boot_vars = {'instance_type': 't2.micro'}
    with boot_manifest(manifest_data, boot_vars) as instance:
        print(instance.get_console_output().output)


def test_msdos_grub_unstable():
    std_partials = ['base', 'unstable64', 'msdos', 'single_partition', 'root_password']
    custom_partials = [partials['ebs_hvm'], partials['grub']]
    manifest_data = merge_manifest_data(std_partials, custom_partials)
    boot_vars = {'instance_type': 't2.micro'}
    with boot_manifest(manifest_data, boot_vars) as instance:
        print(instance.get_console_output().output)


def test_gpt_grub_unstable():
    std_partials = ['base', 'unstable64', 'gpt', 'single_partition', 'root_password']
    custom_partials = [partials['ebs_hvm'], partials['grub']]
    manifest_data = merge_manifest_data(std_partials, custom_partials)
    boot_vars = {'instance_type': 't2.micro'}
    with boot_manifest(manifest_data, boot_vars) as instance:
        print(instance.get_console_output().output)