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

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

Issue 546433003: Add failed_once category to Sheriff-O-Matic. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: bail loop early, rebased, and fixed style for new text 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-failure-group-tests.html
diff --git a/Tools/GardeningServer/model/test/ct-failure-group-tests.html b/Tools/GardeningServer/model/test/ct-failure-group-tests.html
index 94ec87617e4b38cef5469a5c53b8004b97674f4e..0c408450a3b78f400ad90ce491ec2dcb9b074d87 100644
--- a/Tools/GardeningServer/model/test/ct-failure-group-tests.html
+++ b/Tools/GardeningServer/model/test/ct-failure-group-tests.html
@@ -35,6 +35,23 @@ describe('ct-failure-group', function() {
[newFailureWithAnnotation({snoozeTime: Date.now() + 1000 * 1000})]));
assert.equal(group.category, 'snoozed');
});
+
+ it('should be "failedOnce" when there is only one failure', function() {
+ var failure = newFailureWithAnnotation();
+ failure.resultNodesByBuilder = {some_key: {failingBuildCount: 1}}
+ var group = new CTFailureGroup('', new CTSheriffFailureGroupData(
+ [failure]));
+ assert.equal(group.category, 'failedOnce');
+ });
+
+ it('should not be "failedOnce" when there is more than one failure', function() {
+ var failure = newFailureWithAnnotation();
+ failure.resultNodesByBuilder = {some_key: {failingBuildCount: 1},
+ other_key: {failingBuildCount: 1}}
+ var group = new CTFailureGroup('', new CTSheriffFailureGroupData(
+ [failure]));
+ assert.equal(group.category, 'default');
+ });
});
describe('snooze', function() {
« no previous file with comments | « Tools/GardeningServer/model/ct-failure-group.html ('k') | Tools/GardeningServer/ui/ct-unexpected-failures.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698