From 40e2bbc6dd31b044aba6f4aa77a493f19e73fe54 Mon Sep 17 00:00:00 2001 From: ankit Date: Wed, 25 Oct 2017 11:37:02 +0000 Subject: [PATCH] Add py35 gate for ironic-inspector This patch adds py35 gate for ironic-inspector and also adds support for inspection in python3 environment by rolling out configuration of swift in inspector. Change-Id: I83429a1ba79208245f6c6e1f8b4eb8a16f014868 --- ironic_tempest_plugin/tests/test_basic.py | 7 ++++--- ironic_tempest_plugin/tests/test_discovery.py | 3 ++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/ironic_tempest_plugin/tests/test_basic.py b/ironic_tempest_plugin/tests/test_basic.py index 2dd316c0..a6087e3d 100644 --- a/ironic_tempest_plugin/tests/test_basic.py +++ b/ironic_tempest_plugin/tests/test_basic.py @@ -21,7 +21,6 @@ from ironic_inspector.test.inspector_tempest_plugin.tests import manager class InspectorBasicTest(manager.InspectorScenarioTest): def verify_node_introspection_data(self, node): - self.assertEqual('yes', node['extra']['rule_success']) data = self.introspection_data(node['uuid']) self.assertEqual(data['cpu_arch'], self.flavor['properties']['cpu_arch']) @@ -58,7 +57,7 @@ class InspectorBasicTest(manager.InspectorScenarioTest): interval=self.wait_provisioning_state_interval) @decorators.idempotent_id('03bf7990-bee0-4dd7-bf74-b97ad7b52a4b') - @utils.services('compute', 'image', 'network', 'object_storage') + @utils.services('compute', 'image', 'network') def test_baremetal_introspection(self): """This smoke test case follows this set of operations: @@ -93,7 +92,9 @@ class InspectorBasicTest(manager.InspectorScenarioTest): for node_id in self.node_ids: node = self.node_show(node_id) - self.verify_node_introspection_data(node) + self.assertEqual('yes', node['extra']['rule_success']) + if CONF.service_available.swift: + self.verify_node_introspection_data(node) self.verify_node_flavor(node) for node_id in self.node_ids: diff --git a/ironic_tempest_plugin/tests/test_discovery.py b/ironic_tempest_plugin/tests/test_discovery.py index 3880f608..f222810d 100644 --- a/ironic_tempest_plugin/tests/test_discovery.py +++ b/ironic_tempest_plugin/tests/test_discovery.py @@ -143,7 +143,8 @@ class InspectorDiscoveryTest(manager.InspectorScenarioTest): inspected_node = self.node_show(self.node_info['name']) self.verify_node_flavor(inspected_node) - self.verify_node_introspection_data(inspected_node) + if CONF.service_available.swift: + self.verify_node_introspection_data(inspected_node) self.verify_node_driver_info(self.node_info, inspected_node) self.assertEqual(ProvisionStates.ENROLL, inspected_node['provision_state'])