Add param 'name' to the test definition
Change-Id: Idce966178ef835b493fce928dc6e6be516fc6552
This commit is contained in:
parent
f6fad04c59
commit
763b091565
@ -21,7 +21,7 @@ from tempest import test
|
||||
from mistral.tests.functional import base
|
||||
|
||||
|
||||
class WorkbooksTestsV1(base.TestCase):
|
||||
class WorkbookTestsV1(base.TestCase):
|
||||
|
||||
_version = 1
|
||||
|
||||
@ -112,12 +112,12 @@ class WorkbooksTestsV1(base.TestCase):
|
||||
self.assertEqual([], body['workbooks'])
|
||||
|
||||
|
||||
class ExecutionsTestsV1(base.TestCase):
|
||||
class ExecutionTestsV1(base.TestCase):
|
||||
|
||||
_version = 1
|
||||
|
||||
def setUp(self):
|
||||
super(ExecutionsTestsV1, self).setUp()
|
||||
super(ExecutionTestsV1, self).setUp()
|
||||
|
||||
self.client.create_workbook('test')
|
||||
self.client.upload_workbook_definition('test')
|
||||
@ -125,7 +125,7 @@ class ExecutionsTestsV1(base.TestCase):
|
||||
self.entity_name = 'test'
|
||||
|
||||
def tearDown(self):
|
||||
super(ExecutionsTestsV1, self).tearDown()
|
||||
super(ExecutionTestsV1, self).tearDown()
|
||||
|
||||
_, executions = self.client.get_list_obj('executions')
|
||||
for ex in executions['executions']:
|
||||
|
@ -18,22 +18,21 @@ from mistral.tests.functional.api.v1 import test_mistral_basic
|
||||
from mistral.tests.functional import base
|
||||
|
||||
|
||||
class WorkbooksTestsV2(test_mistral_basic.WorkbooksTestsV1):
|
||||
class WorkbookTestsV2(test_mistral_basic.WorkbookTestsV1):
|
||||
|
||||
_version = 2
|
||||
|
||||
|
||||
class WorkflowsTestsV2(base.TestCase):
|
||||
class WorkflowTestsV2(base.TestCase):
|
||||
|
||||
_version = 2
|
||||
|
||||
def tearDown(self):
|
||||
|
||||
_, wfs = self.client.get_list_obj('workflows')
|
||||
for wf in wfs['workflows']:
|
||||
self.client.delete_obj('workflows', wf['name'])
|
||||
|
||||
super(WorkflowsTestsV2, self).tearDown()
|
||||
super(WorkflowTestsV2, self).tearDown()
|
||||
|
||||
@test.attr(type='smoke')
|
||||
def test_get_list_workflows(self):
|
||||
@ -97,11 +96,12 @@ class WorkflowsTestsV2(base.TestCase):
|
||||
self.assertIsNotNone(body)
|
||||
|
||||
|
||||
class ExecutionsTestsV2(test_mistral_basic.ExecutionsTestsV1):
|
||||
class ExecutionTestsV2(test_mistral_basic.ExecutionTestsV1):
|
||||
|
||||
_version = 2
|
||||
|
||||
def setUp(self):
|
||||
super(ExecutionsTestsV2, self).setUp()
|
||||
super(ExecutionTestsV2, self).setUp()
|
||||
|
||||
self.entity_type = 'workflow_name'
|
||||
self.entity_name = 'test.test'
|
||||
|
@ -63,6 +63,7 @@ class MistralClientBase(rest_client.RestClient):
|
||||
msg = ("Invalid parameter 'version'. "
|
||||
"Use version=1 or version=2.")
|
||||
raise exceptions.UnprocessableEntity(msg)
|
||||
|
||||
self.endpoint_url = 'publicURL'
|
||||
|
||||
def get_list_obj(self, name):
|
||||
|
@ -1,5 +1,6 @@
|
||||
---
|
||||
version: "2.0"
|
||||
name: "test"
|
||||
|
||||
workflows:
|
||||
test:
|
||||
|
Loading…
Reference in New Issue
Block a user