Fix error in test_jobs_executed

Due to the recent change in statsd metric names, the hostname
that test_jobs_executed looks for may need to be updated.  In the
gate, the hostname is not an FQDN, but if it is, it will need
this substitution.

Change-Id: I28b64404c9a3569323264274ff5b0fa932aebe78
This commit is contained in:
James E. Blair 2018-03-12 14:22:23 -07:00
parent 035e034233
commit 0c906b3614
1 changed files with 2 additions and 1 deletions

View File

@ -115,7 +115,8 @@ class TestScheduler(ZuulTestCase):
self.assertReportedStat(
'zuul.tenant.tenant-one.pipeline.gate.project.review_example_com.'
'org_project.master.total_changes', value='1|c')
exec_key = 'zuul.executor.%s' % self.executor_server.hostname
exec_key = 'zuul.executor.%s' % self.executor_server.hostname.replace(
'.', '_')
self.assertReportedStat(exec_key + '.builds', value='1|c')
self.assertReportedStat('zuul.nodepool.requested', value='1|c')
self.assertReportedStat('zuul.nodepool.requested.label.label1',