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_server_actions.py b/storm/tests/test_server_actions.py
index d6ff11c..d7c9db4 100644
--- a/storm/tests/test_server_actions.py
+++ b/storm/tests/test_server_actions.py
@@ -4,19 +4,21 @@
import storm.config
from storm.common.utils.data_utils import rand_name
+# Some module-level skip conditions
+resize_available = False
class ServerActionsTest(unittest.TestCase):
- resize_available = storm.config.StormConfig().env.resize_available
@classmethod
def setUpClass(cls):
cls.os = openstack.Manager()
cls.client = cls.os.servers_client
- cls.config = storm.config.StormConfig()
+ cls.config = cls.os.config
cls.image_ref = cls.config.env.image_ref
cls.image_ref_alt = cls.config.env.image_ref_alt
cls.flavor_ref = cls.config.env.flavor_ref
cls.flavor_ref_alt = cls.config.env.flavor_ref_alt
+ resize_available = cls.config.env.resize_available
def setUp(self):
self.name = rand_name('server')