Add keystone validate token using ceilometer scenario
Change-Id: I2d6220f2ac6149e1177d8fc324f4cfd541d41ae3
This commit is contained in:
parent
c11108a6e3
commit
d6e5f766f2
@ -705,6 +705,22 @@
|
||||
failure_rate:
|
||||
max: 0
|
||||
|
||||
Authenticate.validate_ceilometer:
|
||||
-
|
||||
args:
|
||||
repetitions: 2
|
||||
runner:
|
||||
type: "constant"
|
||||
times: 10
|
||||
concurrency: 5
|
||||
context:
|
||||
users:
|
||||
tenants: 3
|
||||
users_per_tenant: 5
|
||||
sla:
|
||||
failure_rate:
|
||||
max: 0
|
||||
|
||||
Authenticate.validate_glance:
|
||||
-
|
||||
args:
|
||||
|
@ -68,6 +68,24 @@ class Authenticate(scenario.OpenStackScenario):
|
||||
for i in range(repetitions):
|
||||
nova_client.flavors.list()
|
||||
|
||||
@validation.number("repetitions", minval=1)
|
||||
@validation.required_openstack(users=True)
|
||||
@scenario.configure()
|
||||
def validate_ceilometer(self, repetitions):
|
||||
"""Check Ceilometer Client to ensure validation of token.
|
||||
|
||||
Creation of the client does not ensure validation of the token.
|
||||
We have to do some minimal operation to make sure token gets validated.
|
||||
|
||||
:param repetitions: number of times to validate
|
||||
"""
|
||||
ceilometer_client = self.clients("ceilometer")
|
||||
with atomic.ActionTimer(self,
|
||||
"authenticate.validate_ceilometer_%s_times"
|
||||
% repetitions):
|
||||
for i in range(repetitions):
|
||||
ceilometer_client.meters.list()
|
||||
|
||||
@validation.number("repetitions", minval=1)
|
||||
@validation.required_openstack(users=True)
|
||||
@scenario.configure()
|
||||
|
@ -0,0 +1,20 @@
|
||||
{
|
||||
"Authenticate.validate_ceilometer": [
|
||||
{
|
||||
"args": {
|
||||
"repetitions": 2
|
||||
},
|
||||
"runner": {
|
||||
"type": "constant",
|
||||
"times": 10,
|
||||
"concurrency": 5
|
||||
},
|
||||
"context": {
|
||||
"users": {
|
||||
"tenants": 3,
|
||||
"users_per_tenant": 5
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
---
|
||||
Authenticate.validate_ceilometer:
|
||||
-
|
||||
args:
|
||||
repetitions: 2
|
||||
runner:
|
||||
type: "constant"
|
||||
times: 10
|
||||
concurrency: 5
|
||||
context:
|
||||
users:
|
||||
tenants: 3
|
||||
users_per_tenant: 5
|
@ -56,6 +56,15 @@ class AuthenticateTestCase(test.ScenarioTestCase):
|
||||
self._test_atomic_action_timer(scenario_inst.atomic_actions(),
|
||||
"authenticate.validate_nova_5_times")
|
||||
|
||||
def test_validate_ceilometer(self):
|
||||
scenario_inst = authenticate.Authenticate()
|
||||
scenario_inst.validate_ceilometer(5)
|
||||
self.clients("ceilometer").meters.list.assert_has_calls(
|
||||
[mock.call()] * 5)
|
||||
self._test_atomic_action_timer(
|
||||
scenario_inst.atomic_actions(),
|
||||
"authenticate.validate_ceilometer_5_times")
|
||||
|
||||
def test_validate_cinder(self):
|
||||
scenario_inst = authenticate.Authenticate()
|
||||
scenario_inst.validate_cinder(5)
|
||||
|
Loading…
Reference in New Issue
Block a user