Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(267)

Unified Diff: appengine/cr-buildbucket/test/metrics_test.py

Issue 1532713002: buildbucket: add monitoring using ts_mon (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: duration Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « appengine/cr-buildbucket/service.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: appengine/cr-buildbucket/test/metrics_test.py
diff --git a/appengine/cr-buildbucket/test/metrics_test.py b/appengine/cr-buildbucket/test/metrics_test.py
index bb9dc7af521c2df070e6964bbf2d581fb9892f17..2e1bebdaeaf3ad38f6a2ce3dcf24ae78c68f16ac 100644
--- a/appengine/cr-buildbucket/test/metrics_test.py
+++ b/appengine/cr-buildbucket/test/metrics_test.py
@@ -92,3 +92,18 @@ class MerticsTest(testing.AppengineTestCase):
buf, 'x', metrics.METRIC_PENDING_BUILDS, model.BuildStatus.SCHEDULED)
metrics.send_build_status_metric.assert_any_call(
buf, 'x', metrics.METRIC_RUNNING_BUILDS, model.BuildStatus.STARTED)
+
+ def test_fields_for(self):
+ self.assertEqual(
+ metrics.fields_for(
+ model.Build(
+ bucket='master.x',
+ tags=['builder:release', 'user_agent:cq', 'something:else']),
+ result='SUCCESS'),
+ {
+ 'bucket': 'master.x',
+ 'builder': 'release',
+ 'user_agent': 'cq',
+ 'result': 'SUCCESS',
+ }
+ )
« no previous file with comments | « appengine/cr-buildbucket/service.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698