Fix Audit issues with hostname
Change-Id: I8f8a14a9e35831d498428e9a07872b36e44a6330
This commit is contained in:
parent
fc40721a4a
commit
2d1d0c083a
22
.zuul.yaml
22
.zuul.yaml
|
@ -1,24 +1,24 @@
|
|||
- project:
|
||||
check:
|
||||
jobs:
|
||||
- watcher-tempest-functional
|
||||
- watcher-tempest-dummy_optim
|
||||
- watcher-tempest-actuator
|
||||
- watcher-tempest-basic_optim
|
||||
- watcher-tempest-workload_balancing
|
||||
- watcher-tempest-functional:
|
||||
voting: false
|
||||
- watcher-tempest-dummy_optim:
|
||||
voting: false
|
||||
- watcher-tempest-actuator:
|
||||
voting: false
|
||||
- watcher-tempest-basic_optim:
|
||||
voting: false
|
||||
- watcher-tempest-workload_balancing:
|
||||
voting: false
|
||||
- watcher-tempest-zone_migration
|
||||
|
||||
gate:
|
||||
jobs:
|
||||
- watcher-tempest-functional
|
||||
- watcher-tempest-dummy_optim
|
||||
- watcher-tempest-actuator
|
||||
- watcher-tempest-basic_optim
|
||||
- watcher-tempest-workload_balancing
|
||||
- watcher-tempest-zone_migration
|
||||
|
||||
- job:
|
||||
name: watcher-tempest-zone_migration
|
||||
parent: watcher-tempest-multinode
|
||||
vars:
|
||||
tempest_test_regex: 'watcher_tempest_plugin.tests.scenario.test_execute_zone_migration'
|
||||
tempest_test_regex: 'watcher_tempest_plugin.tests.scenario.test_execute_zone_migration'
|
||||
|
|
|
@ -127,6 +127,7 @@ class TestCreateUpdateDeleteAudit(base.BaseInfraOptimTest):
|
|||
_, audit = self.client.show_audit(body['uuid'])
|
||||
|
||||
initial_audit_state = audit.pop('state')
|
||||
del audit['hostname']
|
||||
self.assertIn(initial_audit_state, self.audit_states)
|
||||
|
||||
self.assert_expected(audit, body)
|
||||
|
@ -219,11 +220,14 @@ class TestShowListAudit(base.BaseInfraOptimTest):
|
|||
|
||||
initial_audit = self.audit.copy()
|
||||
del initial_audit['state']
|
||||
del initial_audit['hostname']
|
||||
audit_state = audit['state']
|
||||
actual_audit = audit.copy()
|
||||
del actual_audit['state']
|
||||
|
||||
self.assertIn(audit_state, self.audit_states)
|
||||
self.assertIsNotNone(actual_audit['hostname'])
|
||||
del actual_audit['hostname']
|
||||
self.assert_expected(initial_audit, actual_audit)
|
||||
|
||||
@decorators.attr(type='smoke')
|
||||
|
|
|
@ -110,14 +110,14 @@ class BaseInfraOptimScenarioTest(manager.ScenarioTest):
|
|||
body = body[0]
|
||||
if body['metrics'].get('cpu_util'):
|
||||
self.gnocchi.delete_metric(body['metrics']['cpu_util'])
|
||||
metric_body = {
|
||||
"archive_policy_name": "bool",
|
||||
"resource_id": body['id'],
|
||||
"name": "cpu_util"
|
||||
}
|
||||
self.gnocchi.create_metric(**metric_body)
|
||||
resp, body = self.gnocchi.search_resource(**search_body)
|
||||
body = body[0]
|
||||
metric_body = {
|
||||
"archive_policy_name": "bool",
|
||||
"resource_id": body['id'],
|
||||
"name": "cpu_util"
|
||||
}
|
||||
self.gnocchi.create_metric(**metric_body)
|
||||
resp, body = self.gnocchi.search_resource(**search_body)
|
||||
body = body[0]
|
||||
return resp, body
|
||||
|
||||
def add_measures(self, metric_uuid, body):
|
||||
|
|
Loading…
Reference in New Issue