blob: db177cc83510af7d4d7e0fba28a19895566681ce (
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
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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
|
# Fast option check tests
This chapter contains fast scenarios that test vmdebootstrap option
handling. These scenarios do not actually build images, they only
verify that vmdebootstrap parses the command line correctly.
SCENARIO --squash and --image used together
ASSUMING fast tests are requested
WHEN user attempts to run vmdebootstrap
... --squash=FOO --image=BAR --dry-run
THEN vmdebootstrap exited with a non-zero exit code
AND vmdebootstrap wrote an error message matching --squash
AND vmdebootstrap wrote an error message matching --image
SCENARIO --squash and --arch arm64 used together
ASSUMING fast tests are requested
WHEN user attempts to run vmdebootstrap
... --squash=FOO --arch=arm64 --dry-run
THEN vmdebootstrap exited with a zero exit code
SCENARIO --use-uefi and --arch arm64 used together
ASSUMING fast tests are requested
WHEN user attempts to run vmdebootstrap
... --image=FOO --grub --use-uefi --arch=arm64 --dry-run
THEN vmdebootstrap exited with a zero exit code
SCENARIO --arch arm64 used with --image but without --use-uefi
ASSUMING fast tests are requested
WHEN user attempts to run vmdebootstrap
... --image=FOO --foreign=PATH --arch=arm64 --dry-run
THEN vmdebootstrap exited with a non-zero exit code
AND vmdebootstrap wrote an error message matching UEFI
AND vmdebootstrap wrote an error message matching arm64
SCENARIO --use-uefi and --arch arm64 used without grub
ASSUMING fast tests are requested
WHEN user attempts to run vmdebootstrap
... --image=FOO --use-uefi --arch=arm64 --dry-run
THEN vmdebootstrap exited with a non-zero exit code
AND vmdebootstrap wrote an error message matching UEFI
AND vmdebootstrap wrote an error message matching Grub
SCENARIO --use-uefi and --arch arm64 used without image
ASSUMING fast tests are requested
WHEN user attempts to run vmdebootstrap
... --grub --use-uefi --arch=arm64 --dry-run
THEN vmdebootstrap exited with a non-zero exit code
AND vmdebootstrap wrote an error message matching disk image filename
AND vmdebootstrap wrote an error message matching squash
SCENARIO --size too small for a bootstrap
ASSUMING fast tests are requested
WHEN user attempts to run vmdebootstrap
... --image=FOO --size=100M --dry-run
THEN vmdebootstrap exited with a non-zero exit code
AND vmdebootstrap wrote an error message matching too small
AND vmdebootstrap wrote an error message matching bootstrap
SCENARIO Debian distribution stable name check
ASSUMING fast tests are requested
WHEN user attempts to run vmdebootstrap
... --image=FOO --distribution=stable --dry-run
THEN vmdebootstrap exited with a zero exit code
SCENARIO Debian distribution jessie name check
ASSUMING fast tests are requested
WHEN user attempts to run vmdebootstrap
... --image=FOO --distribution=jessie --dry-run
THEN vmdebootstrap exited with a zero exit code
SCENARIO allow use of arch and foreign options
ASSUMING fast tests are requested
WHEN user attempts to run vmdebootstrap
... --image=FOO --arch=armhf --foreign=PATH --dry-run
THEN vmdebootstrap exited with a zero exit code
SCENARIO disallow use of uefi on unsupported architectures
ASSUMING fast tests are requested
WHEN user attempts to run vmdebootstrap
... --image=FOO --grub --use-uefi --arch=armel --dry-run
THEN vmdebootstrap exited with a non-zero exit code
AND vmdebootstrap wrote an error message matching armel
AND vmdebootstrap wrote an error message matching not a supported
AND vmdebootstrap wrote an error message matching UEFI
SCENARIO disallow use of bootpartition if ESP already set
ASSUMING fast tests are requested
WHEN user attempts to run vmdebootstrap
... --image=FOO --bootoffset=1024 --grub --use-uefi --dry-run
THEN vmdebootstrap exited with a non-zero exit code
AND vmdebootstrap wrote an error message matching separate boot
AND vmdebootstrap wrote an error message matching not supported
AND vmdebootstrap wrote an error message matching UEFI
SCENARIO disallow UEFI support on wheezy except on amd64
ASSUMING fast tests are requested
WHEN user attempts to run vmdebootstrap
... --image=FOO --grub --use-uefi --roottype=ext2 --distribution=wheezy --arch=arm64 --dry-run
THEN vmdebootstrap exited with a non-zero exit code
AND vmdebootstrap wrote an error message matching Only amd64
AND vmdebootstrap wrote an error message matching supports UEFI
AND vmdebootstrap wrote an error message matching Wheezy
SCENARIO disallow apt-mirror without configure-apt
ASSUMING fast tests are requested
WHEN user attempts to run vmdebootstrap
... --image=FOO --apt-mirror=mirror
THEN vmdebootstrap exited with a non-zero exit code
AND vmdebootstrap wrote an error message matching requires --configure-apt as well
SCENARIO default includes the kernel package
ASSUMING fast tests are requested
WHEN user attempts to run vmdebootstrap
... --image=FOO --arch=amd64 --dry-run
THEN vmdebootstrap exited with a zero exit code
AND vmdebootstrap wrote a message matching linux-image-amd64
SCENARIO no-linux omits the kernel package
ASSUMING fast tests are requested
WHEN user attempts to run vmdebootstrap
... --no-kernel --image=FOO --arch=amd64 --dry-run
THEN vmdebootstrap exited with a zero exit code
AND vmdebootstrap wrote a message not matching linux-image-amd64
SCENARIO kernel-package includes the kernel package
ASSUMING fast tests are requested
WHEN user attempts to run vmdebootstrap
... --kernel-package unlikely --image=FOO --arch=amd64 --dry-run
THEN vmdebootstrap exited with a zero exit code
AND vmdebootstrap wrote a message not matching linux-image-amd64
AND vmdebootstrap wrote a message matching unlikely
SCENARIO no-kernel overrides kernel-package
ASSUMING fast tests are requested
WHEN user attempts to run vmdebootstrap
... --no-kernel --kernel-package unlikely --image=FOO --arch=amd64 --dry-run
THEN vmdebootstrap exited with a zero exit code
AND vmdebootstrap wrote a message not matching linux-image-amd64
AND vmdebootstrap wrote a message not matching unlikely
SCENARIO package includes the specified package
ASSUMING fast tests are requested
WHEN user attempts to run vmdebootstrap
... --package unlikely --image=FOO --arch=amd64 --dry-run
THEN vmdebootstrap exited with a zero exit code
AND vmdebootstrap wrote a message matching linux-image-amd64
AND vmdebootstrap wrote a message matching unlikely
SCENARIO only images can be converted to qcow2
ASSUMING fast tests are requested
WHEN user attempts to run vmdebootstrap
... --convert-qcow2 --tarball --arch=amd64 --dry-run
THEN vmdebootstrap exited with a non-zero exit code
AND vmdebootstrap wrote an error message matching qcow2 can only
AND vmdebootstrap wrote an error message matching with --image
SCENARIO tarball is not usable with image
ASSUMING fast tests are requested
WHEN user attempts to run vmdebootstrap
... --image=FOO --tarball=FOO --arch=amd64 --dry-run
THEN vmdebootstrap exited with a non-zero exit code
AND vmdebootstrap wrote an error message matching not both
SCENARIO tarball is not usable with squash
ASSUMING fast tests are requested
WHEN user attempts to run vmdebootstrap
... --squash=FOO --tarball=FOO --arch=amd64 --dry-run
THEN vmdebootstrap exited with a non-zero exit code
AND vmdebootstrap wrote an error message matching not both
SCENARIO masking systemd-networkd without updating initramfs
ASSUMING fast tests are requested
WHEN user attempts to run vmdebootstrap
... --image=FOO --no-systemd-networkd --no-update-initramfs --dry-run
THEN vmdebootstrap exited with a non-zero exit code
AND vmdebootstrap wrote an error message matching requires updating the
SCENARIO btrfs not yet supported with extlinux
ASSUMING fast tests are requested
WHEN user attempts to run vmdebootstrap
... --image=FOO --roottype btrfs --extlinux --dry-run
THEN vmdebootstrap exited with a non-zero exit code
AND vmdebootstrap wrote an error message matching not yet supported
SCENARIO btrfs not yet supported without disabling extlinux
ASSUMING fast tests are requested
WHEN user attempts to run vmdebootstrap
... --image=FOO --roottype btrfs --dry-run
THEN vmdebootstrap exited with a non-zero exit code
AND vmdebootstrap wrote an error message matching not yet supported
SCENARIO bootflag requires argument
ASSUMING fast tests are requested
WHEN user attempts to run vmdebootstrap
... --bootflag
THEN vmdebootstrap exited with a non-zero exit code
AND vmdebootstrap wrote an error message matching bootflag
AND vmdebootstrap wrote an error message matching requires an argument
SCENARIO wheezy image does not support ext4
ASSUMING fast tests are requested
WHEN user attempts to run vmdebootstrap
... --image=FOO --roottype ext4 --dry-run --distribution wheezy
THEN vmdebootstrap exited with a non-zero exit code
AND vmdebootstrap wrote an error message matching Wheezy images using ext4 will not be able to boot
|