88269b5d56
This change allows the test runner to be executed everywhere without having a .testr.conf file. A copy of .testr.conf file (which is now properly released and installed) is copied to the test directory, which is now used as working directory for the ostestr call. The path to the directory where the execution has been started is now passed to the test template, so that the code can write there data like the test reports, the key (if the resources are kept), etc. Change-Id: I16ddba2ad6e26381ffc4b447666f38f2a7740ecb
26 lines
781 B
Mako
26 lines
781 B
Mako
from sahara_tests.scenario import base
|
|
|
|
% for testcase in testcases:
|
|
${make_testcase(testcase)}
|
|
% endfor
|
|
|
|
<%def name="make_testcase(testcase)">
|
|
class ${testcase['class_name']}TestCase(base.BaseTestCase):
|
|
@classmethod
|
|
def setUpClass(cls):
|
|
super(${testcase['class_name']}TestCase, cls).setUpClass()
|
|
cls.credentials = ${credentials}
|
|
cls.network = ${network}
|
|
cls.testcase = ${testcase}
|
|
cls.report = ${report}
|
|
cls.results_dir = '${results_dir}'
|
|
cls.default_templ_dir = '${default_templ_dir}'
|
|
|
|
def test_plugin(self):
|
|
self.create_cluster()
|
|
% for check in testcase['scenario']:
|
|
from sahara_tests.scenario.custom_checks import check_${check}
|
|
check_${check}.check(self)
|
|
% endfor
|
|
</%def>
|
|
|