Merge "Add keystone create_and_list_services scenario"
This commit is contained in:
commit
1cc98bcb49
@ -108,6 +108,16 @@
|
||||
failure_rate:
|
||||
max: 0
|
||||
|
||||
KeystoneBasic.create_and_list_services:
|
||||
-
|
||||
runner:
|
||||
type: "constant"
|
||||
times: 10
|
||||
concurrency: 5
|
||||
sla:
|
||||
failure_rate:
|
||||
max: 0
|
||||
|
||||
CeilometerAlarms.create_alarm:
|
||||
-
|
||||
args:
|
||||
|
@ -124,3 +124,16 @@ class KeystoneBasic(kutils.KeystoneScenario):
|
||||
"""
|
||||
service = self._service_create(name, service_type, description)
|
||||
self._delete_service(service.id)
|
||||
|
||||
@validation.required_openstack(admin=True)
|
||||
@base.scenario(context={"admin_cleanup": ["keystone"]})
|
||||
def create_and_list_services(self, name=None, service_type=None,
|
||||
description=None):
|
||||
"""Create and list services.
|
||||
|
||||
:param name: name of the service
|
||||
:param service_type: type of the service
|
||||
:param description: description of the service
|
||||
"""
|
||||
self._service_create(name, service_type, description)
|
||||
self._list_services()
|
||||
|
@ -0,0 +1,16 @@
|
||||
{
|
||||
"KeystoneBasic.create_and_list_services": [
|
||||
{
|
||||
"args": {
|
||||
"name": "Rally_test_service",
|
||||
"service_type": "Really_test_type",
|
||||
"description": "test_description"
|
||||
},
|
||||
"runner": {
|
||||
"type": "constant",
|
||||
"times": 100,
|
||||
"concurrency": 10
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
---
|
||||
KeystoneBasic.create_and_list_services:
|
||||
-
|
||||
args:
|
||||
name: "Rally_test_service"
|
||||
service_type: "Really_test_type"
|
||||
description: "test_description"
|
||||
runner:
|
||||
type: "constant"
|
||||
times: 100
|
||||
concurrency: 10
|
@ -140,3 +140,19 @@ class KeystoneBasicTestCase(test.TestCase):
|
||||
service_type,
|
||||
description)
|
||||
scenario._delete_service.assert_called_once_with(fake_service.id)
|
||||
|
||||
def test_create_and_list_services(self):
|
||||
scenario = basic.KeystoneBasic()
|
||||
name = "Rally_test_service"
|
||||
service_type = "rally_test_type"
|
||||
description = "test_description"
|
||||
fake_service = mock.MagicMock()
|
||||
scenario._service_create = mock.MagicMock(return_value=fake_service)
|
||||
scenario._list_services = mock.MagicMock()
|
||||
scenario.create_and_list_services(name=name,
|
||||
service_type=service_type,
|
||||
description=description)
|
||||
scenario._service_create.assert_called_once_with(name,
|
||||
service_type,
|
||||
description)
|
||||
scenario._list_services.assert_called_once_with()
|
||||
|
Loading…
Reference in New Issue
Block a user