mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
Server saved objects client through request context (#44143)
* Expose Saved Objects client in request context * API Integration test for savedobjects in req context * SavedObjectsClient docs * SavedObjectsClient#find remove dependency on indexPatterns And use the saved objects mappings instead * Review comments * Review comments, fixes and tests * Use correct type for KQL syntax check
This commit is contained in:
parent
730ba21ed4
commit
3d28467d00
54 changed files with 743 additions and 585 deletions
|
@ -20,11 +20,17 @@
|
|||
export default function ({ getService }) {
|
||||
const supertest = getService('supertest');
|
||||
|
||||
describe('core', () => {
|
||||
it('provides access to request context', async () => (
|
||||
describe('core request context', () => {
|
||||
it('provides access to elasticsearch', async () => (
|
||||
await supertest
|
||||
.get('/testbed/ping')
|
||||
.expect(200, 'Pong: true')
|
||||
.get('/requestcontext/elasticsearch')
|
||||
.expect(200, 'Elasticsearch: true')
|
||||
));
|
||||
|
||||
it('provides access to SavedObjects client', async () => (
|
||||
await supertest
|
||||
.get('/requestcontext/savedobjectsclient')
|
||||
.expect(200, 'SavedObjects client: {"page":1,"per_page":20,"total":0,"saved_objects":[]}')
|
||||
));
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue