7. SNAPS Unit Testing

Tests designated as Unit tests extend the unittest.TestCase class and can be exercised without any external resources
other than the filesystem. Most of these tests simply ensure that the configuration settings classes check their
constructor arguments properly.

8. The Test Classes

8.1. FileUtilsTests

  • testFileIsDirectory - ensures that the expected path is a directory
  • testFileNotExist - ensures that a file that does not exist returns False
  • testFileExists - ensures that a file that does exist returns True
  • testDownloadBadUrl - ensures that an Exception is thrown when attempting to download a file with a bad URL
  • testCirrosImageDownload - ensures that the Cirros image can be downloaded
  • testReadOSEnvFile - ensures that an OpenStack RC file can be properly parsed

8.2. ProxySettingsUnitTests

Ensures that all required members are included when constructing a ProxySettings object

8.3. OSCredsUnitTests

Ensures that all required members are included when constructing a OSCreds object

8.4. SecurityGroupRuleConfigUnitTests

Ensures that all required members are included when constructing a SecurityGroupRuleConfig object

8.5. SecurityGroupRuleSettingsUnitTests

Ensures that all required members are included when constructing a deprecated SecurityGroupRuleSettings object

8.6. SecurityGroupRuleDomainObjectTests

Ensures that all required members are included when constructing a SecurityGroupRule domain object

8.7. SecurityGroupConfigUnitTests

Ensures that all required members are included when constructing a SecuirtyGroupConfig object

8.8. SecurityGroupSettingsUnitTests

Ensures that all required members are included when constructing a deprecated SecuirtyGroupSettings object

8.9. SecurityGroupDomainObjectTests

Ensures that all required members are included when constructing a SecurityGroup domain object

8.10. ImageConfigUnitTests

Ensures that all required members are included when constructing a ImageConfig object

8.11. ImageSettingsUnitTests

Ensures that all required members are included when constructing a ImageSettings object (deprecated see ImageConfigUnitTests)

8.12. ImageDomainObjectTests

Ensures that all required members are included when constructing a Image domain object

8.13. FlavorConfigUnitTests

Ensures that all required members are included when constructing a FlavorConfig object

8.14. FlavorSettingsUnitTests

Ensures that all required members are included when constructing a deprecated FlavorSettings object

8.15. FlavorDomainObjectTests

Ensures that all required members are included when constructing a Flavor domain object

8.16. KeypairConfigUnitTests

Ensures that all required members are included when constructing a KeypairConfig object

8.17. KeypairSettingsUnitTests

Ensures that all required members are included when constructing a deprecated KeypairSettings object

8.18. KeypairDomainObjectTests

Ensures that all required members are included when constructing a Keypair domain object

8.19. UserConfigUnitTests

Ensures that all required members are included when constructing a UserConfig object

8.20. UserSettingsUnitTests

Ensures that all required members are included when constructing a deprecated UserSettings object

8.21. UserDomainObjectTests

Ensures that all required members are included when constructing a User domain object

8.22. ProjectConfigUnitTests

Ensures that all required members are included when constructing a ProjectConfig object

8.23. ProjectSettingsUnitTests

Ensures that all required members are included when constructing a deprecated ProjectSettings object

8.24. ProjectDomainObjectTests

Ensures that all required members are included when constructing a Project domain object

8.25. DomainDomainObjectTests

Ensures that all required members are included when constructing a Domain domain object

8.26. ComputeQuotasDomainObjectTests

Ensures that all required members are included when constructing a ComputeQuotas domain object

8.27. NetworkQuotasDomainObjectTests

Ensures that all required members are included when constructing a NetworkQuotas domain object

8.28. RoleDomainObjectTests

Ensures that all required members are included when constructing a Role domain object

8.29. NetworkConfigUnitTests

Ensures that all required members are included when constructing a NetworkConfig object

8.30. NetworkSettingsUnitTests

Ensures that all required members are included when constructing a deprecated NetworkSettings object

8.31. NetworkObjectTests

Ensures that all required members are included when constructing a Network domain object

8.32. SubnetConfigUnitTests

Ensures that all required members are included when constructing a SubnetConfig object

