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

Unified Diff: Tools/GardeningServer/model/test/ct-failures-tests.html

Issue 476903004: [sheriff-o-matic]: Basic trooper display for sheriff-o-matic. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 3 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
Index: Tools/GardeningServer/model/test/ct-failures-tests.html
diff --git a/Tools/GardeningServer/model/test/ct-failures-tests.html b/Tools/GardeningServer/model/test/ct-failures-tests.html
index e68d81257b86cf636d91766b513a1617bda4348c..ce44e22ea25483c0e8320e5abff605f3e0ae55c1 100644
--- a/Tools/GardeningServer/model/test/ct-failures-tests.html
+++ b/Tools/GardeningServer/model/test/ct-failures-tests.html
@@ -60,6 +60,22 @@ describe('ct-failures', function() {
assert(analyzer._failureByTreeListComparator('chromium', group4, group1) > 0);
});
});
+
+ describe('processTrooperFailures', function() {
+ it('should filter out updates that are not alerts', function() {
+ var analyzer = new CTFailures(new CTCommitList(undefined, []));
+ analyzer._processTrooperFailures(
+ {'key_1': {'tree_1': {should_alert: true, should_appear: true},
+ 'tree_2': {should_alert: false, should_appear: false}},
+ 'key_2': {'tree_3': {should_alert: false, should_appear: false},
+ 'tree_4': {should_alert: true, should_appear: true}}});
+ analyzer.failures['trooper'].forEach(function(failure) {
+ assert(failure.data.should_appear);
+ });
+ assert(analyzer.failures['trooper'].length == 2);
+ });
+ });
+
});
})()

Powered by Google App Engine
This is Rietveld 408576698