From bd2bfaa514cfc6769b74bd0c213c58bcc1eef6ea Mon Sep 17 00:00:00 2001 From: rabi Date: Mon, 12 Mar 2018 07:52:33 +0530 Subject: Add files-container option for stack create and update If files-container option is specified: - All template/env files would be fetched by the heat engine relative to the files_container and no local files other than the root template would be sent to server. - Relative path of environment files would be sent in the environment_files list. Also adds the option to template validate. Change-Id: I1a703ab8798a003365be650886bb78be5af472b7 Story: #1755453 Task: 19319 --- heatclient/tests/unit/test_template_utils.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'heatclient/tests') diff --git a/heatclient/tests/unit/test_template_utils.py b/heatclient/tests/unit/test_template_utils.py index e4303c6..81ef955 100644 --- a/heatclient/tests/unit/test_template_utils.py +++ b/heatclient/tests/unit/test_template_utils.py @@ -127,6 +127,18 @@ class ShellEnvironmentTest(testtools.TestCase): mock.call('file:///home/my/dir/a.yaml') ]) + def test_process_multiple_environment_files_container(self): + + env_list_tracker = [] + env_paths = ['/home/my/dir/env.yaml'] + files, env = template_utils.process_multiple_environments_and_files( + env_paths, env_list_tracker=env_list_tracker, + fetch_env_files=False) + + self.assertEqual(env_paths, env_list_tracker) + self.assertEqual({}, files) + self.assertEqual({}, env) + @mock.patch('six.moves.urllib.request.urlopen') def test_process_environment_relative_file_up(self, mock_url): -- cgit v1.2.1