8.33. SubnetSettingsUnitTests

Ensures that all required members are included when constructing a deprecated SubnetSettings object

8.34. SubnetObjectTests

Ensures that all required members are included when constructing a Subnet domain object

8.35. PortConfigUnitTests

Ensures that all required members are included when constructing a PortConfig object

8.36. PortSettingsUnitTests

Ensures that all required members are included when constructing a deprecated PortSettings object

8.37. PortDomainObjectTests

Ensures that all required members are included when constructing a Port domain object

8.38. RouterConfigUnitTests

Ensures that all required members are included when constructing a RouterConfig object

8.39. RouterSettingsUnitTests

Ensures that all required members are included when constructing a deprecated RouterSettings object

8.40. RouterDomainObjectTests

Ensures that all required members are included when constructing a Router domain object

8.41. InterfaceRouterDomainObjectTests

Ensures that all required members are included when constructing a InterfaceRouter domain object

8.42. StackConfigUnitTests

Ensures that all required members are included when constructing a StackConfig object

8.43. StackSettingsUnitTests

Ensures that all required members are included when constructing a deprecated StackSettings object

8.44. StackDomainObjectTests

Ensures that all required members are included when constructing a Stack domain object (for Heat)

8.45. ResourceDomainObjectTests

Ensures that all required members are included when constructing a Resource domain object (for Heat)

8.46. OutputDomainObjectTests

Ensures that all required members are included when constructing a Output domain object (for Heat)

8.47. VolumeConfigUnitTests

Ensures that all required members are included when constructing a VolumeConfig object

8.48. VolumeSettingsUnitTests

Ensures that all required members are included when constructing a deprecated VolumeSettings object

8.49. VolumeDomainObjectTests

Ensures that all required members are included when constructing a Volume domain object (for Cinder)

8.50. VolumeTypeConfigUnitTests

Ensures that all required members are included when constructing a VolumeTypeConfig object

8.51. VolumeTypeSettingsUnitTests

Ensures that all required members are included when constructing a deprecated VolumeTypeSettings object

8.52. VolumeTypeDomainObjectTests

Ensures that all required members are included when constructing a VolumeType domain object (for Cinder)

8.53. VolumeTypeEncryptionObjectTests

Ensures that all required members are included when constructing a VolumeTypeEncryption domain object (for Cinder)

8.54. QoSConfigUnitTests

Ensures that all required members are included when constructing a QoSConfig object

8.55. QoSSettingsUnitTests

Ensures that all required members are included when constructing a deprecated QoSSettings object

8.56. QoSSpecDomainObjectTests

Ensures that all required members are included when constructing a QoSSpec domain object (for Cinder)

8.57. VolumeDomainObjectTests

Ensures that all required members are included when constructing a Volume domain object (for Cinder)

8.58. FloatingIpConfigUnitTests

Ensures that all required members are included when constructing a FloatingIpConfig object

8.59. FloatingIpSettingsUnitTests

Ensures that all required members are included when constructing a depecated FloatingIpSettings object

8.60. FloatingIpDomainObjectTests

Ensures that all required members are included when constructing a FloatingIp domain object

8.61. VmInstanceConfigUnitTests

Ensures that all required members are included when constructing a VmInstanceConfig object

8.62. VmInstanceSettingsUnitTests

Ensures that all required members are included when constructing a deprecated VmInstanceSettings object

8.63. VmInstDomainObjectTests

Ensures that all required members are included when constructing a VmInst domain object

8.64. ClusterTemplateConfigUnitTests

Ensures that all required members are included when constructing a ClusterTemplateConfig object

8.65. ClusterTemplateUnitTests

Ensures that all required members are included when constructing a ClusterTemplate object

8.66. SettingsUtilsUnitTests

Ensures that the settings_utils.py#create_volume_config() function properly maps a snaps.domain.Volume object correctly to a snaps.config.volume.VolumeConfig object as well as a snaps.domain.VolumeType object to a snaps.config.volume.VolumeConfig object

Ensures that the settings_utils.py#create_flavor_config() function properly maps a snaps.domain.Flavor object correctly to a snaps.config.flavor.FlavorConfig object