summaryrefslogtreecommitdiffstats
path: root/snaps/custom_image_test_runner.py
diff options
context:
space:
mode:
authorspisarski <s.pisarski@cablelabs.com>2017-06-07 14:56:00 -0600
committerspisarski <s.pisarski@cablelabs.com>2017-06-07 14:56:00 -0600
commit95d35a166fc66944fb0fc6091f4b84568aef0e7d (patch)
tree5ad804fe917c7c7a2bcf99ad285159ea0f29d015 /snaps/custom_image_test_runner.py
parentc8212122569c2dbf6290b43a0fbde0171c2ffdc5 (diff)
Removed current working directory logic retrieving test file resources.
Some of the SNAPS tests leverage file resources contained within the project. These resources were being accessed via relative paths which required the test clients to ensure that the CWD was the <repo>/snaps directory. Replaced that logic to leverage the import pkg_resources making the tests much more flexible and robust. JIRA: SNAPS-89 Change-Id: Ic9c429ee53e4dd785641e11e1ed4de5aeeab54d1 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
Diffstat (limited to 'snaps/custom_image_test_runner.py')
-rw-r--r--snaps/custom_image_test_runner.py4
1 files changed, 0 insertions, 4 deletions
diff --git a/snaps/custom_image_test_runner.py b/snaps/custom_image_test_runner.py
index a3e3897..4b86bf6 100644
--- a/snaps/custom_image_test_runner.py
+++ b/snaps/custom_image_test_runner.py
@@ -14,7 +14,6 @@
# limitations under the License.
import argparse
import logging
-import os
import unittest
from snaps import test_suite_builder
@@ -48,9 +47,6 @@ def __run_tests(source_filename, ext_net_name, proxy_settings, ssh_proxy_cmd, us
"""
os_creds = openstack_tests.get_credentials(os_env_file=source_filename, proxy_settings_str=proxy_settings,
ssh_proxy_cmd=ssh_proxy_cmd)
- # To ensure any files referenced via a relative path will begin from the diectory in which this file resides
- os.chdir(os.path.dirname(os.path.realpath(__file__)))
-
image_creators = __create_images(os_creds)
meta_list = list()