Skip to content

Commit

Permalink
[console] fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
spalger committed Mar 28, 2017
1 parent 3145506 commit c4f4bd8
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 17 deletions.
4 changes: 0 additions & 4 deletions src/core_plugins/console/server/__tests__/proxy_route/body.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
import { createServer, ClientRequest, Agent } from 'http';
import { Readable } from 'stream';
import { stringify as formatQueryString } from 'querystring';

import sinon from 'sinon';
import Wreck from 'wreck';
import expect from 'expect.js';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import { createServer, ClientRequest, Agent, request } from 'http';
import { Readable } from 'stream';
import { stringify as formatQueryString } from 'querystring';
import { request } from 'http';

import sinon from 'sinon';
import Wreck from 'wreck';
Expand All @@ -21,7 +19,7 @@ describe('Console Proxy Route', () => {

sandbox.stub(Wreck, 'request', createWreckResponseStub());

setup = (remoteAddress) => {
setup = () => {
const server = new Server();

server.connection({ port: 0 });
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { createServer, ClientRequest, Agent } from 'http';
import { Readable } from 'stream';
import { Agent } from 'http';

import sinon from 'sinon';
import Wreck from 'wreck';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
import { createServer, ClientRequest, Agent } from 'http';
import { Readable } from 'stream';
import { stringify as formatQueryString } from 'querystring';

import sinon from 'sinon';
import Wreck from 'wreck';
import expect from 'expect.js';
Expand Down Expand Up @@ -71,14 +67,14 @@ describe('Console Proxy Route', () => {
});
context('starts with a slash', () => {
it('combines well with the base url', async () => {
const { statusCode } = await request('GET', '/index/type/id');
await request('GET', '/index/type/id');
sinon.assert.calledOnce(Wreck.request);
expect(Wreck.request.getCall(0).args[1]).to.be('http://localhost:9200/index/type/id');
});
});
context(`doesn't start with a slash`, () => {
it('combines well with the base url', async () => {
const { statusCode } = await request('GET', 'index/type/id');
await request('GET', 'index/type/id');
sinon.assert.calledOnce(Wreck.request);
expect(Wreck.request.getCall(0).args[1]).to.be('http://localhost:9200/index/type/id');
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Readable } from 'stream';
export function createWreckResponseStub(response) {
return (...args) => {
const resp = new Readable({
read(n) {
read() {
if (response) {
this.push(response);
}
Expand Down

0 comments on commit c4f4bd8

Please sign in to comment.