root / docs / snf-burnin.rst @ e3ff6830
History | View | Annotate | Download (7.8 kB)
1 |
.. _snf-burnin: |
---|---|
2 |
|
3 |
snf-burnin |
4 |
^^^^^^^^^^ |
5 |
|
6 |
:ref:`snf-burnin <snf-burnin>` is an integration testing tool for a running |
7 |
Synnefo deployment. It uses the Synnefo REST APIs to run test scenarios for the |
8 |
following categories: |
9 |
|
10 |
* :ref:`Authentication <unauthorizedtestcase>` |
11 |
* :ref:`Images <imagestestcase>` |
12 |
* :ref:`Flavors <flavorstestcase>` |
13 |
* :ref:`Servers <serverstestcase>` |
14 |
* :ref:`Network <networktestcase>` |
15 |
* :ref:`Storage <pithostestcase>` |
16 |
|
17 |
|
18 |
Usage |
19 |
===== |
20 |
|
21 |
**Example:** |
22 |
|
23 |
:: |
24 |
|
25 |
snf-burnin --token=TOKEN \ |
26 |
--api=CYCLADES_BASE_URL |
27 |
--pithos=PITHOS_BASE_URL \ |
28 |
--astakos=ASTAKOS_BASE_URL \ |
29 |
--plankton=PLANKTON_URL \ |
30 |
--plankton-user=PLANKTON_SYSTEM_USER \ |
31 |
--image-id=IMAGE_ID \ |
32 |
--log-folder=LOG_FOLDER |
33 |
|
34 |
For more info |
35 |
|
36 |
:: |
37 |
|
38 |
snf-burnin --help |
39 |
|
40 |
:: |
41 |
|
42 |
Options: |
43 |
-h, --help show this help message and exit |
44 |
--api=API The API URI to use to reach the Synnefo API |
45 |
--plankton=PLANKTON The API URI to use to reach the Plankton API |
46 |
--plankton-user=PLANKTON_USER |
47 |
Owner of system images |
48 |
--pithos=PITHOS The API URI to use to reach the Pithos API |
49 |
--astakos=ASTAKOS The API URI to use to reach the Astakos API |
50 |
--token=TOKEN The token to use for authentication to the API |
51 |
--nofailfast Do not fail immediately if one of the tests fails |
52 |
(EXPERIMENTAL) |
53 |
--no-ipv6 Disables ipv6 related tests |
54 |
--action-timeout=TIMEOUT |
55 |
Wait SECONDS seconds for a server action to complete, |
56 |
then the test is considered failed |
57 |
--build-warning=TIMEOUT |
58 |
Warn if TIMEOUT seconds have passed and a build |
59 |
operation is still pending |
60 |
--build-fail=BUILD_TIMEOUT |
61 |
Fail the test if TIMEOUT seconds have passed and a |
62 |
build operation is still incomplete |
63 |
--query-interval=INTERVAL |
64 |
Query server status when requests are pending every |
65 |
INTERVAL seconds |
66 |
--fanout=COUNT Spawn up to COUNT child processes to execute in |
67 |
parallel, essentially have up to COUNT server build |
68 |
requests outstanding (EXPERIMENTAL) |
69 |
--force-flavor=FLAVOR ID |
70 |
Force all server creations to use the specified FLAVOR |
71 |
ID instead of a randomly chosen one, useful if disk |
72 |
space is scarce |
73 |
--image-id=IMAGE ID Test the specified image id, use 'all' to test all |
74 |
available images (mandatory argument) |
75 |
--show-stale Show stale servers from previous runs, whose name |
76 |
starts with `snf-test-' |
77 |
--delete-stale Delete stale servers from previous runs, whose name |
78 |
starts with `snf-test-' |
79 |
--force-personality=PERSONALITY_PATH |
80 |
Force a personality file injection. |
81 |
File path required. |
82 |
--log-folder=LOG_FOLDER |
83 |
Define the absolute path where the output |
84 |
log is stored. |
85 |
-V, --verbose Print detailed output about multiple processes |
86 |
spawning |
87 |
--set-tests=TESTS Set comma seperated tests for this run. |
88 |
Available tests: auth, images, flavors, |
89 |
servers, server_spawn, |
90 |
network_spawn, pithos. |
91 |
Default = all |
92 |
|
93 |
|
94 |
Log files |
95 |
========= |
96 |
|
97 |
In each run, snf-burnin stores log files in the folder defined in the |
98 |
--log-foler parameter, under the folder with the timestamp of the |
99 |
snf-burnin-run and the image used for it. The name prefixes of the log |
100 |
files are: |
101 |
|
102 |
* details: Showing the complete log of snf-burnin run. |
103 |
* error: Showing the testcases that encountered a runtime error. |
104 |
* failed: Showing the testcases that encountered a failure. |
105 |
|
106 |
|
107 |
Detailed description of testcases |
108 |
================================= |
109 |
|
110 |
.. _unauthorizedtestcase: |
111 |
|
112 |
UnauthorizedTestCase |
113 |
-------------------- |
114 |
* Test that trying to access without a valid token, fails |
115 |
|
116 |
.. _imagestestcase: |
117 |
|
118 |
ImagesTestCase |
119 |
-------------- |
120 |
* Test image list actually returns images |
121 |
* Test detailed image list has the same length as list |
122 |
* Test detailed and simple image list contain the same names |
123 |
* Test system images have unique names |
124 |
* Test every image has specific metadata defined |
125 |
* Download image from Pithos |
126 |
* Upload and register image |
127 |
|
128 |
.. _flavorstestcase: |
129 |
|
130 |
FlavorsTestCase |
131 |
--------------- |
132 |
* Test flavor list actually returns flavors |
133 |
* Test detailed flavor list has the same length as list |
134 |
* Test detailed and simple flavor list contain the same names |
135 |
* Test flavors have unique names |
136 |
* Test flavor names have correct format |
137 |
|
138 |
.. _serverstestcase: |
139 |
|
140 |
ServersTestCase |
141 |
--------------- |
142 |
* Test simple and detailed server list have the same length |
143 |
* Test simple and detailed servers have the same names |
144 |
|
145 |
SpawnServerTestCase |
146 |
------------------- |
147 |
* Submit create server |
148 |
* Test server is in BUILD state in server list |
149 |
* Test server is in BUILD state in server details |
150 |
* Change server metadata |
151 |
* Verify the changed metadata are correct |
152 |
* Verify server metadata are set based on image metadata |
153 |
* Wait until server changes state to ACTIVE, and verify state |
154 |
* Test if OOB server console works |
155 |
* Test if server has IPv4 |
156 |
* Test if server has IPv6 |
157 |
* Test if server responds to ping on IPv4 address |
158 |
* Test if server responds to ping on IPv6 address |
159 |
* Submit shutdown request |
160 |
* Verify server status is STOPPED |
161 |
* Submit start request |
162 |
* Test server status is ACTIVE |
163 |
* Test if server responds to ping on IPv4 address (verify up and running) |
164 |
* Test if server responds to ping on IPv6 address (verify up and running) |
165 |
* Test SSH to server and verify hostname (IPv4) |
166 |
* Test SSH to server and verify hostname (IPv6) |
167 |
* Test RDP connection to server (only for Window Images) (IPv4) |
168 |
* Test RDP connection to server (only for Window Images) (IPv6) |
169 |
* Test file injection for personality enforcement |
170 |
* Submit server delete request |
171 |
* Test server becomes DELETED |
172 |
* Test server is no longer in server list |
173 |
|
174 |
.. _networktestcase: |
175 |
|
176 |
NetworkTestCase |
177 |
--------------- |
178 |
* Submit create server A request |
179 |
* Test server A becomes ACTIVE |
180 |
* Submit create server B request |
181 |
* Test server B becomes ACTIVE |
182 |
* Submit create private network request |
183 |
* Submit connect VMs to private network |
184 |
* Test if VMs are connected to network |
185 |
* Submit reboot request to server A |
186 |
* Test server A responds to ping on IPv4 address (verify up and running) |
187 |
* Submit reboot request to server B |
188 |
* Test server B responds to ping on IPv4 address (verify up and running) |
189 |
* Connect via SSH and setup the new network interface in server A |
190 |
* Connect via SSH and setup the new network interface in server B |
191 |
* Connect via SSH to server A and test if server B responds to ping on IPv4 address |
192 |
* Disconnect servers from network and verify the network details |
193 |
* Send delete network request and verify that the network is deleted from the list |
194 |
* Send request to delete servers and wait until they are actually deleted |
195 |
|
196 |
.. _pithostestcase: |
197 |
|
198 |
PithosTestCase |
199 |
-------------- |
200 |
* Test container list is not empty |
201 |
* Test containers have unique names |
202 |
* Create a new container |
203 |
* Upload simple file to newly created container |
204 |
* Download file from Pithos and test it is the same with the one uploaded |
205 |
* Remove created file and container from Pithos |
206 |
|
207 |
|
208 |
Example scripts |
209 |
=============== |
210 |
|
211 |
Under /snf-tools/conf you can find example scripts for automating snf-burnin |
212 |
testing using cron. |
213 |
|
214 |
* **snf-burnin-run.sh** runs snf-burnin with the given parameters, deletes |
215 |
stale instances (servers, networks) from old runs and delete logs older |
216 |
than a week. It aborts if snf-burnin runs for longer than expected. |
217 |
|
218 |
* **snf-burnin-output.sh** checks for failed snf-burnin tests the last 30 |
219 |
minutes in a given log folder. Exit status is 0 if no failures were |
220 |
encountered, else exit status is 1. |