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

Unified Diff: dashboard/dashboard/add_histograms_queue_test.py

Issue 2977283002: Ownership into GenericSets (Closed)
Patch Set: Fix tests after reabse Created 3 years, 5 months 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 | « dashboard/dashboard/add_histograms.py ('k') | dashboard/dashboard/find_anomalies.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dashboard/dashboard/add_histograms_queue_test.py
diff --git a/dashboard/dashboard/add_histograms_queue_test.py b/dashboard/dashboard/add_histograms_queue_test.py
index 0ac1aadf1f5011382dc97523667f978ebe2f6b8f..b90bbaba975cb60ef5473b5af944c93f3c94bb75 100644
--- a/dashboard/dashboard/add_histograms_queue_test.py
+++ b/dashboard/dashboard/add_histograms_queue_test.py
@@ -57,10 +57,10 @@ TEST_TELEMETRY_INFO = {
}
-TEST_OWNERSHIP = {
+TEST_OWNERS = {
'guid': '68e5b3bd-829c-4f4f-be3a-98a94279ccf0',
- 'emails': ['abc@chromium.org'],
- 'type': 'Ownership'
+ 'values': ['abc@chromium.org'],
+ 'type': 'GenericSet'
}
@@ -146,7 +146,7 @@ class AddHistogramsQueueTest(testing_common.TestCase):
'data': json.dumps(TEST_HISTOGRAM),
'test_path': test_path,
'revision': 123,
- 'diagnostics': json.dumps([TEST_TELEMETRY_INFO, TEST_OWNERSHIP])
+ 'diagnostics': json.dumps([TEST_TELEMETRY_INFO, TEST_OWNERS])
}
self.testapp.post('/add_histograms_queue', params)
histogram_entity = histogram.Histogram.query().fetch()[0]
@@ -160,15 +160,19 @@ class AddHistogramsQueueTest(testing_common.TestCase):
telemetry_info_entity = ndb.Key(
'SparseDiagnostic', TEST_TELEMETRY_INFO['guid']).get()
ownership_entity = ndb.Key(
- 'SparseDiagnostic', TEST_OWNERSHIP['guid']).get()
+ 'SparseDiagnostic', TEST_OWNERS['guid']).get()
self.assertFalse(telemetry_info_entity.internal_only)
self.assertFalse(ownership_entity.internal_only)
def testPostHistogram_WithSameDiagnostic(self):
diag_dict = {
'guid': '05341937-1272-4214-80ce-43b2d03807f9',
- 'emails': ['abc@chromium.org'],
- 'type': 'Ownership'
+ 'benchmarkName': 'myBenchmark',
+ 'canonicalUrl': 'myCanonicalUrl',
+ 'label': 'myLabel',
+ 'legacyTIRLabel': 'myLegacyTIRLabel',
+ 'storyDisplayName': 'myStoryDisplayName',
+ 'type': 'TelemetryInfo'
}
diag = histogram.SparseDiagnostic(
data=diag_dict, start_revision=1, end_revision=sys.maxint,
@@ -181,22 +185,22 @@ class AddHistogramsQueueTest(testing_common.TestCase):
'data': json.dumps(TEST_HISTOGRAM),
'test_path': test_path,
'revision': 123,
- 'diagnostics': json.dumps([TEST_TELEMETRY_INFO, TEST_OWNERSHIP])
+ 'diagnostics': json.dumps([TEST_TELEMETRY_INFO, TEST_OWNERS])
}
self.testapp.post('/add_histograms_queue', params)
histogram_entity = histogram.Histogram.query().fetch()[0]
hist = histogram_module.Histogram.FromDict(histogram_entity.data)
self.assertEqual(
'05341937-1272-4214-80ce-43b2d03807f9',
- hist.diagnostics['owners'].guid)
+ hist.diagnostics['telemetry'].guid)
diagnostics = histogram.SparseDiagnostic.query().fetch()
self.assertEqual(len(diagnostics), 2)
def testPostHistogram_WithDifferentDiagnostic(self):
diag_dict = {
'guid': 'c397a1a0-e289-45b2-abe7-29e638e09168',
- 'emails': ['def@chromium.org'],
- 'type': 'Ownership'
+ 'values': ['def@chromium.org'],
+ 'type': 'GenericSet'
}
diag = histogram.SparseDiagnostic(
data=diag_dict, start_revision=1, end_revision=sys.maxint,
@@ -209,7 +213,7 @@ class AddHistogramsQueueTest(testing_common.TestCase):
'data': json.dumps(TEST_HISTOGRAM),
'test_path': test_path,
'revision': 123,
- 'diagnostics': json.dumps([TEST_TELEMETRY_INFO, TEST_OWNERSHIP])
+ 'diagnostics': json.dumps([TEST_TELEMETRY_INFO, TEST_OWNERS])
}
self.testapp.post('/add_histograms_queue', params)
histogram_entity = histogram.Histogram.query().fetch()[0]
« no previous file with comments | « dashboard/dashboard/add_histograms.py ('k') | dashboard/dashboard/find_anomalies.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698