Break up Turbo-Hipster configuration
Seeing as the power of Turbo-Hipster is in its pluggable design,
this change allows the configuration to be spit up allowing
each plug in to maintain it's own part of the configuration
including overwriting any default configuration.
There is a new configuration parameter 'conf_d', which is
mapped to a directory:
"conf_d": "/etc/turbo-hipster/conf.d"
worker_server.py grabs all files inside this directory and
attempts to load them. If it fails, the error is logged.
The motivating factor for this change for me, is that it allows
the deployment of turbo-hipster via puppet much simpler.
The base TH puppet class will create the config.json, whereas
there puppet TH plug in classes can pop extra configuration into
the conf_d directory.
Change-Id: Ied20b46d4caa642d130097f3fe019df9c0ec5851
diff --git a/tests/test_worker_manager.py b/tests/test_worker_manager.py
index eefbcbe..ae2d5b5 100644
--- a/tests/test_worker_manager.py
+++ b/tests/test_worker_manager.py
@@ -15,16 +15,16 @@
# under the License.
-import json
import os
import testtools
import time
+import yaml
from fakes import FakeZuulManager, FakeGearmanServer,\
FakeRealDbUpgradeRunner
CONFIG_DIR = os.path.join(os.path.dirname(__file__), 'etc')
-with open(os.path.join(CONFIG_DIR, 'config.json'), 'r') as config_stream:
- CONFIG = json.load(config_stream)
+with open(os.path.join(CONFIG_DIR, 'config.yaml'), 'r') as config_stream:
+ CONFIG = yaml.safe_load(config_stream)
class TestZuulManager(testtools.TestCase):