mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
* Test config settings that are exposed to the browser (#129438)
(cherry picked from commit 27ff7d3424
)
# Conflicts:
# .github/CODEOWNERS
# packages/kbn-config-schema/src/index.ts
* Enable security plugin in OSS tests
This is a partial backport of #111681, so the Kibana security
plugin is enabled but Elasticsearch security is still disabled.
* Fix exposed config key tests
The exposed config keys are slightly different in the 7.17 branch.
* Fix UI Capabilities tests
The enterpriseSearch plugin does not have a required dependency on
the security plugin in the 7.17 branch, so our bacported
assertions for these tests needed to change accordingly.
47 lines
1.6 KiB
TypeScript
47 lines
1.6 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 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 or the Server
|
|
* Side Public License, v 1.
|
|
*/
|
|
|
|
import expect from '@kbn/expect';
|
|
import { FtrProviderContext } from '../../ftr_provider_context';
|
|
|
|
export default function ({ getService }: FtrProviderContext) {
|
|
const supertest = getService('supertest');
|
|
|
|
describe('customIntegrations', () => {
|
|
describe('get list of append integrations', () => {
|
|
it('should return list of custom integrations that can be appended', async () => {
|
|
const resp = await supertest
|
|
.get(`/internal/customIntegrations/appendCustomIntegrations`)
|
|
.set('kbn-xsrf', 'kibana')
|
|
.expect(200);
|
|
|
|
expect(resp.body).to.be.an('array');
|
|
|
|
expect(resp.body.length).to.be(34);
|
|
|
|
// Test for sample data card
|
|
expect(resp.body.findIndex((c: { id: string }) => c.id === 'sample_data_all')).to.be.above(
|
|
-1
|
|
);
|
|
});
|
|
});
|
|
|
|
describe('get list of replacement integrations', () => {
|
|
it('should return list of custom integrations that can be used to replace EPR packages', async () => {
|
|
const resp = await supertest
|
|
.get(`/internal/customIntegrations/replacementCustomIntegrations`)
|
|
.set('kbn-xsrf', 'kibana')
|
|
.expect(200);
|
|
|
|
expect(resp.body).to.be.an('array');
|
|
|
|
expect(resp.body.length).to.be(109); // the beats
|
|
});
|
|
});
|
|
});
|
|
}
|