mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 09:19:04 -04:00
* fix xpack integration tests, add to CI * faster tests, intigration runs in paralel * fix intigration test * revert hard-coding test env to node
This commit is contained in:
parent
f94442caba
commit
33c85491d0
4 changed files with 16 additions and 4 deletions
|
@ -223,7 +223,7 @@ export async function startTestServers({
|
|||
|
||||
// Override provided configs, we know what the elastic user is now
|
||||
kbnSettings.elasticsearch = {
|
||||
url: esTestConfig.getUrl(),
|
||||
hosts: [esTestConfig.getUrl()],
|
||||
username: esTestConfig.getUrlParts().username,
|
||||
password: esTestConfig.getUrlParts().password,
|
||||
};
|
||||
|
|
|
@ -29,3 +29,9 @@ cd "$XPACK_DIR"
|
|||
node scripts/jest --ci --no-cache --verbose
|
||||
echo ""
|
||||
echo ""
|
||||
|
||||
echo " -> Running jest integration tests"
|
||||
cd "$XPACK_DIR"
|
||||
node scripts/jest_integration --ci --no-cache --verbose
|
||||
echo ""
|
||||
echo ""
|
|
@ -9,7 +9,8 @@ import { camelCase } from 'lodash';
|
|||
// @ts-ignore
|
||||
import * as kbnTestServer from '../../../../../../../../src/test_utils/kbn_server';
|
||||
// @ts-ignore
|
||||
import { xpackKbnServerConfig } from '../../../../../../../test_utils/kbn_server_config';
|
||||
import { TestKbnServerConfig } from '../../../../../../../test_utils/kbn_server_config';
|
||||
import { CONFIG_PREFIX } from '../../../../../common/constants/plugin';
|
||||
import { PLUGIN } from './../../../../../common/constants/plugin';
|
||||
import { KibanaBackendFrameworkAdapter } from './../kibana_framework_adapter';
|
||||
import { contractTests } from './test_contract';
|
||||
|
@ -19,13 +20,17 @@ contractTests('Kibana Framework Adapter', {
|
|||
async before() {
|
||||
servers = await kbnTestServer.startTestServers({
|
||||
adjustTimeout: (t: number) => jest.setTimeout(t),
|
||||
settings: xpackKbnServerConfig,
|
||||
settings: TestKbnServerConfig,
|
||||
});
|
||||
},
|
||||
async after() {
|
||||
await servers.stop();
|
||||
},
|
||||
adapterSetup: () => {
|
||||
return new KibanaBackendFrameworkAdapter(camelCase(PLUGIN.ID), servers.kbnServer.server);
|
||||
return new KibanaBackendFrameworkAdapter(
|
||||
camelCase(PLUGIN.ID),
|
||||
servers.kbnServer.server,
|
||||
CONFIG_PREFIX
|
||||
);
|
||||
},
|
||||
});
|
|
@ -18,6 +18,7 @@
|
|||
|
||||
const resolve = require('path').resolve;
|
||||
process.argv.push('--config', resolve(__dirname, '../test_utils/jest/config.integration.js'));
|
||||
process.argv.push('--runInBand');
|
||||
|
||||
require('../../src/setup_node_env');
|
||||
require('../../src/dev/jest/cli');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue