59fc2d9b90ca4dc74be5312625e6611dff7d4072
[snaps.git] / docs / UnitTests.md
1 # SNAPS Unit Testing
2
3 Tests designated as Unit tests extend the unittest.TestCase class and can be exercised without any external resources
4 other than the filesystem. Most of these tests simply ensure that the configuration settings classes check their
5 constructor arguments properly.
6
7 # The Test Classes
8
9 ## FileUtilsTests
10 * testFileIsDirectory - ensures that the expected path is a directory
11 * testFileNotExist - ensures that a file that does not exist returns False
12 * testFileExists - ensures that a file that does exist returns True
13 * testDownloadBadUrl - ensures that an Exception is thrown when attempting to download a file with a bad URL
14 * testCirrosImageDownload - ensures that the Cirros image can be downloaded
15 * testReadOSEnvFile - ensures that an OpenStack RC file can be properly parsed
16
17 ## SecurityGroupRuleSettingsUnitTests
18 Ensures that all required members are included when constructing a SecurityGroupRuleSettings object
19
20 ## SecurityGroupSettingsUnitTests
21 Ensures that all required members are included when constructing a SecuirtyGroupSettings object
22
23 ## ImageSettingsUnitTests
24 Ensures that all required members are included when constructing a ImageSettings object
25
26 ## KeypairSettingsUnitTests
27 Ensures that all required members are included when constructing a KeypairSettings object
28
29 ## UserSettingsUnitTests
30 Ensures that all required members are included when constructing a UserSettings object
31
32 ## ProjectSettingsUnitTests
33 Ensures that all required members are included when constructing a ProjectSettings object
34
35 ## NetworkSettingsUnitTests
36 Ensures that all required members are included when constructing a NetworkSettings object
37
38 ## SubnetSettingsUnitTests
39 Ensures that all required members are included when constructing a SubnetSettings object
40
41 ## PortSettingsUnitTests
42 Ensures that all required members are included when constructing a PortSettings object
43
44 ## FloatingIpSettingsUnitTests
45 Ensures that all required members are included when constructing a FloatingIpSettings object
46
47 ## VmInstanceSettingsUnitTests
48 Ensures that all required members are included when constructing a VmInstanceSettings object