Change to use absolute path in load_template()
If we execute the tempest in other path other than the root path of
tempest, the case will failed because can't find the template files.
Change-Id: Ic585546270b2c6d7a42d3128d752217d8d4e3860
Closes-bug: 1300597
diff --git a/tempest/api/orchestration/base.py b/tempest/api/orchestration/base.py
index 1832259..250b407 100644
--- a/tempest/api/orchestration/base.py
+++ b/tempest/api/orchestration/base.py
@@ -101,9 +101,8 @@
@classmethod
def load_template(cls, name, ext='yaml'):
- loc = ["tempest", "api", "orchestration",
- "stacks", "templates", "%s.%s" % (name, ext)]
- fullpath = os.path.join(*loc)
+ loc = ["stacks", "templates", "%s.%s" % (name, ext)]
+ fullpath = os.path.join(os.path.dirname(__file__), *loc)
with open(fullpath, "r") as f:
content = f.read()