Chromium Code Reviews| 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 925d5306ff7a22c9f29e3f05a494cb3498989d3b..e61460b8eea579c38d573091162a5836d7b4433d 100644 |
| --- a/Tools/GardeningServer/model/test/ct-failures-tests.html |
| +++ b/Tools/GardeningServer/model/test/ct-failures-tests.html |
| @@ -413,7 +413,7 @@ describe('ct-failures', function() { |
| it('should filter out updates that are not alerts', function() { |
| var analyzer = new CTFailures(new CTCommitList(undefined, [])); |
| analyzer.failures = {}; |
| - analyzer._processTrooperFailures( |
| + 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}, |
| @@ -425,6 +425,25 @@ describe('ct-failures', function() { |
| }); |
| }); |
| + describe('processTrooperFailures', function() { |
| + it('should list all failures with category builder and master', function() { |
| + var emptycl = new CTCommitList(undefined, []); |
| + var emptygd = new CTStepFailureGroupData([], emptycl); |
|
ojan
2014/10/16 21:20:39
We've been avoiding acronyms except for standard o
navabi
2014/10/16 23:56:05
Done.
|
| + var group1 = new CTFailureGroup('', emptygd, 'builder'); |
| + var group2 = new CTFailureGroup('', emptygd, 'failedOnce'); |
| + var group3 = new CTFailureGroup('', emptygd, 'master'); |
| + |
| + var analyzer = new CTFailures(new CTCommitList(undefined, [])); |
| + analyzer.failures = {}; |
| + analyzer._processTrooperFailures( |
| + {'tree_1': [group1], 'tree_2': [group2, group3]}, {}); |
| + analyzer.failures['trooper'].forEach(function(failure) { |
| + assert(failure.category == 'builder' || failure.category == 'master'); |
| + }); |
| + assert(analyzer.failures['trooper'].length == 2); |
| + }); |
| + }); |
| + |
| describe('processFailuresForRangeGroup', function() { |
| it('should use tree name from json', function() { |
| var analyzer = new CTFailures(null); |