blob: 8955d759ed04085b489da2ad66c064372286b2ff (
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
|
# 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 --image used with a zero size
ASSUMING fast tests are requested
WHEN user attempts to run vmdebootstrap
... --image=FOO --size=0 --dry-run
THEN vmdebootstrap exited with a non-zero exit code
AND vmdebootstrap wrote an error message matching disk image
AND vmdebootstrap wrote an error message matching must
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 --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
|