]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
Add test for config substitution
authorZack Cerza <zack@cerza.org>
Wed, 9 Jul 2014 17:36:57 +0000 (11:36 -0600)
committerZack Cerza <zack@cerza.org>
Thu, 10 Jul 2014 22:35:36 +0000 (16:35 -0600)
Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
teuthology/test/test_suite.py

index 0a9fb5e08ed4df5be55072dd6694ce2702805b09..b92ec1566865bb2ecee26bd1fa20db87cda2fa16 100644 (file)
@@ -1,5 +1,6 @@
 import os
 import requests
+import yaml
 from datetime import datetime
 from pytest import raises, skip
 
@@ -72,6 +73,15 @@ class TestSuiteOnline(object):
             suite.create_initial_config('s', 'bogus_ceph_branch', 't', 'k',
                                         'f', 'd', 'm')
 
+    def test_config_substitution(self):
+        # Don't attempt to send email
+        config.results_email = None
+        job_config_str = suite.create_initial_config('MY_SUITE', 'master',
+                                                     'master', 'testing',
+                                                     'basic', 'centos',
+                                                     'plana')
+        job_config = yaml.safe_load(job_config_str)
+        assert job_config['suite'] == 'MY_SUITE'
+
 
-# add other tests that use create_initial_config, deserialize the yaml stream
 # maybe use notario for the above?