This commit is contained in:
parent
8c6f7209e4
commit
ef12447f63
|
@ -6,7 +6,6 @@
|
|||
|
||||
import jest from 'jest';
|
||||
import { resolve } from 'path';
|
||||
import { resolveKibanaPath } from '@kbn/plugin-helpers';
|
||||
|
||||
import { createJestConfig } from './create_jest_config';
|
||||
|
||||
|
@ -14,8 +13,8 @@ import { createJestConfig } from './create_jest_config';
|
|||
export function runJest() {
|
||||
process.env.NODE_ENV = process.env.NODE_ENV || 'test';
|
||||
const config = JSON.stringify(createJestConfig({
|
||||
kibanaDirectory: resolveKibanaPath(''),
|
||||
xPackKibanaDirectory: resolve(__dirname, '..', '..'),
|
||||
kibanaDirectory: resolve(__dirname, '../../..'),
|
||||
xPackKibanaDirectory: resolve(__dirname, '../..'),
|
||||
}));
|
||||
|
||||
const argv = [
|
||||
|
|
|
@ -7,8 +7,7 @@
|
|||
const path = require('path');
|
||||
const yargs = require('yargs');
|
||||
const glob = require('glob');
|
||||
const { resolveKibanaPath } = require('@kbn/plugin-helpers');
|
||||
const { findPluginSpecs } = require(resolveKibanaPath('src/plugin_discovery'));
|
||||
const { findPluginSpecs } = require('../../src/plugin_discovery');
|
||||
|
||||
/*
|
||||
Usage:
|
||||
|
|
|
@ -9,13 +9,14 @@ import Puid from 'puid';
|
|||
import sinon from 'sinon';
|
||||
import 'sinon-as-promised';
|
||||
import nodeCrypto from '@elastic/node-crypto';
|
||||
import { resolveKibanaPath } from '@kbn/plugin-helpers';
|
||||
import { executeJobFactory } from '../execute_job';
|
||||
|
||||
import { CancellationToken } from '../../../../server/lib/esqueue/helpers/cancellation_token';
|
||||
const { SavedObjectsClient } = require(resolveKibanaPath('src/server/saved_objects/client/saved_objects_client.js'));
|
||||
const { FieldFormat } = require(resolveKibanaPath('src/ui/field_formats/field_format.js'));
|
||||
const { FieldFormatsService } = require(resolveKibanaPath('src/ui/field_formats/field_formats_service.js'));
|
||||
const { createStringFormat } = require(resolveKibanaPath('src/core_plugins/kibana/common/field_formats/types/string.js'));
|
||||
import { SavedObjectsClient } from '../../../../../../../src/server/saved_objects/client/saved_objects_client.js';
|
||||
import { FieldFormat } from '../../../../../../../src/ui/field_formats/field_format.js';
|
||||
import { FieldFormatsService } from '../../../../../../../src/ui/field_formats/field_formats_service.js';
|
||||
import { createStringFormat } from '../../../../../../../src/core_plugins/kibana/common/field_formats/types/string.js';
|
||||
|
||||
import { executeJobFactory } from '../execute_job';
|
||||
|
||||
const delay = (ms) => new Promise(resolve => setTimeout(() => resolve(), ms));
|
||||
|
||||
|
|
|
@ -5,12 +5,13 @@
|
|||
*/
|
||||
|
||||
import expect from 'expect.js';
|
||||
|
||||
import { FieldFormat } from '../../../../../../../../src/ui/field_formats/field_format.js';
|
||||
import { FieldFormatsService } from '../../../../../../../../src/ui/field_formats/field_formats_service.js';
|
||||
import { createBytesFormat } from '../../../../../../../../src/core_plugins/kibana/common/field_formats/types/bytes.js';
|
||||
import { createNumberFormat } from '../../../../../../../../src/core_plugins/kibana/common/field_formats/types/number.js';
|
||||
|
||||
import { fieldFormatMapFactory } from '../field_format_map';
|
||||
import { resolveKibanaPath } from '@kbn/plugin-helpers';
|
||||
const { FieldFormat } = require(resolveKibanaPath('src/ui/field_formats/field_format.js'));
|
||||
const { FieldFormatsService } = require(resolveKibanaPath('src/ui/field_formats/field_formats_service.js'));
|
||||
const { createBytesFormat } = require(resolveKibanaPath('src/core_plugins/kibana/common/field_formats/types/bytes.js'));
|
||||
const { createNumberFormat } = require(resolveKibanaPath('src/core_plugins/kibana/common/field_formats/types/number.js'));
|
||||
|
||||
describe('field format map', function () {
|
||||
const indexPatternSavedObject = {
|
||||
|
|
|
@ -4,15 +4,14 @@
|
|||
* you may not use this file except in compliance with the Elastic License.
|
||||
*/
|
||||
|
||||
import { resolveKibanaPath } from '@kbn/plugin-helpers';
|
||||
import { SupertestWithoutAuthProvider } from './services';
|
||||
|
||||
export default async function ({ readConfigFile }) {
|
||||
|
||||
// Read the Kibana API integration tests config file so that we can utilize its services.
|
||||
const kibanaAPITestsConfig = await readConfigFile(resolveKibanaPath('test/api_integration/config.js'));
|
||||
const kibanaAPITestsConfig = await readConfigFile(require.resolve('../../../test/api_integration/config.js'));
|
||||
const xPackFunctionalTestsConfig = await readConfigFile(require.resolve('../functional/config.js'));
|
||||
const kibanaFunctionalConfig = await readConfigFile(resolveKibanaPath('test/functional/config.js'));
|
||||
const kibanaFunctionalConfig = await readConfigFile(require.resolve('../../../test/functional/config.js'));
|
||||
|
||||
return {
|
||||
testFiles: [require.resolve('./apis')],
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
/* eslint-disable kibana-custom/no-default-export */
|
||||
|
||||
import { resolve } from 'path';
|
||||
import { resolveKibanaPath } from '@kbn/plugin-helpers';
|
||||
|
||||
import {
|
||||
SecurityPageProvider,
|
||||
|
@ -55,8 +54,8 @@ export default async function ({ readConfigFile }) {
|
|||
|
||||
// read the Kibana config file so that we can utilize some of
|
||||
// its services and PageObjects
|
||||
const kibanaConfig = await readConfigFile(resolveKibanaPath('test/functional/config.js'));
|
||||
const kibanaAPITestsConfig = await readConfigFile(resolveKibanaPath('test/api_integration/config.js'));
|
||||
const kibanaConfig = await readConfigFile(require.resolve('../../../test/functional/config.js'));
|
||||
const kibanaAPITestsConfig = await readConfigFile(require.resolve('../../../test/api_integration/config.js'));
|
||||
|
||||
return {
|
||||
// list paths to the files that contain your plugins tests
|
||||
|
|
|
@ -4,11 +4,9 @@
|
|||
* you may not use this file except in compliance with the Elastic License.
|
||||
*/
|
||||
|
||||
import { resolveKibanaPath } from '@kbn/plugin-helpers/lib/index';
|
||||
|
||||
export default async function ({ readConfigFile }) {
|
||||
// Read the Kibana API integration tests config file so that we can utilize its services.
|
||||
const kibanaAPITestsConfig = await readConfigFile(resolveKibanaPath('test/api_integration/config.js'));
|
||||
const kibanaAPITestsConfig = await readConfigFile(require.resolve('../../../test/api_integration/config.js'));
|
||||
const xPackAPITestsConfig = await readConfigFile(require.resolve('../api_integration/config.js'));
|
||||
|
||||
return {
|
||||
|
|
|
@ -12,7 +12,6 @@ import zlib from 'zlib';
|
|||
import { promisify } from 'bluebird';
|
||||
import { parseString } from 'xml2js';
|
||||
import { SignedXml } from 'xml-crypto';
|
||||
import { resolveKibanaPath } from '@kbn/plugin-helpers';
|
||||
|
||||
/**
|
||||
* @file Defines a set of tools that allow us to parse and generate various SAML XML messages.
|
||||
|
@ -25,7 +24,7 @@ const inflateRawAsync = promisify(zlib.inflateRaw);
|
|||
const deflateRawAsync = promisify(zlib.deflateRaw);
|
||||
const parseStringAsync = promisify(parseString);
|
||||
|
||||
const signingKey = fs.readFileSync(resolveKibanaPath('test/dev_certs/server.key'));
|
||||
const signingKey = fs.readFileSync(require.resolve('../../../../test/dev_certs/server.key'));
|
||||
const signatureAlgorithm = 'http://www.w3.org/2001/04/xmldsig-more#rsa-sha256';
|
||||
|
||||
export async function getSAMLRequestId(urlWithSAMLRequestId) {
|
||||
|
|
Loading…
Reference in a new issue