efd64260f7c7704e9b991d2d4cbb9658fe39a528
[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 SecurityGroupRuleSettingsUnitTests
28 ----------------------------------
29
30 Ensures that all required members are included when constructing a
31 SecurityGroupRuleSettings object
32
33 SecurityGroupSettingsUnitTests
34 ------------------------------
35
36 Ensures that all required members are included when constructing a
37 SecuirtyGroupSettings object
38
39 ImageSettingsUnitTests
40 ----------------------
41
42 Ensures that all required members are included when constructing a
43 ImageSettings object
44
45 KeypairSettingsUnitTests
46 ------------------------
47
48 Ensures that all required members are included when constructing a
49 KeypairSettings object
50
51 UserSettingsUnitTests
52 ---------------------
53
54 Ensures that all required members are included when constructing a
55 UserSettings object
56
57 ProjectSettingsUnitTests
58 ------------------------
59
60 Ensures that all required members are included when constructing a
61 ProjectSettings object
62
63 NetworkSettingsUnitTests
64 ------------------------
65
66 Ensures that all required members are included when constructing a
67 NetworkSettings object
68
69 SubnetSettingsUnitTests
70 -----------------------
71
72 Ensures that all required members are included when constructing a
73 SubnetSettings object
74
75 PortSettingsUnitTests
76 ---------------------
77
78 Ensures that all required members are included when constructing a
79 PortSettings object
80
81 FloatingIpSettingsUnitTests
82 ---------------------------
83
84 Ensures that all required members are included when constructing a
85 FloatingIpSettings object
86
87 VmInstanceSettingsUnitTests
88 ---------------------------
89
90 Ensures that all required members are included when constructing a
91 VmInstanceSettings object