summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2017-03-28 08:54:16 +0000
committerGerrit Code Review <review@openstack.org>2017-03-28 08:54:16 +0000
commitad8c0de27e497abbedcd6149d1a6e3820d0cb765 (patch)
treed91e0a71ff507294b3e160e2da991d2215a33921
parent54dc1c3f6d4eb8dab6fd67cdee8a5350becea8ae (diff)
parent725480215ea05c6dbc247798ae7d072c216ec292 (diff)
Merge "Add test for "cluster actions as graphs""
-rw-r--r--fuelweb_test/tests/test_environment_action.py57
1 files changed, 57 insertions, 0 deletions
diff --git a/fuelweb_test/tests/test_environment_action.py b/fuelweb_test/tests/test_environment_action.py
index 85da9bd..06b4037 100644
--- a/fuelweb_test/tests/test_environment_action.py
+++ b/fuelweb_test/tests/test_environment_action.py
@@ -14,6 +14,7 @@
14 14
15from proboscis import asserts 15from proboscis import asserts
16from proboscis import test 16from proboscis import test
17
17from fuelweb_test.helpers.decorators import check_fuel_statistics 18from fuelweb_test.helpers.decorators import check_fuel_statistics
18from fuelweb_test.helpers.decorators import log_snapshot_after_test 19from fuelweb_test.helpers.decorators import log_snapshot_after_test
19from fuelweb_test import settings 20from fuelweb_test import settings
@@ -24,6 +25,62 @@ from fuelweb_test.tests import base_test_case
24class EnvironmentAction(base_test_case.TestBasic): 25class EnvironmentAction(base_test_case.TestBasic):
25 """EnvironmentAction.""" # TODO documentation 26 """EnvironmentAction.""" # TODO documentation
26 27
28 @test(depends_on=[base_test_case.SetupEnvironment.prepare_release],
29 groups=["check_deployment_actions_as_graph"])
30 @log_snapshot_after_test
31 def check_deployment_actions_as_graph(self):
32 """Check that all cluster actions are using graph engine
33
34 Scenario:
35
36 1. Revert snapshot "ready"
37 2. Get release ID
38 3. Get sequence list for this release
39 4. Get graphs from release sequence
40 5. Check that all graph actions are present in graph list
41 6. Ensure that there is no additional graphs
42
43 Duration: 1m
44 """
45
46 self.show_step(1)
47 self.env.revert_snapshot("ready")
48
49 self.show_step(self.next_step)
50 release_id = self.fuel_web.client.get_release_id(
51 release_name=settings.OPENSTACK_RELEASE_UBUNTU)
52
53 self.show_step(self.next_step)
54 admin_ip = self.env.get_admin_node_ip()
55 out = self.ssh_manager.check_call(
56 ip=admin_ip,
57 command="fuel2 sequence list -f json -r {}".format(release_id))
58 sequence_id = out.stdout_json[0]['id']
59
60 self.show_step(self.next_step)
61 out = self.ssh_manager.check_call(
62 ip=admin_ip,
63 command="fuel2 sequence show -f json {}".format(sequence_id))
64 sequence_graphs = set(out.stdout_json["graphs"].split(", "))
65
66 self.show_step(self.next_step)
67 # "default" graph is deployment graph itself - named that for backward
68 # compatibility
69 graphs_list = ["net-verification", "deletion", "provision", "default"]
70 for graph in graphs_list:
71 asserts.assert_true(
72 graph in sequence_graphs,
73 "Graph {!r} is not presented in sequence! {!r}".format(
74 graph, out.stdout_json))
75 sequence_graphs.remove(graph)
76
77 self.show_step(self.next_step)
78 asserts.assert_false(
79 sequence_graphs,
80 "New unexpected graphs were found in release sequence: {!r}!"
81 "Please check the results and update the test "
82 "if needed!".format(sequence_graphs))
83
27 @test(depends_on=[base_test_case.SetupEnvironment.prepare_slaves_3], 84 @test(depends_on=[base_test_case.SetupEnvironment.prepare_slaves_3],
28 groups=["smoke", "deploy_neutron_stop_reset_on_deploying", 85 groups=["smoke", "deploy_neutron_stop_reset_on_deploying",
29 "classic_provisioning"]) 86 "classic_provisioning"])