Refactoring of SecurityGroupSettings to extend SecurityGroupConfig
[snaps.git] / docs / how-to-use / UnitTests.rst
1 SNAPS Unit Testing
2 ==================
3
4 | Tests designated as Unit tests extend the unittest.TestCase class and
5   can be exercised without any external resources
6 | other than the filesystem. Most of these tests simply ensure that the
7   configuration settings classes check their
8 | constructor arguments properly.
9
10 The Test Classes
11 ================
12
13 FileUtilsTests
14 --------------
15
16 -  testFileIsDirectory - ensures that the expected path is a directory
17 -  testFileNotExist - ensures that a file that does not exist returns
18    False
19 -  testFileExists - ensures that a file that does exist returns True
20 -  testDownloadBadUrl - ensures that an Exception is thrown when
21    attempting to download a file with a bad URL
22 -  testCirrosImageDownload - ensures that the Cirros image can be
23    downloaded
24 -  testReadOSEnvFile - ensures that an OpenStack RC file can be properly
25    parsed
26
27 ProxySettingsUnitTests
28 ----------------------
29
30 Ensures that all required members are included when constructing a
31 ProxySettings object
32
33 OSCredsUnitTests
34 ----------------
35
36 Ensures that all required members are included when constructing a
37 OSCreds object
38
39 SecurityGroupRuleConfigUnitTests
40 --------------------------------
41
42 Ensures that all required members are included when constructing a
43 SecurityGroupRuleConfig object
44
45 SecurityGroupRuleSettingsUnitTests
46 ----------------------------------
47
48 Ensures that all required members are included when constructing a
49 deprecated SecurityGroupRuleSettings object
50
51 SecurityGroupRuleDomainObjectTests
52 ----------------------------------
53
54 Ensures that all required members are included when constructing a
55 SecurityGroupRule domain object
56
57 SecurityGroupConfigUnitTests
58 ----------------------------
59
60 Ensures that all required members are included when constructing a
61 SecuirtyGroupConfig object
62
63 SecurityGroupSettingsUnitTests
64 ------------------------------
65
66 Ensures that all required members are included when constructing a
67 deprecated SecuirtyGroupSettings object
68
69 SecurityGroupDomainObjectTests
70 ------------------------------
71
72 Ensures that all required members are included when constructing a
73 SecurityGroup domain object
74
75 ImageConfigUnitTests
76 --------------------
77
78 Ensures that all required members are included when constructing a
79 ImageConfig object
80
81 ImageSettingsUnitTests
82 ----------------------
83
84 Ensures that all required members are included when constructing a
85 ImageSettings object (deprecated see ImageConfigUnitTests)
86
87 ImageDomainObjectTests
88 ----------------------
89
90 Ensures that all required members are included when constructing a
91 Image domain object
92
93 FlavorConfigUnitTests
94 ---------------------
95
96 Ensures that all required members are included when constructing a
97 FlavorConfig object
98
99 FlavorSettingsUnitTests
100 -----------------------
101
102 Ensures that all required members are included when constructing a
103 deprecated FlavorSettings object
104
105 FlavorDomainObjectTests
106 -----------------------
107
108 Ensures that all required members are included when constructing a
109 Flavor domain object
110
111 KeypairConfigUnitTests
112 ----------------------
113
114 Ensures that all required members are included when constructing a
115 KeypairConfig object
116
117 KeypairSettingsUnitTests
118 ------------------------
119
120 Ensures that all required members are included when constructing a
121 deprecated KeypairSettings object
122
123 KeypairDomainObjectTests
124 ------------------------
125
126 Ensures that all required members are included when constructing a
127 Keypair domain object
128
129 UserConfigUnitTests
130 -------------------
131
132 Ensures that all required members are included when constructing a
133 UserConfig object
134
135 UserSettingsUnitTests
136 ---------------------
137
138 Ensures that all required members are included when constructing a
139 deprecated UserSettings object
140
141 UserDomainObjectTests
142 ---------------------
143
144 Ensures that all required members are included when constructing a
145 User domain object
146
147 ProjectConfigUnitTests
148 ----------------------
149
150 Ensures that all required members are included when constructing a
151 ProjectConfig object
152
153 ProjectSettingsUnitTests
154 ------------------------
155
156 Ensures that all required members are included when constructing a
157 deprecated ProjectSettings object
158
159 ProjectDomainObjectTests
160 ------------------------
161
162 Ensures that all required members are included when constructing a
163 Project domain object
164
165 DomainDomainObjectTests
166 -----------------------
167
168 Ensures that all required members are included when constructing a
169 Domain domain object
170
171 ComputeQuotasDomainObjectTests
172 ------------------------------
173
174 Ensures that all required members are included when constructing a
175 ComputeQuotas domain object
176
177 NetworkQuotasDomainObjectTests
178 ------------------------------
179
180 Ensures that all required members are included when constructing a
181 NetworkQuotas domain object
182
183 RoleDomainObjectTests
184 ---------------------
185
186 Ensures that all required members are included when constructing a
187 Role domain object
188
189 NetworkConfigUnitTests
190 ----------------------
191
192 Ensures that all required members are included when constructing a
193 NetworkConfig object
194
195 NetworkSettingsUnitTests
196 ------------------------
197
198 Ensures that all required members are included when constructing a
199 deprecated NetworkSettings object
200
201 NetworkObjectTests
202 ------------------
203
204 Ensures that all required members are included when constructing a
205 Network domain object
206
207 SubnetConfigUnitTests
208 ---------------------
209
210 Ensures that all required members are included when constructing a
211 SubnetConfig object
212
213 SubnetSettingsUnitTests
214 -----------------------
215
216 Ensures that all required members are included when constructing a
217 deprecated SubnetSettings object
218
219 SubnetObjectTests
220 -----------------
221
222 Ensures that all required members are included when constructing a
223 Subnet domain object
224
225 PortConfigUnitTests
226 -------------------
227
228 Ensures that all required members are included when constructing a
229 PortConfig object
230
231 PortSettingsUnitTests
232 ---------------------
233
234 Ensures that all required members are included when constructing a
235 deprecated PortSettings object
236
237 PortDomainObjectTests
238 ---------------------
239
240 Ensures that all required members are included when constructing a
241 Port domain object
242
243 RouterConfigUnitTests
244 ---------------------
245
246 Ensures that all required members are included when constructing a
247 RouterConfig object
248
249 RouterSettingsUnitTests
250 -----------------------
251
252 Ensures that all required members are included when constructing a
253 deprecated RouterSettings object
254
255 RouterDomainObjectTests
256 -----------------------
257
258 Ensures that all required members are included when constructing a
259 Router domain object
260
261 InterfaceRouterDomainObjectTests
262 --------------------------------
263
264 Ensures that all required members are included when constructing a
265 InterfaceRouter domain object
266
267 StackConfigUnitTests
268 --------------------
269
270 Ensures that all required members are included when constructing a
271 StackConfig object
272
273 StackSettingsUnitTests
274 ----------------------
275
276 Ensures that all required members are included when constructing a
277 deprecated StackSettings object
278
279 StackDomainObjectTests
280 ----------------------
281
282 Ensures that all required members are included when constructing a
283 Stack domain object (for Heat)
284
285 ResourceDomainObjectTests
286 -------------------------
287
288 Ensures that all required members are included when constructing a
289 Resource domain object (for Heat)
290
291 OutputDomainObjectTests
292 -----------------------
293
294 Ensures that all required members are included when constructing a
295 Output domain object (for Heat)
296
297 VolumeConfigUnitTests
298 ---------------------
299
300 Ensures that all required members are included when constructing a
301 VolumeConfig object
302
303 VolumeSettingsUnitTests
304 -----------------------
305
306 Ensures that all required members are included when constructing a
307 deprecated VolumeSettings object
308
309 VolumeDomainObjectTests
310 -----------------------
311
312 Ensures that all required members are included when constructing a
313 Volume domain object (for Cinder)
314
315 VolumeTypeConfigUnitTests
316 -------------------------
317
318 Ensures that all required members are included when constructing a
319 VolumeTypeConfig object
320
321 VolumeTypeSettingsUnitTests
322 ---------------------------
323
324 Ensures that all required members are included when constructing a
325 deprecated VolumeTypeSettings object
326
327 VolumeTypeDomainObjectTests
328 ---------------------------
329
330 Ensures that all required members are included when constructing a
331 VolumeType domain object (for Cinder)
332
333 VolumeTypeEncryptionObjectTests
334 -------------------------------
335
336 Ensures that all required members are included when constructing a
337 VolumeTypeEncryption domain object (for Cinder)
338
339 QoSConfigUnitTests
340 ------------------
341
342 Ensures that all required members are included when constructing a
343 QoSConfig object
344
345 QoSSettingsUnitTests
346 --------------------
347
348 Ensures that all required members are included when constructing a
349 deprecated QoSSettings object
350
351 QoSSpecDomainObjectTests
352 ------------------------
353
354 Ensures that all required members are included when constructing a
355 QoSSpec domain object (for Cinder)
356
357 VolumeDomainObjectTests
358 -----------------------
359
360 Ensures that all required members are included when constructing a
361 Volume domain object (for Cinder)
362
363 FloatingIpConfigUnitTests
364 -------------------------
365
366 Ensures that all required members are included when constructing a
367 FloatingIpConfig object
368
369 FloatingIpSettingsUnitTests
370 ---------------------------
371
372 Ensures that all required members are included when constructing a
373 depecated FloatingIpSettings object
374
375 FloatingIpDomainObjectTests
376 ---------------------------
377
378 Ensures that all required members are included when constructing a
379 FloatingIp domain object
380
381 VmInstanceConfigUnitTests
382 -------------------------
383
384 Ensures that all required members are included when constructing a
385 VmInstanceConfig object
386
387 VmInstanceSettingsUnitTests
388 ---------------------------
389
390 Ensures that all required members are included when constructing a
391 deprecated VmInstanceSettings object
392
393 VmInstDomainObjectTests
394 -----------------------
395
396 Ensures that all required members are included when constructing a
397 VmInst domain object
398
399 SettingsUtilsUnitTests
400 ----------------------
401
402 Ensures that the settings_utils.py#create_volume_config() function properly
403 maps a snaps.domain.Volume object correctly to a
404 snaps.config.volume.VolumeConfig object as well as a
405 snaps.domain.VolumeType object to a
406 snaps.config.volume.VolumeConfig object
407
408
409 Ensures that the settings_utils.py#create_flavor_config() function properly
410 maps a snaps.domain.Flavor object correctly to a
411 snaps.config.flavor.FlavorConfig object