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

Unified Diff: appengine_apps/trooper_o_matic/model/test/cqstats-graph-data-tests.html

Issue 774323002: Moved trooper_o_matic to appengine/ (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Created 6 years 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: appengine_apps/trooper_o_matic/model/test/cqstats-graph-data-tests.html
diff --git a/appengine_apps/trooper_o_matic/model/test/cqstats-graph-data-tests.html b/appengine_apps/trooper_o_matic/model/test/cqstats-graph-data-tests.html
deleted file mode 100644
index 1b1bfb0e891afc51393a95286299cbe6b820dc7c..0000000000000000000000000000000000000000
--- a/appengine_apps/trooper_o_matic/model/test/cqstats-graph-data-tests.html
+++ /dev/null
@@ -1,110 +0,0 @@
-<!--
-Copyright 2014 The Chromium Authors. All rights reserved.
-Use of this source code is governed by a BSD-style license that can be
-found in the LICENSE file.
--->
-
-<link rel="import" href="../../lib/log.html">
-<link rel="import" href="../../lib/network-simulator.html">
-<link rel="import" href="../cqstats-graph-data.html">
-
-<script>
-(function() {
-
-var assert = chai.assert;
-
-var testCQStats = {
- results: [{
- key: '2002',
- begin: 1500,
- end: 1500 + 500 * 60,
- interval_minutes: 500,
- stats: [{
- name: 'test-stat-a',
- max: 600,
- percentile_99: 540,
- percentile_90: 480,
- percentile_50: 420,
- min: 360,
- mean: 420,
- }, {
- name: 'test-stat-b',
- max: 6000,
- percentile_99: 5400,
- percentile_90: 4800,
- percentile_50: 4200,
- min: 3600,
- mean: 4200,
- }],
- }, {
- key: '1001',
- begin: 1000,
- end: 1000 + 500 * 60,
- interval_minutes: 500,
- stats: [{
- name: 'test-stat-a',
- max: 6000,
- percentile_99: 5400,
- percentile_90: 4800,
- percentile_50: 4200,
- min: 3600,
- mean: 4200,
- }, {
- name: 'test-stat-b',
- max: 600,
- percentile_99: 540,
- percentile_90: 480,
- percentile_50: 420,
- min: 360,
- mean: 420,
- }],
- }],
-};
-
-describe('CQStatsGraphData.createBatch', function() {
- it('should create CQStatsGraphData objects that get data', function(done) {
- var simulator = new NetworkSimulator(assert);
- simulator.json = function(options) {
- if (options.url === 'https://chromium-cq-status.appspot.com/stats/query?project=testProject&interval_minutes=500&names=test-stat-a%2Ctest-stat-b&count=1000') {
- return Promise.resolve(testCQStats);
- }
- console.log('Unexpected url: ' + options.url);
- }
-
- var dataList;
- simulator.runTest(function() {
- dataList = CQStatsGraphData.createBatch(
- 'testProject', 500, ['test-stat-a', 'test-stat-b'], 1000);
- }).then(function() {
- assert.equal(dataList.length, 2);
- assert.equal(dataList[0]._name, 'test-stat-a');
- assert.equal(dataList[1]._name, 'test-stat-b');
- return Promise.all([
- dataList[0].get().then(function(data) {
- assert.deepEqual(data, {
- cols: ['timestamp', 'max', 'p90', 'p50', 'min', 'mean'],
- rows: [
- [new Date((1000 + 500 * 60) * 1000), 100, 80, 70, 60, 70],
- [new Date((1500 + 500 * 60) * 1000), 10, 8, 7, 6, 7],
- ],
- });
- }),
- dataList[1].get().then(function(data) {
- assert.deepEqual(data, {
- cols: ['timestamp', 'max', 'p90', 'p50', 'min', 'mean'],
- rows: [
- [new Date((1000 + 500 * 60) * 1000), 10, 8, 7, 6, 7],
- [new Date((1500 + 500 * 60) * 1000), 100, 80, 70, 60, 70],
- ],
- });
- }),
- ]);
- }).then(function() {
- done();
- }).catch(log);
- });
-});
-
-})();
-</script>
-

Powered by Google App Engine
This is Rietveld 408576698