Browse Source

Merge "Add test for "cluster actions as graphs""

Jenkins 2 years ago
parent
commit
ad8c0de27e
1 changed files with 57 additions and 0 deletions
  1. 57
    0
      fuelweb_test/tests/test_environment_action.py

+ 57
- 0
fuelweb_test/tests/test_environment_action.py View File

@@ -14,6 +14,7 @@
14 14
 
15 15
 from proboscis import asserts
16 16
 from proboscis import test
17
+
17 18
 from fuelweb_test.helpers.decorators import check_fuel_statistics
18 19
 from fuelweb_test.helpers.decorators import log_snapshot_after_test
19 20
 from fuelweb_test import settings
@@ -24,6 +25,62 @@ from fuelweb_test.tests import base_test_case
24 25
 class EnvironmentAction(base_test_case.TestBasic):
25 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 84
     @test(depends_on=[base_test_case.SetupEnvironment.prepare_slaves_3],
28 85
           groups=["smoke", "deploy_neutron_stop_reset_on_deploying",
29 86
                   "classic_provisioning"])

Loading…
Cancel
Save