Merge "Allocation API: add tests on backfilling allocations"
diff --git a/ironic_tempest_plugin/config.py b/ironic_tempest_plugin/config.py
index 819051e..79b6d18 100644
--- a/ironic_tempest_plugin/config.py
+++ b/ironic_tempest_plugin/config.py
@@ -199,6 +199,5 @@
help="The driver to set on the newly discovered nodes. "
"Only has effect with auto_discovery_feature is True."),
cfg.StrOpt('data_store',
- default='swift',
help="The storage backend for storing introspection data."),
]
diff --git a/ironic_tempest_plugin/tests/scenario/test_introspection_basic.py b/ironic_tempest_plugin/tests/scenario/test_introspection_basic.py
index 6df1207..9823a88 100644
--- a/ironic_tempest_plugin/tests/scenario/test_introspection_basic.py
+++ b/ironic_tempest_plugin/tests/scenario/test_introspection_basic.py
@@ -94,7 +94,12 @@
for node_id in self.node_ids:
node = self.node_show(node_id)
self.assertEqual('yes', node['extra']['rule_success'])
- if CONF.baremetal_introspection.data_store != "none":
+ data_store = CONF.baremetal_introspection.data_store
+ if data_store is None:
+ # Backward compatibility, the option is not set.
+ data_store = ('swift' if CONF.service_available.swift
+ else 'none')
+ if data_store != 'none':
self.verify_node_introspection_data(node)
self.verify_node_flavor(node)
diff --git a/ironic_tempest_plugin/tests/scenario/test_introspection_discovery.py b/ironic_tempest_plugin/tests/scenario/test_introspection_discovery.py
index 846fcfd..6f92d43 100644
--- a/ironic_tempest_plugin/tests/scenario/test_introspection_discovery.py
+++ b/ironic_tempest_plugin/tests/scenario/test_introspection_discovery.py
@@ -156,7 +156,12 @@
inspected_node = self.node_show(self.node_info['name'])
self.verify_node_flavor(inspected_node)
- if CONF.baremetal_introspection.data_store != "none":
+ data_store = CONF.baremetal_introspection.data_store
+ if data_store is None:
+ # Backward compatibility, the option is not set.
+ data_store = ('swift' if CONF.service_available.swift
+ else 'none')
+ if data_store != 'none':
self.verify_node_introspection_data(inspected_node)
self.assertEqual(ProvisionStates.ENROLL,
inspected_node['provision_state'])
diff --git a/test-requirements.txt b/test-requirements.txt
index 698b5f9..b5667d2 100644
--- a/test-requirements.txt
+++ b/test-requirements.txt
@@ -4,7 +4,8 @@
hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0
-sphinx!=1.6.6,!=1.6.7,>=1.6.2 # BSD
+sphinx!=1.6.6,!=1.6.7,>=1.6.2,<2.0.0;python_version=='2.7' # BSD
+sphinx!=1.6.6,!=1.6.7,>=1.6.2;python_version>='3.4' # BSD
openstackdocstheme>=1.18.1 # Apache-2.0
reno>=2.5.0 # Apache-2.0