From febc4eee83bd6a35c7622115d803759cdaff77b8 Mon Sep 17 00:00:00 2001 From: Marc Koderer Date: Thu, 20 Mar 2014 08:24:38 +0100 Subject: [PATCH] Add error handling if testscenarios aren't supported If the test runner doesn't support the load_tests mechanism it's better to raise an proper exception. Change-Id: I3f5d4b2bc285874bbeabf8ddefec6c28fd2b9c91 Closes-Bug: #1293433 --- tempest/test.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tempest/test.py b/tempest/test.py index 75eb6be..d2568a6 100644 --- a/tempest/test.py +++ b/tempest/test.py @@ -510,6 +510,10 @@ class NegativeAutoTest(BaseTestCase): new_url, body = self._http_arguments(valid_schema, url, method) elif hasattr(self, "schema"): new_url, body = self._http_arguments(self.schema, url, method) + else: + raise Exception("testscenarios are not active. Please make sure " + "that your test runner supports the load_tests " + "mechanism") if "admin_client" in description and description["admin_client"]: client = self.admin_client