From 4c142226db85c89c5459737715223b7be30bd17e Mon Sep 17 00:00:00 2001 From: Cédric Ollivier Date: Tue, 14 Feb 2017 11:16:22 +0100 Subject: Limit the substitution of ' in env vars MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Only ' located and the beginning or at the end of the string are removed. It completes the first proposal [1]. [1] https://gerrit.opnfv.org/gerrit/#/c/28563/ Change-Id: Ic21cea4c6e98d92983f385c875c3e214411b5f2d Signed-off-by: Cédric Ollivier --- functest/tests/unit/utils/test_openstack_utils.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'functest/tests') diff --git a/functest/tests/unit/utils/test_openstack_utils.py b/functest/tests/unit/utils/test_openstack_utils.py index 0971b4e82..447271fc6 100644 --- a/functest/tests/unit/utils/test_openstack_utils.py +++ b/functest/tests/unit/utils/test_openstack_utils.py @@ -379,6 +379,9 @@ class OSUtilsTesting(unittest.TestCase): self._test_source_credentials('export OS_TENANT_NAME = "admin"') self._test_source_credentials('OS_TENANT_NAME', value='') self._test_source_credentials('export OS_TENANT_NAME', value='') + # This test will fail as soon as rc_file is fixed + self._test_source_credentials( + 'export "\'OS_TENANT_NAME\'" = "\'admin\'"') @mock.patch('functest.utils.openstack_utils.os.getenv', return_value=None) -- cgit 1.2.3-korg