From a66f891e1ece389ab5dab4abe63f52ce4661f346 Mon Sep 17 00:00:00 2001 From: Steve Baker Date: Fri, 19 Oct 2012 06:16:36 +1000 Subject: [PATCH] resolve test template file path no matter where it is run from --- tests/test_shell.py | 8 ++++++-- tests/{ => var}/minimal.template | 0 2 files changed, 6 insertions(+), 2 deletions(-) rename tests/{ => var}/minimal.template (100%) diff --git a/tests/test_shell.py b/tests/test_shell.py index 6defc89a..85f74d8d 100644 --- a/tests/test_shell.py +++ b/tests/test_shell.py @@ -17,6 +17,9 @@ from heatclient.v1 import client as v1client import heatclient.shell import fakes +TEST_VAR_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), + 'var')) + class ShellTest(unittest.TestCase): @@ -140,11 +143,12 @@ class ShellTest(unittest.TestCase): self.m.ReplayAll() + template_file = os.path.join(TEST_VAR_DIR, 'minimal.template') create_text = self.shell('create teststack ' - '--template-file=minimal.template ' + '--template-file=%s ' '--parameters="InstanceType=m1.large;DBUsername=wp;' 'DBPassword=verybadpassword;KeyName=heat_key;' - 'LinuxDistribution=F17"') + 'LinuxDistribution=F17"' % template_file) required = [ 'id', diff --git a/tests/minimal.template b/tests/var/minimal.template similarity index 100% rename from tests/minimal.template rename to tests/var/minimal.template