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); |
+ }); |
+ }); |
+ |
}); |
})() |