Skip to content

Commit

Permalink
[ML] Update REST endpoint calls to remove _xpack (#28069)
Browse files Browse the repository at this point in the history
  • Loading branch information
peteharverson authored Jan 4, 2019
1 parent 5654f60 commit ef5e7a5
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 52 deletions.
7 changes: 4 additions & 3 deletions x-pack/plugins/ml/server/client/__tests__/elasticsearch_ml.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ import {

describe('ML - Endpoints', () => {

const PATH_START = '/_xpack/';
const PATH_START_LENGTH = PATH_START.length;
// Check all paths in the ML elasticsearchJsPlugin start with a leading forward slash
// so they work if Kibana is run behind a reverse proxy
const PATH_START = '/';
const urls = [];

// Stub objects
Expand Down Expand Up @@ -49,7 +50,7 @@ describe('ML - Endpoints', () => {
describe('paths', () => {
it(`should start with ${PATH_START}`, () => {
urls.forEach((url) => {
expect(url.substring(0, PATH_START_LENGTH)).to.eql(PATH_START);
expect(url[0]).to.eql(PATH_START);
});
});
});
Expand Down
Loading

0 comments on commit ef5e7a5

Please sign in to comment.