Skip to content

Commit

Permalink
Merge branch 'master' of github.com:elastic/kibana into refactor/calc…
Browse files Browse the repository at this point in the history
…-auto-interval
  • Loading branch information
spalger committed Oct 27, 2018
2 parents 3ea56af + 59206ec commit b4f8a79
Show file tree
Hide file tree
Showing 19 changed files with 2,243 additions and 2,034 deletions.
2 changes: 1 addition & 1 deletion packages/kbn-es/src/install/snapshot.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ function downloadFile(url, dest, log) {
}

if (!res.ok) {
return reject(new Error(res.statusText));
return reject(new Error(`Unable to download elasticsearch snapshot: ${res.statusText}`));
}

const stream = fs.createWriteStream(downloadPath);
Expand Down
2 changes: 1 addition & 1 deletion src/optimize/base_optimizer.js
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ export default class BaseOptimizer {
Stats.presetToOptions('minimal')
));

throw Boom.internal(
return Boom.internal(
`Optimizations failure.\n${details.split('\n').join('\n ')}\n`,
stats.toJson(Stats.presetToOptions('detailed'))
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,43 +7,36 @@
import React from 'react';
import DetailView from '../index';
import props from './props.json';
import { shallow } from 'enzyme';

import {
mountWithRouterAndStore,
mockMoment,
toJson
} from '../../../../../utils/testHelpers';
import { mockMoment } from '../../../../../utils/testHelpers';

describe('DetailView', () => {
let storeState;
beforeEach(() => {
// Avoid timezone issues
mockMoment();

storeState = {
location: { search: '' }
};
});

it('should render empty state', () => {
const wrapper = mountWithRouterAndStore(
<DetailView errorGroup={[]} urlParams={props.urlParams} location={{}} />,
storeState
const wrapper = shallow(
<DetailView
errorGroup={[]}
urlParams={props.urlParams}
location={{ state: '' }}
/>
);

expect(toJson(wrapper)).toMatchSnapshot();
expect(wrapper).toMatchSnapshot();
});

it('should render with data', () => {
const wrapper = mountWithRouterAndStore(
const wrapper = shallow(
<DetailView
errorGroup={props.errorGroup}
urlParams={props.urlParams}
location={{}}
/>,
storeState
location={{ state: '' }}
/>
);

expect(toJson(wrapper)).toMatchSnapshot();
expect(wrapper).toMatchSnapshot();
});
});
Loading

0 comments on commit b4f8a79

Please sign in to comment.