summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--docs/how-to-use/APITests.rst70
-rw-r--r--docs/how-to-use/IntegrationTests.rst83
-rw-r--r--docs/how-to-use/LibraryUsage.rst5
-rw-r--r--docs/how-to-use/Testing.rst3
-rw-r--r--docs/how-to-use/UnitTests.rst126
5 files changed, 267 insertions, 20 deletions
diff --git a/docs/how-to-use/APITests.rst b/docs/how-to-use/APITests.rst
index 62efd1c..68a1a07 100644
--- a/docs/how-to-use/APITests.rst
+++ b/docs/how-to-use/APITests.rst
@@ -34,6 +34,12 @@ nova_utils_tests.py - NovaSmokeTests
Ensures that a Nova client can be obtained as well as the proper
exceptions thrown with the wrong credentials.
+heat_utils_tests.py - HeatSmokeTests
+------------------------------------
+
+Ensures that a Heat client can be obtained as well as the proper
+exceptions thrown with the wrong credentials.
+
keystone_utils_tests.py - KeystoneUtilsTests
--------------------------------------------
@@ -55,6 +61,12 @@ keystone_utils_tests.py - KeystoneUtilsTests
| test_get_endpoint_fail_without | 2 & 3 | Tests to ensure that improper credentials and proper |
| _proper_credentials | | service type cannot succeed |
+----------------------------------+---------------+-----------------------------------------------------------+
+| test_get_endpoint_with_each | 2 & 3 | Tests to ensure that an interface URL is returned for each|
+| _interface | | supported interface type (i.e. public, internal, & admin) |
++----------------------------------+---------------+-----------------------------------------------------------+
+| test_grant_user_role_to_project | 2 & 3 | Tests to ensure that one can grant a new user's role to a |
+| | | new project |
++----------------------------------+---------------+-----------------------------------------------------------+
create_user_tests.py - CreateUserSuccessTests
---------------------------------------------
@@ -64,6 +76,14 @@ create_user_tests.py - CreateUserSuccessTests
| test_create_user | 2 & 3 | Tests the creation of a user with minimal configuration |
| | | settings via the utility functions |
+----------------------------------+---------------+-----------------------------------------------------------+
+| test_create_user_2x | 2 & 3 | Tests the creation of a user 2x and ensure it has been |
+| | | done only once |
++----------------------------------+---------------+-----------------------------------------------------------+
+| test_create_delete_user | 2 & 3 | Tests the creation of a user and ensure clean can be |
+| | | called 2x without exceptions being raised |
++----------------------------------+---------------+-----------------------------------------------------------+
+| test_create_admin_user | 2 & 3 | Tests the creation of a user with an 'admin' role |
++----------------------------------+---------------+-----------------------------------------------------------+
create_project_tests.py - CreateProjectSuccessTests
---------------------------------------------------
@@ -71,13 +91,14 @@ create_project_tests.py - CreateProjectSuccessTests
+----------------------------------+---------------+-----------------------------------------------------------+
| Test Name | Keystone API | Description |
+==================================+===============+===========================================================+
-| test_create_user_minimal | 2 & 3 | Tests the creation of a user via the OpenStackUser class |
+| test_create_project | 2 & 3 | Tests the creation of a project via the OpenStackProject |
+| | | class |
+----------------------------------+---------------+-----------------------------------------------------------+
-| test_create_user_2x | 2 & 3 | Tests the creation of a user a second time via the |
-| | | OpenStackUser class to ensure it is only created once |
+| test_create_project_2x | 2 & 3 | Tests the creation of a project a second time via the |
+| | | OpenStackProject class to ensure it is only created once |
+----------------------------------+---------------+-----------------------------------------------------------+
-| test_create_delete_user | 2 & 3 | Tests the creation and deletion of a user via the |
-| | | OpenStackUser class to ensure that clean will not raise |
+| test_create_delete_project | 2 & 3 | Tests the creation and deletion of a project via the |
+| | | OpenStackProject class to ensure that clean will not raise|
| | | an exception |
+----------------------------------+---------------+-----------------------------------------------------------+
@@ -215,6 +236,18 @@ neutron_utils_tests.py - NeutronUtilsSecurityGroupTests
| test_create_sec_grp_one_rule | 2 | Ensures that neutron_utils.create_security_group_rule() |
| | | can add a rule to a security group |
+---------------------------------------+---------------+-----------------------------------------------------------+
+| test_get_sec_grp_by_id | 2 | Ensures that neutron_utils.get_security_group_by_id() |
+| | | returns the expected security group |
++---------------------------------------+---------------+-----------------------------------------------------------+
+
+neutron_utils_tests.py - NeutronUtilsFloatingIpTests
+----------------------------------------------------
+
++---------------------------------------+---------------+-----------------------------------------------------------+
+| Test Name | Neutron API | Description |
++=======================================+===============+===========================================================+
+| test_floating_ips | 2 | Ensures that a floating IP can be created |
++---------------------------------------+---------------+-----------------------------------------------------------+
nova_utils_tests.py - NovaUtilsKeypairTests
-------------------------------------------
@@ -231,10 +264,6 @@ nova_utils_tests.py - NovaUtilsKeypairTests
| test_create_key_from_file | 2 | Ensures that a keypair can be properly created via |
| | | nova_utils.upload_keypair_file() |
+---------------------------------------+---------------+-----------------------------------------------------------+
-| test_floating_ips | 2 | Ensures that a floating IP can be properly created via |
-| | | nova_utils.create_floating_ip() [note: this test should |
-| | | be moved to a new class] |
-+---------------------------------------+---------------+-----------------------------------------------------------+
nova_utils_tests.py - NovaUtilsFlavorTests
------------------------------------------
@@ -249,6 +278,16 @@ nova_utils_tests.py - NovaUtilsFlavorTests
| | | nova_utils.delete_flavor() |
+---------------------------------------+---------------+-----------------------------------------------------------+
+nova_utils_tests.py - NovaUtilsInstanceTests
+--------------------------------------------
+
++---------------------------------------+---------------+-----------------------------------------------------------+
+| Test Name | Nova API | Description |
++=======================================+===============+===========================================================+
+| test_create_instance | 2 | Ensures that a VM instance can be properly created via |
+| | | nova_utils.create_server() |
++---------------------------------------+---------------+-----------------------------------------------------------+
+
create_flavor_tests.py - CreateFlavorTests
------------------------------------------
@@ -268,3 +307,16 @@ create_flavor_tests.py - CreateFlavorTests
| | | will not raise an exception when called and the object no |
| | | longer exists |
+---------------------------------------+---------------+-----------------------------------------------------------+
+| test_create_delete_flavor_all_settings| 2 | Ensures that the OpenStackFlavor class will create a |
+| | | a flavor properly with all supported settings |
++---------------------------------------+---------------+-----------------------------------------------------------+
+
+heat_utils_tests.py - HeatUtilsCreateStackTests
+-----------------------------------------------
+
++---------------------------------------+---------------+-----------------------------------------------------------+
+| Test Name | Glance API | Description |
++=======================================+===============+===========================================================+
+| test_create_stack | 1 | Tests the heat_utils.create_stack() with a test template |
++---------------------------------------+---------------+-----------------------------------------------------------+
+
diff --git a/docs/how-to-use/IntegrationTests.rst b/docs/how-to-use/IntegrationTests.rst
index ec549cf..37ef125 100644
--- a/docs/how-to-use/IntegrationTests.rst
+++ b/docs/how-to-use/IntegrationTests.rst
@@ -16,6 +16,12 @@ create_security_group_tests.py - CreateSecurityGroupTests
| test_create_group_without_rules | Keysone 2 & 3 | Ensures the OpenStackSecurityGroup class can create a |
| | Neutron 2 | security group without any rules |
+---------------------------------------+---------------+-----------------------------------------------------------+
+| test_create_group_admin_user_to_new | Keysone 2 & 3 | Ensures the OpenStackSecurityGroup class can be created |
+| _project | Neutron 2 | by the admin user and associated with a new project |
++---------------------------------------+---------------+-----------------------------------------------------------+
+| test_create_group_new_user_to_admin | Keysone 2 & 3 | Ensures the OpenStackSecurityGroup class can be created |
+| _project | Neutron 2 | by the new user and associated with the admin project |
++---------------------------------------+---------------+-----------------------------------------------------------+
| test_create_delete_group | Keysone 2 & 3 | Ensures the OpenStackSecurityGroup class clean() method |
| | Neutron 2 | will not raise an exception should the group be deleted by|
| | | some other process |
@@ -43,20 +49,23 @@ create_image_tests.py - CreateImageSuccessTests
+---------------------------------------+---------------+-----------------------------------------------------------+
| Test Name | Glance API | Description |
+=======================================+===============+===========================================================+
-| test_create_image_clean_url | 1 | Ensures the OpenStackImage class can create an image from |
+| test_create_image_clean_url | 1 & 2 | Ensures the OpenStackImage class can create an image from |
| | | a download URL location |
+---------------------------------------+---------------+-----------------------------------------------------------+
-| test_create_image_clean_file | 1 | Ensures the OpenStackImage class can create an image from |
+| test_create_image_clean_url_properties| 1 & 2 | Ensures the OpenStackImage class can create an image from |
+| | | a download URL location with custom properties |
++---------------------------------------+---------------+-----------------------------------------------------------+
+| test_create_image_clean_file | 1 & 2 | Ensures the OpenStackImage class can create an image from |
| | | a locally sourced image file |
+---------------------------------------+---------------+-----------------------------------------------------------+
-| test_create_delete_image | 1 | Ensures the OpenStackImage.clean() method deletes an image|
+| test_create_delete_image | 1 & 2 | Ensures the OpenStackImage.clean() method deletes an image|
| | | and does not raise an exception on subsequent calls to the|
| | | clean() method |
+---------------------------------------+---------------+-----------------------------------------------------------+
-| test_create_same_image | 1 | Ensures the OpenStackImage.create() method does not create|
+| test_create_same_image | 1 & 2 | Ensures the OpenStackImage.create() method does not create|
| | | another image when one already exists with the same name |
+---------------------------------------+---------------+-----------------------------------------------------------+
-| test_create_same_image_new_settings | 1 | Tests the creation of an OpenStack image when the image |
+| test_create_same_image_new_settings | 1 & 2 | Tests the creation of an OpenStack image when the image |
| | | already exists and the configuration only contains the |
| | | the name. |
+---------------------------------------+---------------+-----------------------------------------------------------+
@@ -67,14 +76,17 @@ create_image_tests.py - CreateImageNegativeTests
+---------------------------------------+---------------+-----------------------------------------------------------+
| Test Name | Glance API | Description |
+=======================================+===============+===========================================================+
-| test_bad_image_name | 1 | Ensures OpenStackImage.create() results in an Exception |
+| test_bad_image_name | 1 & 2 | Ensures OpenStackImage.create() results in an Exception |
| | | being raised when the ImageSettings.name attribute has |
| | | not been set |
+---------------------------------------+---------------+-----------------------------------------------------------+
-| test_bad_image_url | 1 | Ensures OpenStackImage.create() results in an Exception |
+| test_bad_image_url | 1 & 2 | Ensures OpenStackImage.create() results in an Exception |
| | | being raised when the download URL is invalid |
+---------------------------------------+---------------+-----------------------------------------------------------+
-| test_bad_image_file | 1 | Ensures OpenStackImage.create() results in an Exception |
+| test_bad_image_type | 1 & 2 | Ensures OpenStackImage.create() results in an Exception |
+| | | being raised when the image format is 'foo' |
++---------------------------------------+---------------+-----------------------------------------------------------+
+| test_bad_image_file | 1 & 2 | Ensures OpenStackImage.create() results in an Exception |
| | | being raised when the image file does not exist |
+---------------------------------------+---------------+-----------------------------------------------------------+
@@ -84,11 +96,14 @@ create_image_tests.py - CreateMultiPartImageTests
+----------------------------------------+---------------+-----------------------------------------------------------+
| Test Name | Glance API | Description |
+========================================+===============+===========================================================+
-| test_create_three_part_image_from_url | 1 | Ensures that a 3-part image can be created when each part |
+| test_create_three_part_image_from_url | 1 & 2 | Ensures that a 3-part image can be created when each part |
| | | is being sourced from URLs |
+----------------------------------------+---------------+-----------------------------------------------------------+
-| test_create_three_part_image_from_file | 1 | Ensures that a 3-part image can be created when each part |
-| | | is being sourced from local files |
+| test_create_three_part_image_from_file | 1 & 2 | Ensures that a 3-part image can be created when each part |
+| _3_creators | | is being sourced from local files and 3 creators are used |
++----------------------------------------+---------------+-----------------------------------------------------------+
+| test_create_three_part_image_from_url | 1 & 2 | Ensures that a 3-part image can be created when each part |
+| _3_creators | | is being sourced from a URL and 3 creators are used |
+----------------------------------------+---------------+-----------------------------------------------------------+
create_keypairs_tests.py - CreateKeypairsTests
@@ -132,6 +147,14 @@ create_network_tests.py - CreateNetworkSuccessTests
| test_create_networks_same_name | 2 | Ensures that the OpenStackNetwork.create() method will not|
| | | create a network with the same name |
+---------------------------------------+---------------+-----------------------------------------------------------+
+| test_create_networks_router_admin_user| 2 | Ensures that the networks, subnets, and routers can be |
+| _to_new_project | | create created by an admin user and assigned to a new |
+| | | project ID |
++---------------------------------------+---------------+-----------------------------------------------------------+
+| test_create_networks_router_new_user | 2 | Ensures that the networks, subnets, and routers can be |
+| _to_admin_project | | create created by a new admin user and assigned to the |
+| | | 'admin' project ID |
++---------------------------------------+---------------+-----------------------------------------------------------+
create_router_tests.py - CreateRouterSuccessTests
-------------------------------------------------
@@ -142,6 +165,12 @@ create_router_tests.py - CreateRouterSuccessTests
| test_create_router_vanilla | 2 | Ensures that a router can be created via the |
| | | OpenStackRouter class with minimal settings |
+---------------------------------------+---------------+-----------------------------------------------------------+
+| test_create_router_admin_user_to_new | 2 | Ensures that a router can be created by an admin user and |
+| _project | | assigned to a new project |
++---------------------------------------+---------------+-----------------------------------------------------------+
+| test_create_router_new_user_to_admin | 2 | Ensures that a router can be created by a new user and |
+| _project | | assigned to the admin project |
++---------------------------------------+---------------+-----------------------------------------------------------+
| test_create_delete_router | 2 | Ensures that a router can be deleted via the |
| | | OpenStackRouter.clean() method |
+---------------------------------------+---------------+-----------------------------------------------------------+
@@ -171,6 +200,38 @@ create_router_tests.py - CreateRouterNegativeTests
| | | create a router to an external network that does not exist|
+----------------------------------------+---------------+-----------------------------------------------------------+
+create_stack_tests.py - CreateStackSuccessTests
+-----------------------------------------------
+
++---------------------------------------+---------------+-----------------------------------------------------------+
+| Test Name | Neutron API | Description |
++=======================================+===============+===========================================================+
+| test_create_stack_template_file | 2 | Ensures that a Heat stack can be created with a file-based|
+| | | Heat template file |
++---------------------------------------+---------------+-----------------------------------------------------------+
+| test_create_stack_template_dict | 2 | Ensures that a Heat stack can be created with a dictionary|
+| | | Heat template |
++---------------------------------------+---------------+-----------------------------------------------------------+
+| test_create_delete_stack | 2 | Ensures that a Heat stack can be created and deleted |
+| | | while having clean() called 2x without an exception |
++---------------------------------------+---------------+-----------------------------------------------------------+
+| test_create_same_stack | 2 | Ensures that a Heat stack with the same name cannot be |
+| | | created 2x |
++---------------------------------------+---------------+-----------------------------------------------------------+
+
+create_stack_tests.py - CreateStackNegativeTests
+--------------------------------------------------
+
++----------------------------------------+---------------+-----------------------------------------------------------+
+| Test Name | Neutron API | Description |
++========================================+===============+===========================================================+
+| test_missing_dependencies | 2 | Ensures that a Heat template fails to deploy when expected|
+| | | dependencies are missing |
++----------------------------------------+---------------+-----------------------------------------------------------+
+| test_bad_stack_file | 2 | Ensures that a Heat template fails to deploy when the Heat|
+| | | template file does not exist |
++----------------------------------------+---------------+-----------------------------------------------------------+
+
create_instance_tests.py - CreateInstanceSimpleTests
----------------------------------------------------
diff --git a/docs/how-to-use/LibraryUsage.rst b/docs/how-to-use/LibraryUsage.rst
index 9efb26f..0a137ba 100644
--- a/docs/how-to-use/LibraryUsage.rst
+++ b/docs/how-to-use/LibraryUsage.rst
@@ -34,12 +34,17 @@ attributes are listed below:
- image\_api\_version (Glance version 1 currently only validated)
- network\_api\_version (Neutron version 2 currently only validated)
- compute\_api\_version (Nova version 2 currently only validated)
+- heat\_api\_version (Heat version 1 currently only validated)
- user\_domain\_id (default='default')
- project\_domain\_id (default='default')
+- interface (default='admin', used to specify the endpoint type for keystone: public, admin, internal)
+- cacert (default=False, expected values T|F to denote server certificate verification, else value contains the path to an HTTPS certificate)
- proxy\_settings
- host (the HTTP proxy host)
- port (the HTTP proxy port)
+ - https\_host (the HTTPS proxy host, default value of host)
+ - https\_port (the HTTPS proxy port, default value of port)
- ssh\_proxy\_cmd (same as the value placed into ssh -o
ProxyCommand='<this config value>')
diff --git a/docs/how-to-use/Testing.rst b/docs/how-to-use/Testing.rst
index af66c28..92340ab 100644
--- a/docs/how-to-use/Testing.rst
+++ b/docs/how-to-use/Testing.rst
@@ -17,6 +17,7 @@ Execute the tests
| \* -s [optional - the proxy command used for SSH connections]
| \* -l [(default INFO) The log level]
| \* -u [optional - When set, the unit tests will be executed]
+| \* -st [optional - When set, the staging tests will be executed]
| \* -c [optional - When set, the connection tests will be executed]
| \* -a [optional - When set, the API tests will be executed]
| \* -i [optional - When set, the integration tests will be executed]
@@ -24,5 +25,7 @@ Execute the tests
if host running tests has access to the cloud's admin network]
| \* -f [optional - When set, will execute tests requiring Floating
IPS]
+| \* -im [optional - File containing image endpoints to override
| \* -fm [optional - JSON string containing a dict() for flavor metadata default='{\"hw:mem_page_size\": \"any\"}']
+| \* -ci [optional - runs the tests required by SNAPS-OO CI]
| \* -r [optional with default value of '1' - The number of test iterations to execute]
diff --git a/docs/how-to-use/UnitTests.rst b/docs/how-to-use/UnitTests.rst
index efd6426..9da89be 100644
--- a/docs/how-to-use/UnitTests.rst
+++ b/docs/how-to-use/UnitTests.rst
@@ -24,68 +24,194 @@ FileUtilsTests
- testReadOSEnvFile - ensures that an OpenStack RC file can be properly
parsed
+ProxySettingsUnitTests
+----------------------
+
+Ensures that all required members are included when constructing a
+ProxySettings object
+
+OSCredsUnitTests
+----------------
+
+Ensures that all required members are included when constructing a
+OSCreds object
+
SecurityGroupRuleSettingsUnitTests
----------------------------------
Ensures that all required members are included when constructing a
SecurityGroupRuleSettings object
+SecurityGroupRuleDomainObjectTests
+----------------------------------
+
+Ensures that all required members are included when constructing a
+SecurityGroupRule domain object
+
SecurityGroupSettingsUnitTests
------------------------------
Ensures that all required members are included when constructing a
SecuirtyGroupSettings object
+SecurityGroupDomainObjectTests
+------------------------------
+
+Ensures that all required members are included when constructing a
+SecurityGroup domain object
+
ImageSettingsUnitTests
----------------------
Ensures that all required members are included when constructing a
ImageSettings object
+ImageDomainObjectTests
+----------------------
+
+Ensures that all required members are included when constructing a
+Image domain object
+
+FlavorSettingsUnitTests
+-----------------------
+
+Ensures that all required members are included when constructing a
+FlavorSettings object
+
+FlavorDomainObjectTests
+-----------------------
+
+Ensures that all required members are included when constructing a
+Flavor domain object
+
KeypairSettingsUnitTests
------------------------
Ensures that all required members are included when constructing a
KeypairSettings object
+KeypairDomainObjectTests
+------------------------
+
+Ensures that all required members are included when constructing a
+Keypair domain object
+
UserSettingsUnitTests
---------------------
Ensures that all required members are included when constructing a
UserSettings object
+UserDomainObjectTests
+---------------------
+
+Ensures that all required members are included when constructing a
+User domain object
+
ProjectSettingsUnitTests
------------------------
Ensures that all required members are included when constructing a
ProjectSettings object
+ProjectDomainObjectTests
+------------------------
+
+Ensures that all required members are included when constructing a
+Project domain object
+
+RoleDomainObjectTests
+---------------------
+
+Ensures that all required members are included when constructing a
+Role domain object
+
NetworkSettingsUnitTests
------------------------
Ensures that all required members are included when constructing a
NetworkSettings object
+NetworkObjectTests
+------------------
+
+Ensures that all required members are included when constructing a
+Network domain object
+
SubnetSettingsUnitTests
-----------------------
Ensures that all required members are included when constructing a
SubnetSettings object
+SubnetObjectTests
+-----------------
+
+Ensures that all required members are included when constructing a
+Subnet domain object
+
PortSettingsUnitTests
---------------------
Ensures that all required members are included when constructing a
PortSettings object
+PortDomainObjectTests
+---------------------
+
+Ensures that all required members are included when constructing a
+Port domain object
+
+RouterSettingsUnitTests
+-----------------------
+
+Ensures that all required members are included when constructing a
+RouterSettings object
+
+RouterDomainObjectTests
+-----------------------
+
+Ensures that all required members are included when constructing a
+Router domain object
+
+InterfaceRouterDomainObjectTests
+--------------------------------
+
+Ensures that all required members are included when constructing a
+InterfaceRouter domain object
+
+StackSettingsUnitTests
+----------------------
+
+Ensures that all required members are included when constructing a
+StackSettings object
+
+StackDomainObjectTests
+----------------------
+
+Ensures that all required members are included when constructing a
+Stack domain object
+
FloatingIpSettingsUnitTests
---------------------------
Ensures that all required members are included when constructing a
FloatingIpSettings object
+FloatingIpDomainObjectTests
+---------------------------
+
+Ensures that all required members are included when constructing a
+FloatingIp domain object
+
VmInstanceSettingsUnitTests
---------------------------
Ensures that all required members are included when constructing a
VmInstanceSettings object
+
+VmInstDomainObjectTests
+-----------------------
+
+Ensures that all required members are included when constructing a
+VmInst domain object