Skip to content

Commit

Permalink
fix functional test
Browse files Browse the repository at this point in the history
  • Loading branch information
mattkime committed Aug 8, 2023
1 parent a3108cc commit 96eb121
Showing 1 changed file with 8 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
import expect from 'expect';
import { ELASTIC_HTTP_VERSION_HEADER } from '@kbn/core-http-common';
import { INITIAL_REST_VERSION_INTERNAL } from '@kbn/data-views-plugin/server/constants';
import { X_ELASTIC_INTERNAL_ORIGIN_REQUEST } from '@kbn/core-http-common/src/constants';
import { FIELDS_FOR_WILDCARD_PATH as BASE_URI } from '@kbn/data-views-plugin/common/constants';
import { stringify } from 'query-string';
import { FtrProviderContext } from '../../ftr_provider_context';

export default function ({ getService }: FtrProviderContext) {
Expand All @@ -27,20 +27,18 @@ export default function ({ getService }: FtrProviderContext) {
);
});
it('returns 200 and best effort response despite lack of rollup support', async () => {
const uri = `${BASE_URI}?${stringify(
{
const response = await supertest
.get(BASE_URI)
.query({
pattern: 'basic_index',
type: 'rollup',
rollup_index: 'bar',
},
{ sort: false }
)}`;
const response = await supertest
.get(uri)
// .query()
.set(ELASTIC_HTTP_VERSION_HEADER, INITIAL_REST_VERSION_INTERNAL);
})
.set(ELASTIC_HTTP_VERSION_HEADER, INITIAL_REST_VERSION_INTERNAL)
.set(X_ELASTIC_INTERNAL_ORIGIN_REQUEST, 'true');

expect(response.status).toBe(200);
expect(response.body.fields.length).toEqual(5);
});
});
}

0 comments on commit 96eb121

Please sign in to comment.