mirror of
https://github.com/elastic/kibana.git
synced 2025-06-29 03:24:45 -04:00
## Summary Updated the search plugin config endpoint to return just features and kibana version, removing the call to the enterprise search node. ### Checklist - [ ] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [ ] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
44 lines
1.8 KiB
TypeScript
44 lines
1.8 KiB
TypeScript
/*
|
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
* or more contributor license agreements. Licensed under the "Elastic License
|
|
* 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side
|
|
* Public License v 1"; you may not use this file except in compliance with, at
|
|
* your election, the "Elastic License 2.0", the "GNU Affero General Public
|
|
* License v3.0 only", or the "Server Side Public License, v 1".
|
|
*/
|
|
|
|
import expect from '@kbn/expect';
|
|
import { API_BASE_PATH } from '@kbn/guided-onboarding-plugin/common';
|
|
import { X_ELASTIC_INTERNAL_ORIGIN_REQUEST } from '@kbn/core-http-common';
|
|
import type { FtrProviderContext } from '../../ftr_provider_context';
|
|
|
|
const getConfigsPath = `${API_BASE_PATH}/configs`;
|
|
export default function testGetGuideConfig({ getService }: FtrProviderContext) {
|
|
const supertest = getService('supertest');
|
|
|
|
describe(`GET ${getConfigsPath}`, () => {
|
|
// check that production guides are present
|
|
['siem', 'databaseSearch', 'kubernetes'].map((guideId) => {
|
|
it(`returns config for ${guideId}`, async () => {
|
|
const response = await supertest
|
|
.get(`${getConfigsPath}/${guideId}`)
|
|
.set(X_ELASTIC_INTERNAL_ORIGIN_REQUEST, 'kibana')
|
|
.expect(200);
|
|
expect(response.body).not.to.be.empty();
|
|
const { config } = response.body;
|
|
expect(config).to.not.be.empty();
|
|
});
|
|
});
|
|
|
|
// expecting websiteSearch to be disabled for now, but adding this test to ensure
|
|
// it's added back to the above list when support for web crawlers is added back.
|
|
['websiteSearch'].map((guideId) => {
|
|
it(`does not returns config for ${guideId}`, async () => {
|
|
await supertest
|
|
.get(`${getConfigsPath}/${guideId}`)
|
|
.set(X_ELASTIC_INTERNAL_ORIGIN_REQUEST, 'kibana')
|
|
.expect(404);
|
|
});
|
|
});
|
|
});
|
|
}
|