summaryrefslogtreecommitdiff
path: root/openstack_dashboard/test/integration_tests/tests/test_stacks.py
diff options
context:
space:
mode:
Diffstat (limited to 'openstack_dashboard/test/integration_tests/tests/test_stacks.py')
-rw-r--r--openstack_dashboard/test/integration_tests/tests/test_stacks.py73
1 files changed, 0 insertions, 73 deletions
diff --git a/openstack_dashboard/test/integration_tests/tests/test_stacks.py b/openstack_dashboard/test/integration_tests/tests/test_stacks.py
deleted file mode 100644
index 7c9ff95..0000000
--- a/openstack_dashboard/test/integration_tests/tests/test_stacks.py
+++ /dev/null
@@ -1,73 +0,0 @@
1# Licensed under the Apache License, Version 2.0 (the "License"); you may
2# not use this file except in compliance with the License. You may obtain
3# a copy of the License at
4#
5# http://www.apache.org/licenses/LICENSE-2.0
6#
7# Unless required by applicable law or agreed to in writing, software
8# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10# License for the specific language governing permissions and limitations
11# under the License.
12import os
13
14from openstack_dashboard.test.integration_tests import decorators
15from openstack_dashboard.test.integration_tests import helpers
16from openstack_dashboard.test.integration_tests.regions import messages
17
18
19class TestStacks(helpers.AdminTestCase):
20 KEYPAIR_NAME = 'keypair_for_stack'
21 STACKS_NAME = helpers.gen_random_resource_name('stack', timestamp=False)
22 STACK_TEMPLATE_PATH = os.path.join(
23 os.path.dirname(__file__), 'test-data/stack_template')
24
25 def setUp(self):
26 super(TestStacks, self).setUp()
27 keypair_page = self.home_pg.\
28 go_to_compute_accessandsecurity_keypairspage()
29 keypair_page.create_keypair(self.KEYPAIR_NAME)
30 keypair_page = self.home_pg.\
31 go_to_compute_accessandsecurity_keypairspage()
32 self.assertTrue(keypair_page.is_keypair_present(self.KEYPAIR_NAME))
33
34 def cleanup():
35 keypair_page = self.home_pg.\
36 go_to_compute_accessandsecurity_keypairspage()
37 keypair_page.delete_keypairs(self.KEYPAIR_NAME)
38 keypair_page.find_message_and_dismiss(messages.SUCCESS)
39
40 self.addCleanup(cleanup)
41
42 @decorators.skip_because(bugs=['1584057'])
43 @decorators.services_required("heat")
44 def test_create_delete_stack(self):
45 """tests the stack creation and deletion functionality
46
47 * creates a new stack
48 * verifies the stack appears in the stacks table in Create Complete
49 state
50 * deletes the newly created stack
51 * verifies the stack does not appear in the table after deletion
52 """
53 with open(self.STACK_TEMPLATE_PATH, 'r') as f:
54 template = f.read()
55 input_template = template.format(self.KEYPAIR_NAME,
56 self.CONFIG.image.images_list[0],
57 "public")
58 stacks_page = self.home_pg.go_to_orchestration_stackspage()
59
60 stacks_page.create_stack(self.STACKS_NAME, input_template)
61 self.assertTrue(
62 stacks_page.find_message_and_dismiss(messages.INFO))
63 self.assertFalse(
64 stacks_page.find_message_and_dismiss(messages.ERROR))
65 self.assertTrue(stacks_page.is_stack_present(self.STACKS_NAME))
66 self.assertTrue(stacks_page.is_stack_create_complete(self.STACKS_NAME))
67
68 stacks_page.delete_stack(self.STACKS_NAME)
69 self.assertTrue(
70 stacks_page.find_message_and_dismiss(messages.SUCCESS))
71 self.assertFalse(
72 stacks_page.find_message_and_dismiss(messages.ERROR))
73 self.assertTrue(stacks_page.is_stack_deleted(self.STACKS_NAME))