Initial patch with all code from CableLabs repository.
[snaps.git] / docs / IntegrationTests.md
1 # SNAPS OpenStack Integration Testing
2
3 These tests are ones designed to be run within their own dynamically created project along with a newly generated user
4 account and generally require other OpenStack object creators.
5
6 # The Test Classes
7
8 ## create_security_group_tests.py - CreateSecurityGroupTests
9 | Test Name     | API Versions  | Description   |
10 |---    |:-:    |---    |
11 |test_create_group_without_rules|Keystone 2 & 3 Neutron 2|Ensures the OpenStackSecurityGroup class can create a security group without any rules|
12 |test_create_delete_group|Keystone 2 & 3 Neutron 2|Ensures the OpenStackSecurityGroup class clean() method will not raise an exception should the group be deleted by some other process|
13 |test_create_group_with_one_simple_rule|Keystone 2 & 3 Neutron 2|Ensures the OpenStackSecurityGroup class can create a security group with a single rule|
14 |test_create_group_with_several_rules|Keystone 2 & 3 Neutron 2|Ensures the OpenStackSecurityGroup class can create a security group with several rules|
15 |test_add_rule|Keystone 2 & 3 Neutron 2|Ensures the OpenStackSecurityGroup#add_rule() method properly creates and associates the new rule|
16 |test_remove_rule_by_id|Keystone 2 & 3 Neutron 2|Ensures the OpenStackSecurityGroup#remove_rule() method properly deletes and disassociates the old rule via its ID|
17 |test_remove_rule_by_setting|Keystone 2 & 3 Neutron 2|Ensures the OpenStackSecurityGroup#remove_rule() method properly deletes and disassociates the old rule via its setting object|
18
19 ## create_image_tests.py - CreateImageSuccessTests
20 | Test Name     | API Versions  | Description   |
21 |---    |:-:    |---    |
22 |test_create_image_clean_url|Glance 1|Ensures the OpenStackImage class can create an image from a download URL location|
23 |test_create_image_clean_file|Glance 1|Ensures the OpenStackImage class can create an image from a locally sourced image file|
24 |test_create_delete_image|Glance 1|Ensures the OpenStackImage.clean() method deletes an image and does not raise an exception on subsequent calls to the clean() method|
25 |test_create_same_image|Glance 1|Ensures the OpenStackImage.create() method does not create another image when one already exists with the same name|
26
27 ## create_image_tests.py - CreateImageNegativeTests
28 | Test Name     | Glance API Version    | Description   |
29 |---    |:-:    |---    |
30 |test_none_image_name|1|Ensures OpenStackImage.create() results in an Exception being raised when the ImageSettings.name attribute has not been set|
31 |test_bad_image_url|1|Ensures OpenStackImage.create() results in an Exception being raised when the download URL is invalid|
32 |test_bad_image_file|1|Ensures OpenStackImage.create() results in an Exception being raised when the image file does not exist|
33 |test_none_proj_name|1|Ensures OpenStackImage.create() results in an Exception being raised when credentials project name is None|
34 |test_none_auth_url|1|Ensures OpenStackImage.create() results in an Exception being raised when credentials URL is None|
35 |test_none_password|1|Ensures OpenStackImage.create() results in an Exception being raised when credentials password is None|
36 |test_none_user|1|Ensures OpenStackImage.create() results in an Exception being raised when credentials user is None|
37
38 ## create_keypairs_tests.py - CreateKeypairsTests
39 | Test Name     | API Versions  | Description   |
40 |---    |:-:    |---    |
41 |test_create_keypair_only|Nova 2|Ensures that a keypair object can be created simply by only configuring a name|
42 |test_create_delete_keypair|Nova 2|Ensures that a keypair object is deleted via OpenStackKeypair.clean() and subsequent calls do not result in exceptions|
43 |test_create_keypair_save_pub_only|Nova 2|Ensures that a keypair object can be created when the only the public key is cached to disk|
44 |test_create_keypair_save_both|Nova 2|Ensures that a keypair object can be created when both the public and private keys are cached to disk|
45 |test_create_keypair_from_file|Nova 2|Ensures that a keypair object can be created with an existing public key file|
46
47 ## create_network_tests.py - CreateNetworkSuccessTests
48 | Test Name     | API Versions  | Description   |
49 |---    |:-:    |---    |
50 |test_create_network_without_router|Neutron 2|Ensures that a network can be created via the OpenStackNetwork class without any routers|
51 |test_create_delete_network|Neutron 2|Ensures that a router can be deleted via the OpenStackNetwork.clean() method|
52 |test_create_network_with_router|Neutron 2|Ensures that a network can be created via the OpenStackNetwork class with a router|
53 |test_create_networks_same_name|Neutron 2|Ensures that the OpenStackNetwork.create() method will not create a network with the same name|
54
55 ## create_router_tests.py - CreateRouterSuccessTests
56 | Test Name     | API Versions  | Description   |
57 |---    |:-:    |---    |
58 |test_create_router_vanilla|Neutron 2|Ensures that a router can be created via the OpenStackRouter class with minimal settings|
59 |test_create_delete_router|Neutron 2|Ensures that a router can be deleted via the OpenStackRouter.clean() method|
60 |test_create_router_admin_state_false|Neutron 2|Ensures that a router can created with admin_state_up = False|
61 |test_create_router_admin_state_True|Neutron 2|Ensures that a router can created with admin_state_up = True|
62 |test_create_router_private_network|Neutron 2|Ensures that a router port can be created against a private network|
63 |test_create_router_external_network|Neutron 2|Ensures that a router can be created that is connected to both external and private internal networks|
64
65 ## create_router_tests.py - CreateRouterNegativeTests
66 | Test Name     | API Versions  | Description   |
67 |---    |:-:    |---    |
68 |test_create_router_noname|Neutron 2|Ensures that an exception is raised when attempting to create a router without a name|
69 |test_create_router_invalid_gateway_name|Neutron 2|Ensures that an exception is raised when attempting to create a router to an external network that does not exist|
70
71 ## create_instance_tests.py - CreateInstanceSimpleTests
72 | Test Name     | API Versions  | Description   |
73 |---    |:-:    |---    |
74 |test_create_delete_instance|Nova and Neutron 2|Ensures that the OpenStackVmInstance.clean() method deletes the instance|
75
76 ## create_instance_tests.py - SimpleHealthCheck
77 | Test Name     | API Versions  | Description   |
78 |---    |:-:    |---    |
79 |test_check_vm_ip_dhcp|Nova and Neutron 2|Tests the creation of an OpenStack instance with a single port and it's assigned IP address|
80
81 ## create_instance_tests.py - CreateInstanceSingleNetworkTests
82 | Test Name     | API Versions  | Description   |
83 |---    |:-:    |---    |
84 |test_single_port_static|Nova and Neutron 2|Ensures that an instance with a single port/NIC with a static IP can be created|
85 |test_ssh_client_fip_before_active|Nova and Neutron 2|Ensures that an instance can be reached over SSH when the floating IP is assigned prior to the VM becoming ACTIVE|
86 |test_ssh_client_fip_after_active|Nova and Neutron 2|Ensures that an instance can be reached over SSH when the floating IP is assigned after to the VM becoming ACTIVE|
87
88 ## create_instance_tests.py - CreateInstancePortManipulationTests
89 | Test Name     | API Versions  | Description   |
90 |---    |:-:    |---    |
91 |test_set_custom_valid_ip_one_subnet|Nova and Neutron 2|Ensures that an instance's can have a valid static IP is properly assigned|
92 |test_set_custom_invalid_ip_one_subnet|Nova and Neutron 2|Ensures that an instance's port with an invalid static IP raises an exception|
93 |test_set_custom_valid_mac|Nova and Neutron 2|Ensures that an instance's port can have a valid MAC address properly assigned|
94 |test_set_custom_invalid_mac|Nova and Neutron 2|Ensures that an instance's port with an invalid MAC address raises and exception|
95 |test_set_custom_mac_and_ip|Nova and Neutron 2|Ensures that an instance's port with a valid static IP and MAC are properly assigned|
96 |test_set_allowed_address_pairs|Nova and Neutron 2|Ensures the configured allowed_address_pairs is properly set on a VMs port|
97 |test_set_allowed_address_pairs_bad_mac|Nova and Neutron 2|Ensures the port cannot be created when a bad MAC address format is used in the allowed_address_pairs port attribute|
98 |test_set_allowed_address_pairs_bad_ip|Nova and Neutron 2|Ensures the port cannot be created when a bad IP address format is used in the allowed_address_pairs port attribute|
99
100 ## create_instance_tests.py - CreateInstanceOnComputeHost
101 | Test Name     | API Versions  | Description   |
102 |---    |:-:    |---    |
103 |test_deploy_vm_to_each_compute_node|Nova and Neutron 2|Tests to ensure that one can fire up an instance on each active compute node|
104
105 ## create_instance_tests.py - CreateInstancePubPrivNetTests
106 | Test Name     | API Versions  | Description   |
107 |---    |:-:    |---    |
108 |test_dual_ports_dhcp|Nova and Neutron 2|Ensures that a VM with two ports/NICs can have its second NIC configured via SSH/Ansible after startup|
109
110 ## create_instance_tests.py - InstanceSecurityGroupTests
111 | Test Name     | API Versions  | Description   |
112 |---    |:-:    |---    |
113 |test_add_security_group|Nova and Neutron 2|Ensures that a VM instance can have security group added to it while its running|
114 |test_add_invalid_security_group|Nova and Neutron 2|Ensures that a VM instance does not accept the addition of a security group that no longer exists|
115 |test_remove_security_group|Nova and Neutron 2|Ensures that a VM instance accepts the removal of a security group|
116 |test_remove_security_group_never_added|Nova and Neutron 2|Ensures that a VM instance does not accept the removal of a security group that was never added in the first place|
117 |test_add_same_security_group|Nova and Neutron 2|Ensures that a VM instance does not add a security group that has already been added to the instance|
118
119 ## ansible_utils_tests.py - AnsibleProvisioningTests
120 | Test Name     | API Versions  | Description   |
121 |---    |:-:    |---    |
122 |test_apply_simple_playbook|Nova and Neutron 2|Ensures that an instance assigned with a floating IP will apply a simple Ansible playbook|
123 |test_apply_template_playbook|Nova and Neutron 2|Ensures that an instance assigned with a floating IP will apply a Ansible playbook containing Jinga2 substitution values|