Bug 155831 - Add mocha server tests for /api/build-requests
Summary: Add mocha server tests for /api/build-requests
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Perf Dashboard (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Ryosuke Niwa
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-03-23 21:37 PDT by Ryosuke Niwa
Modified: 2016-03-24 13:22 PDT (History)
6 users (show)

See Also:


Attachments
Adds tests (38.69 KB, patch)
2016-03-23 22:27 PDT, Ryosuke Niwa
cdumez: review+
cdumez: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ryosuke Niwa 2016-03-23 21:37:53 PDT
Use mocha.js tests for /api/build-requests.

We'll migrate the existing tests in tests/ once this patch is done.
Comment 1 Ryosuke Niwa 2016-03-23 22:27:45 PDT
Created attachment 274820 [details]
Adds tests
Comment 2 Chris Dumez 2016-03-24 12:23:30 PDT
Comment on attachment 274820 [details]
Adds tests

View in context: https://bugs.webkit.org/attachment.cgi?id=274820&action=review

r=me with fixes

> Websites/perf.webkit.org/server-tests/api-build-requests-tests.js:58
> +    it('should return build requets associated with a given triggerable with appropraite roots and rootSets', function (done) {

Typo appropriate

> Websites/perf.webkit.org/server-tests/resources/test-server.conf:53
> +	AddType application/x-httpd-php .php

Weird indentation

> Websites/perf.webkit.org/server-tests/resources/test-server.js:12
> +let TestSever = (new class TestSever {

Typo testserver

> Websites/perf.webkit.org/server-tests/resources/test-server.js:98
> +            fs.mkdirSync(this._dataDirectory, 0o755);

This permission format looks weird

> Websites/perf.webkit.org/server-tests/resources/test-server.js:162
> +            '-c', `Listen ${port}`,

Why are these all -c ?
Comment 3 Ryosuke Niwa 2016-03-24 13:16:59 PDT
Committed r198642: <http://trac.webkit.org/changeset/198642>
Comment 4 Ryosuke Niwa 2016-03-24 13:22:15 PDT
(In reply to comment #2)
> Comment on attachment 274820 [details]
> Adds tests
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=274820&action=review
> 
> r=me with fixes
> 
> > Websites/perf.webkit.org/server-tests/api-build-requests-tests.js:58
> > +    it('should return build requets associated with a given triggerable with appropraite roots and rootSets', function (done) {
> 
> Typo appropriate

Fixed.

> > Websites/perf.webkit.org/server-tests/resources/test-server.conf:53
> > +	AddType application/x-httpd-php .php
> 
> Weird indentation

Fixed.

> > Websites/perf.webkit.org/server-tests/resources/test-server.js:12
> > +let TestSever = (new class TestSever {
> 
> Typo testserver

Fixed.

> > Websites/perf.webkit.org/server-tests/resources/test-server.js:98
> > +            fs.mkdirSync(this._dataDirectory, 0o755);
> 
> This permission format looks weird

o is for octal.

> > Websites/perf.webkit.org/server-tests/resources/test-server.js:162
> > +            '-c', `Listen ${port}`,
> 
> Why are these all -c ?

-c is used to specify a configuration line.