Fixes LP Bug#899383 - Cleanup config file search
Cleans up a bunch of configuration-related errors
when trying to run tempest out of the box with a
simple call to:
$> nosetests storm
* Raises a sensible error if the config file cannot be found
* Makes it possible to set the config file directory and
config file name via environment variables
* Removes unnecessary calls to create storm.config.StormConfig()
and share a configuration object by passing the openstack.Manager's
config object with the various rest client objects
* Updates the README to show how to make a config file and run
the tests in tempest
Change-Id: I60e33595b88df596cc9585bcaf18d37ae77d6f2b
diff --git a/storm/tests/test_images.py b/storm/tests/test_images.py
index 635dc62..e1349b7 100644
--- a/storm/tests/test_images.py
+++ b/storm/tests/test_images.py
@@ -4,18 +4,21 @@
import unittest2 as unittest
import storm.config
+# Some module-level skip conditions
+create_image_enabled = False
+
class ImagesTest(unittest.TestCase):
- create_image_enabled = storm.config.StormConfig().env.create_image_enabled
@classmethod
def setUpClass(cls):
cls.os = openstack.Manager()
cls.client = cls.os.images_client
cls.servers_client = cls.os.servers_client
- cls.config = storm.config.StormConfig()
+ cls.config = cls.os.config
cls.image_ref = cls.config.env.image_ref
cls.flavor_ref = cls.config.env.flavor_ref
+ create_image_enabled = cls.config.env.create_image_enabled
def _parse_image_id(self, image_ref):
temp = image_ref.rsplit('/')