コード例 #1
0
def prepare(model_name):
    """Run all steps to prepare the environment before a functional test run.

    :param model: Name of model to add
    :type bundle: str
    """
    zaza.controller.add_model(model_name,
                              config=deployment_env.get_model_settings())
    zaza.model.set_model_constraints(
        model_name=model_name,
        constraints=deployment_env.get_model_constraints())
コード例 #2
0
def prepare(model_name, test_directory=None):
    """Run all steps to prepare the environment before a functional test run.

    :param model: Name of model to add
    :type bundle: str
    :param test_directory: Set the directory containing tests.yaml and bundles.
    :type test_directory: str
    """
    utils.set_base_test_dir(test_dir=test_directory)
    zaza.controller.add_model(model_name,
                              config=deployment_env.get_model_settings(),
                              region=deployment_env.get_cloud_region())
    zaza.model.set_model_constraints(
        model_name=model_name,
        constraints=deployment_env.get_model_constraints())
コード例 #3
0
ファイル: test_deployment_env.py プロジェクト: dshcherb/zaza
 def base_get_model_constraints(self, env, expect):
     with mock.patch.dict(deployment_env.os.environ, env):
         self.assertEqual(deployment_env.get_model_constraints(), expect)