Unreviewed test fixes after r179037, r179591, and r179763.
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 20 Feb 2015 20:09:47 +0000 (20:09 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 20 Feb 2015 20:09:47 +0000 (20:09 +0000)
* tests/admin-regenerate-manifest.js:
* tests/admin-reprocess-report.js:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@180442 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Websites/perf.webkit.org/ChangeLog
Websites/perf.webkit.org/tests/admin-regenerate-manifest.js
Websites/perf.webkit.org/tests/admin-reprocess-report.js

index dbc9248..3f20b4b 100644 (file)
@@ -1,3 +1,10 @@
+2015-02-20  Ryosuke Niwa  <rniwa@webkit.org>
+
+        Unreviewed test fixes after r179037, r179591, and r179763.
+
+        * tests/admin-regenerate-manifest.js:
+        * tests/admin-reprocess-report.js:
+
 2015-02-19  Ryosuke Niwa  <rniwa@webkit.org>
 
         Relationship between A/B testing results are unclear
index 769f358..f4dc6ae 100644 (file)
@@ -7,6 +7,7 @@ describe("/admin/regenerate-manifest", function () {
                 assert.equal(response.statusCode, 200);
                 var manifest = JSON.parse(response.responseText);
                 delete manifest.defaultDashboard;
+                delete manifest.dashboards;
                 assert.deepEqual(manifest, {
                     all: [],
                     bugTrackers: [],
@@ -47,11 +48,11 @@ describe("/admin/regenerate-manifest", function () {
                             assert.equal(response.statusCode, 200);
                             var manifest = JSON.parse(response.responseText);
                             assert.deepEqual(manifest['repositories'], {
-                                'WebKit': { url: 'trac.webkit.org', blameUrl: null, hasReportedCommits: false },
-                                'Chromium': { url: null, blameUrl: 'SomeBlameURL', hasReportedCommits: false }
+                                1: { name: 'WebKit', url: 'trac.webkit.org', blameUrl: null, hasReportedCommits: false },
+                                2: { name: 'Chromium', url: null, blameUrl: 'SomeBlameURL', hasReportedCommits: false }
                             });
-                            assert.deepEqual(manifest['bugTrackers'][3], {name: 'Bugzilla', bugUrl: null, newBugUrl: null, repositories: ['WebKit']});
-                            assert.deepEqual(manifest['bugTrackers'][4], {name: 'Issue Tracker', bugUrl: null, newBugUrl: null, repositories: ['WebKit', 'Chromium']});
+                            assert.deepEqual(manifest['bugTrackers'][3], {name: 'Bugzilla', bugUrl: null, newBugUrl: null, repositories: ['1']});
+                            assert.deepEqual(manifest['bugTrackers'][4], {name: 'Issue Tracker', bugUrl: null, newBugUrl: null, repositories: ['1', '2']});
                             notifyDone();
                         });
                     });
index 736d8d0..61a9cad 100644 (file)
@@ -28,7 +28,7 @@ describe("/admin/reprocess-report", function () {
                     queryAndFetchAll('SELECT * FROM reports', [], function (reportRows) {
                         assert.equal(reportRows.length, 1);
                         assert.equal(reportRows[0]['report_build_number'], 1986);
-                        queryAndFetchAll('DELETE FROM builds; SELECT * FROM builds', [], function (buildRows) {
+                        queryAndFetchAll('UPDATE reports SET report_build = NULL; DELETE FROM builds; SELECT * FROM builds', [], function (buildRows) {
                             assert.equal(buildRows.length, 0);
                             var reportId = reportRows[0]['report_id'];
                             httpGet('/admin/reprocess-report?report=' + reportId, function (response) {
@@ -54,13 +54,16 @@ describe("/admin/reprocess-report", function () {
                 assert.equal(JSON.parse(response.responseText)['status'], 'OK');
                 queryAndFetchAll('SELECT * FROM reports', [], function (originalReprotRows) {
                     assert.equal(originalReprotRows.length, 1);
-                    queryAndFetchAll('DELETE FROM builds', [], function () {
+                    queryAndFetchAll('UPDATE reports SET report_build = NULL; DELETE FROM builds', [], function () {
                         httpGet('/admin/reprocess-report?report=' + originalReprotRows[0]['report_id'], function (response) {
                             assert.equal(response.statusCode, 200);
                             assert.equal(JSON.parse(response.responseText)['status'], 'OK');
                             queryAndFetchAll('SELECT * FROM reports', [], function (reportRows) {
                                 originalReprotRows[0]['report_committed_at'] = null;
                                 reportRows[0]['report_committed_at'] = null;
+                                assert.notEqual(originalReprotRows[0]['report_build'], reportRows[0]['report_build']);
+                                originalReprotRows[0]['report_build'] = null;
+                                reportRows[0]['report_build'] = null;
                                 assert.deepEqual(reportRows, originalReprotRows);
                                 notifyDone();
                             });