diff --git a/.eslintrc.js b/.eslintrc.js index 4b31765c35179..bc05f9b2648bf 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -31,6 +31,7 @@ module.exports = { 'packages/kbn-es/**/*', 'packages/kbn-datemath/**/*.js', 'packages/kbn-plugin-generator/**/*', + 'packages/kbn-test/**/*', 'packages/kbn-eslint-import-resolver-kibana/**/*', 'x-pack/plugins/apm/**/*', ], diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 0bd7c3e7ecce3..ad505ae22468a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -355,6 +355,7 @@ yarn test:browser --dev # remove the --dev flag to run them once and close [Read about the `FunctionalTestRunner`](https://www.elastic.co/guide/en/kibana/current/development-functional-tests.html) to learn more about how you can run and develop functional tests for Kibana core and plugins. +You can also look into the [Scripts README.md](./scripts/README.md) to learn more about using the node scripts we provide for building Kibana, running integration tests, and starting up Kibana and Elasticsearch while you develop. ### Building OS packages diff --git a/package.json b/package.json index cf0752f75b673..09706d810b8de 100644 --- a/package.json +++ b/package.json @@ -224,6 +224,7 @@ "@kbn/eslint-import-resolver-kibana": "link:packages/kbn-eslint-import-resolver-kibana", "@kbn/eslint-plugin-license-header": "link:packages/kbn-eslint-plugin-license-header", "@kbn/plugin-generator": "link:packages/kbn-plugin-generator", + "@kbn/test": "link:packages/kbn-test", "angular-mocks": "1.4.7", "babel-eslint": "8.1.2", "babel-jest": "^22.4.3", diff --git a/packages/kbn-dev-utils/src/proc_runner/proc.js b/packages/kbn-dev-utils/src/proc_runner/proc.js index ef70c0de88561..1424a2a64657c 100644 --- a/packages/kbn-dev-utils/src/proc_runner/proc.js +++ b/packages/kbn-dev-utils/src/proc_runner/proc.js @@ -78,7 +78,7 @@ export function createProc(name, { cmd, args, cwd, env, stdin, log }) { .map(code => { // JVM exits with 143 on SIGTERM and 130 on SIGINT, dont' treat then as errors if (code > 0 && !(code === 143 || code === 130)) { - throw createCliError(`[${name}] exitted with code ${code}`); + throw createCliError(`[${name}] exited with code ${code}`); } return code; diff --git a/packages/kbn-dev-utils/src/proc_runner/proc_runner.js b/packages/kbn-dev-utils/src/proc_runner/proc_runner.js index b865da8a10fb5..6b437552a48b3 100644 --- a/packages/kbn-dev-utils/src/proc_runner/proc_runner.js +++ b/packages/kbn-dev-utils/src/proc_runner/proc_runner.js @@ -76,7 +76,9 @@ export class ProcRunner { .first() .catch(err => { if (err.name !== 'EmptyError') { - throw createCliError(`[${name}] exitted without matching pattern: ${wait}`); + throw createCliError( + `[${name}] exited without matching pattern: ${wait}` + ); } else { throw err; } @@ -171,7 +173,12 @@ export class ProcRunner { proc.outcome$.subscribe({ next: (code) => { const duration = moment.duration(Date.now() - startMs); - this._log.info('[%s] exitted with %s after %s', name, code, duration.humanize()); + this._log.info( + '[%s] exited with %s after %s', + name, + code, + duration.humanize() + ); }, complete: () => { remove(); diff --git a/packages/kbn-test/.babelrc b/packages/kbn-test/.babelrc new file mode 100644 index 0000000000000..7da72d1779128 --- /dev/null +++ b/packages/kbn-test/.babelrc @@ -0,0 +1,3 @@ +{ + "presets": ["@kbn/babel-preset/node_preset"] +} diff --git a/packages/kbn-test/README.md b/packages/kbn-test/README.md new file mode 100644 index 0000000000000..3159e5c2492b4 --- /dev/null +++ b/packages/kbn-test/README.md @@ -0,0 +1,39 @@ +Kibana Testing Library +====================== + +The @kbn/test package provides ways to run tests. Currently only functional testing is provided by this library, with unit and other testing possibly added here. + +Functional Testing +------------------- + +### Dependencies + +Functional testing methods exist in the `src/functional_tests` directory. They depend on the Functional Test Runner, which is found in [`{KIBANA_ROOT}/src/functional_test_runner`](../../src/functional_test_runner). Ideally libraries provided by kibana packages such as this one should not depend on kibana source code that lives in [`{KIBANA_ROOT}/src`](../../src). The goal is to start pulling test and development utilities out into packages so they can be used across Kibana and plugins. Accordingly the Functional Test Runner itself will be pulled out into a package (or part of a package), and this package's dependence on it will not be an issue. + +### Exposed methods + +#### runTests(configPaths: Array) +For each config file specified in configPaths, starts Elasticsearch and Kibana once, runs tests specified in that config file, and shuts down Elasticsearch and Kibana once completed. (Repeats for every config file.) + +`configPaths`: array of strings, each an absolute path to a config file that looks like [this](../../test/functional/config.js), following the config schema specified [here](../../src/functional_test_runner/lib/config/schema.js). + +Internally the method that starts Elasticsearch comes from [kbn-es](../../packages/kbn-es). + +#### startServers(configPath: string) +Starts Elasticsearch and Kibana servers given a specified config. + +`configPath`: absolute path to a config file that looks like [this](../../test/functional/config.js), following the config schema specified [here](../../src/functional_test_runner/lib/config/schema.js). + +Allows users to start another process to run just the tests while keeping the servers running with this method. Start servers _and_ run tests using the same config file ([see how](../../scripts/README.md)). + +## Rationale + +### Single config per setup + +We think it makes sense to specify the tests to run along with the particular server configuration for Elasticsearch and Kibana servers, because the tests expect a particular configuration. For example, saml api integration tests expect certain xml files to exist in Elasticsearch's config directory, and certain saml specific options to be passed in via the command line (or alternatively via the `.yml` config file) to both Elasticsearch and Kibana. It makes sense to keep all these config options together with the list of test files. + +### Multiple configs running in succession + +We also think it makes sense to have a test runner intelligently (but simply) start servers, run tests, tear down servers, and repeat for each config, uninterrupted. There's nothing special about each kind of config that specifies running some set of functional tests against some kind of Elasticsearch/Kibana servers. There doesn't need to be a separate job to run each kind of setup/test/teardown. These can all be orchestrated sequentially via the current `runTests` implementation. This is how we envision tests to run on CI. + +This inherently means that grouping test files in configs matters, such that a group of test files that depends on a particular server config appears together in that config's `testFiles` list. Given how quickly and easily we can start servers using [@kbn/es](../../packages/kbn-es), it should not impact performance to logically group tests by domain even if multiple groups of tests share the same server config. We can think about how to group test files together across domains when that time comes. diff --git a/packages/kbn-test/package.json b/packages/kbn-test/package.json new file mode 100644 index 0000000000000..33322774cfd29 --- /dev/null +++ b/packages/kbn-test/package.json @@ -0,0 +1,27 @@ +{ + "name": "@kbn/test", + "main": "./target/index.js", + "version": "1.0.0", + "license": "Apache-2.0", + "private": true, + "scripts": { + "build": "babel src --out-dir target", + "kbn:bootstrap": "yarn build", + "kbn:watch": "yarn build --watch" + }, + "devDependencies": { + "@kbn/babel-preset": "link:../kbn-babel-preset", + "@kbn/dev-utils": "link:../kbn-dev-utils", + "babel-cli": "^6.26.0" + }, + "dependencies": { + "chalk": "^2.4.1", + "dedent": "^0.7.0", + "getopts": "^2.0.6", + "glob": "^7.1.2", + "rxjs": "^5.4.3", + "tar-fs": "^1.16.2", + "tmp": "^0.0.33", + "zlib": "^1.0.5" + } +} diff --git a/src/test_utils/es/es_test_cluster.js b/packages/kbn-test/src/es/es_test_cluster.js similarity index 83% rename from src/test_utils/es/es_test_cluster.js rename to packages/kbn-test/src/es/es_test_cluster.js index d3eaedc5720e5..ce3c0b1ea19ab 100644 --- a/src/test_utils/es/es_test_cluster.js +++ b/packages/kbn-test/src/es/es_test_cluster.js @@ -1,27 +1,32 @@ import { resolve } from 'path'; -import { get } from 'lodash'; import { format } from 'url'; -import elasticsearch from 'elasticsearch'; +import { get } from 'lodash'; import toPath from 'lodash/internal/toPath'; import { Cluster } from '@kbn/es'; import { esTestConfig } from './es_test_config'; import { rmrfSync } from './rmrf_sync'; +import { KIBANA_ROOT } from '../'; +import elasticsearch from 'elasticsearch'; -export function createTestCluster(options = {}) { +export function createEsTestCluster(options = {}) { const { port = esTestConfig.getPort(), password = 'changeme', license = 'oss', log, - basePath = resolve(__dirname, '../../../.es'), + basePath = resolve(KIBANA_ROOT, '.es'), + // Use source when running on CI + from = esTestConfig.getBuildFrom(), } = options; - const randomHash = Math.random().toString(36).substring(2); + const randomHash = Math.random() + .toString(36) + .substring(2); const clusterName = `test-${randomHash}`; const config = { version: esTestConfig.getVersion(), installPath: resolve(basePath, clusterName), - sourcePath: resolve(__dirname, '../../../../elasticsearch'), + sourcePath: resolve(KIBANA_ROOT, '../elasticsearch'), password, license, basePath, @@ -29,9 +34,6 @@ export function createTestCluster(options = {}) { const cluster = new Cluster(log); - // Use source when running on CI - const from = options.from || esTestConfig.getBuildFrom(); - return new class EsTestCluster { getStartTimeout() { const second = 1000; @@ -51,18 +53,20 @@ export function createTestCluster(options = {}) { `cluster.name=${clusterName}`, `http.port=${port}`, `discovery.zen.ping.unicast.hosts=localhost:${port}`, - ...esArgs + ...esArgs, ], }); } async stop() { await cluster.stop(); + log.info('[es] stopped'); } async cleanup() { await this.stop(); rmrfSync(config.installPath); + log.info('[es] cleanup complete'); } /** @@ -84,7 +88,7 @@ export function createTestCluster(options = {}) { return format(parts); } - }; + }(); } /** diff --git a/src/test_utils/es/es_test_config.js b/packages/kbn-test/src/es/es_test_config.js similarity index 74% rename from src/test_utils/es/es_test_config.js rename to packages/kbn-test/src/es/es_test_config.js index 46a3cd63be20f..83082e0a6e949 100644 --- a/src/test_utils/es/es_test_config.js +++ b/packages/kbn-test/src/es/es_test_config.js @@ -1,6 +1,6 @@ -import url, { format as formatUrl } from 'url'; -import pkg from '../../../package.json'; -import { admin } from '../../../test/shield'; +import url, { format as formatUrl } from 'url'; +import pkg from '../../../../package.json'; +import { adminTestUser } from '../kbn'; export const esTestConfig = new class EsTestConfig { getVersion() { @@ -30,15 +30,15 @@ export const esTestConfig = new class EsTestConfig { port: parseInt(testEsUrl.port, 10), username: testEsUrl.auth.split(':')[0], password: testEsUrl.auth.split(':')[1], - auth: testEsUrl.auth + auth: testEsUrl.auth, }; } - const username = process.env.TEST_KIBANA_USERNAME || admin.username; - const password = process.env.TEST_KIBANA_PASSWORD || admin.password; + const username = process.env.TEST_KIBANA_USERNAME || adminTestUser.username; + const password = process.env.TEST_KIBANA_PASSWORD || adminTestUser.password; return { // Allow setting any individual component(s) of the URL, - // or use default values (username and password from shield.js) + // or use default values (username and password from ../kbn/users.js) protocol: process.env.TEST_ES_PROTOCOL || 'http', hostname: process.env.TEST_ES_HOSTNAME || 'localhost', port: parseInt(process.env.TEST_ES_PORT, 10) || 9220, @@ -46,6 +46,5 @@ export const esTestConfig = new class EsTestConfig { username: username, password: password, }; - } -}; +}(); diff --git a/packages/kbn-test/src/es/index.js b/packages/kbn-test/src/es/index.js new file mode 100644 index 0000000000000..536a265f1ea9e --- /dev/null +++ b/packages/kbn-test/src/es/index.js @@ -0,0 +1,2 @@ +export { createEsTestCluster } from './es_test_cluster.js'; +export { esTestConfig } from './es_test_config'; diff --git a/src/test_utils/es/rmrf_sync.js b/packages/kbn-test/src/es/rmrf_sync.js similarity index 99% rename from src/test_utils/es/rmrf_sync.js rename to packages/kbn-test/src/es/rmrf_sync.js index c1e724e0e8341..0db4e9eb943fd 100644 --- a/src/test_utils/es/rmrf_sync.js +++ b/packages/kbn-test/src/es/rmrf_sync.js @@ -18,4 +18,4 @@ export function rmrfSync(path) { }); fs.rmdirSync(path); } -} \ No newline at end of file +} diff --git a/packages/kbn-test/src/functional_tests/cli/index.js b/packages/kbn-test/src/functional_tests/cli/index.js new file mode 100644 index 0000000000000..e04bc130ca19c --- /dev/null +++ b/packages/kbn-test/src/functional_tests/cli/index.js @@ -0,0 +1,2 @@ +export { runTestsCli } from './run_tests_cli'; +export { startServersCli } from './start_servers_cli'; diff --git a/packages/kbn-test/src/functional_tests/cli/run_tests_cli.js b/packages/kbn-test/src/functional_tests/cli/run_tests_cli.js new file mode 100644 index 0000000000000..e77b07a5a1b6c --- /dev/null +++ b/packages/kbn-test/src/functional_tests/cli/run_tests_cli.js @@ -0,0 +1,78 @@ +import dedent from 'dedent'; +import getopts from 'getopts'; +import { createToolingLog, pickLevelFromFlags } from '@kbn/dev-utils'; +import { runTests } from '../../'; + +/** + * Run servers and tests for each config + * Only cares about --config option. Other options + * are passed directly to functional_test_runner, such as + * --bail, --verbose, etc. + * @param {string[]} defaultConfigPaths Array of paths to configs to use + * if no config option is passed + */ +export async function runTestsCli(defaultConfigPaths) { + const { configs, help, bail, log } = processArgs(defaultConfigPaths); + + if (help) return displayHelp(); + + if (!configs || configs.length === 0) { + log.error( + `Run Tests requires at least one path to a config. Leave blank to use defaults.` + ); + process.exit(9); + } + + try { + await runTests(configs, { bail, log }); + } catch (err) { + log.error('FATAL ERROR'); + log.error(err); + process.exit(1); + } +} + +function processArgs(defaultConfigPaths) { + // If no args are passed, use {} + const options = getopts(process.argv.slice(2)) || {}; + + // If --config is passed without paths, it's "true", so use default + const configs = + typeof options.config === 'string' || Array.isArray(options.config) + ? [].concat(options.config) + : defaultConfigPaths; + + const log = createToolingLog(pickLevelFromFlags(options)); + log.pipe(process.stdout); + + return { + configs, + log, + help: options.help, + bail: options.bail, + rest: options._, + }; +} + +function displayHelp() { + console.log( + dedent(` + Run Functional Tests + + Usage: node scripts/functional_tests [options] + + --config Option to pass in a config + Can pass in multiple configs with + --config file1 --config file2 --config file3 + --bail Stop the test run at the first failure + --help Display this menu and exit + + Log level options: + + --verbose + --debug + --quiet Log errors + --silent + `) + ); +} diff --git a/packages/kbn-test/src/functional_tests/cli/start_servers_cli.js b/packages/kbn-test/src/functional_tests/cli/start_servers_cli.js new file mode 100644 index 0000000000000..b1621a0958075 --- /dev/null +++ b/packages/kbn-test/src/functional_tests/cli/start_servers_cli.js @@ -0,0 +1,76 @@ +import chalk from 'chalk'; +import dedent from 'dedent'; +import getopts from 'getopts'; +import { createToolingLog, pickLevelFromFlags } from '@kbn/dev-utils'; +import { startServers } from '../../'; + +/** + * Start servers + * @param {string} configPath path to config + */ +export async function startServersCli(defaultConfigPath) { + const { config, log, help } = processArgv(defaultConfigPath); + + if (help) return displayHelp(); + + if (!config) { + log.error( + `Start Servers requires one path to a config. Leave blank to use default.` + ); + process.exit(1); + } + + try { + await startServers(config, { log }); + } catch (err) { + log.error('FATAL ERROR'); + log.error(err); + process.exit(1); + } +} + +function processArgv(defaultConfigPath) { + const options = getopts(process.argv.slice(2)) || {}; + + if (Array.isArray(options.config)) { + console.log( + chalk.red( + `Starting servers requires a single config path. Multiple were passed.` + ) + ); + process.exit(9); + } + + const config = + typeof options.config === 'string' ? options.config : defaultConfigPath; + + const log = createToolingLog(pickLevelFromFlags(options)); + log.pipe(process.stdout); + + return { + config, + log, + help: options.help, + rest: options._, + }; +} + +function displayHelp() { + console.log( + dedent(` + Start Functional Test Servers + + Usage: node scripts/functional_tests_server [options] + + --config Option to pass in a config + --help Display this menu and exit + + Log level options: + + --verbose + --debug + --quiet Log errors + --silent + `) + ); +} diff --git a/x-pack/dev-tools/functional_tests/lib/auth.js b/packages/kbn-test/src/functional_tests/lib/auth.js similarity index 61% rename from x-pack/dev-tools/functional_tests/lib/auth.js rename to packages/kbn-test/src/functional_tests/lib/auth.js index 8c456dd8c5985..cecdeb339c616 100644 --- a/x-pack/dev-tools/functional_tests/lib/auth.js +++ b/packages/kbn-test/src/functional_tests/lib/auth.js @@ -12,20 +12,25 @@ import { delay, fromNode as fcb } from 'bluebird'; export const DEFAULT_SUPERUSER_PASS = 'iamsuperuser'; async function updateCredentials(port, auth, username, password, retries = 10) { - const result = await fcb(cb => request({ - method: 'PUT', - uri: formatUrl({ - protocol: 'http:', - auth, - hostname: 'localhost', - port, - pathname: `/_xpack/security/user/${username}/_password`, - }), - json: true, - body: { password } - }, (err, httpResponse, body) => { - cb(err, { httpResponse, body }); - })); + const result = await fcb(cb => + request( + { + method: 'PUT', + uri: formatUrl({ + protocol: 'http:', + auth, + hostname: 'localhost', + port, + pathname: `/_xpack/security/user/${username}/_password`, + }), + json: true, + body: { password }, + }, + (err, httpResponse, body) => { + cb(err, { httpResponse, body }); + } + ) + ); const { body, httpResponse } = result; const { statusCode } = httpResponse; @@ -38,20 +43,22 @@ async function updateCredentials(port, auth, username, password, retries = 10) { return await updateCredentials(port, auth, username, password, retries - 1); } - throw new Error(`${statusCode} response, expected 200 -- ${JSON.stringify(body)}`); + throw new Error( + `${statusCode} response, expected 200 -- ${JSON.stringify(body)}` + ); } -export async function setupUsers(log, ftrConfig) { - const esPort = ftrConfig.get('servers.elasticsearch.port'); +export async function setupUsers(log, config) { + const esPort = config.get('servers.elasticsearch.port'); // track the current credentials for the `elastic` user as // they will likely change as we apply updates - let auth = 'elastic:iamsuperuser'; + let auth = `elastic:${DEFAULT_SUPERUSER_PASS}`; // list of updates we need to apply const updates = [ - ftrConfig.get('servers.elasticsearch'), - ftrConfig.get('servers.kibana'), + config.get('servers.elasticsearch'), + config.get('servers.kibana'), ]; for (const { username, password } of updates) { diff --git a/packages/kbn-test/src/functional_tests/lib/index.js b/packages/kbn-test/src/functional_tests/lib/index.js new file mode 100644 index 0000000000000..6b7cbd315ad54 --- /dev/null +++ b/packages/kbn-test/src/functional_tests/lib/index.js @@ -0,0 +1,9 @@ +export { runKibanaServer } from './run_kibana_server'; +export { runElasticsearch } from './run_elasticsearch'; +export { runFtr } from './run_ftr'; +export { + KIBANA_ROOT, + KIBANA_FTR_SCRIPT, + FUNCTIONAL_CONFIG_PATH, + API_CONFIG_PATH, +} from './paths'; diff --git a/packages/kbn-test/src/functional_tests/lib/paths.js b/packages/kbn-test/src/functional_tests/lib/paths.js new file mode 100644 index 0000000000000..1c7573c46457c --- /dev/null +++ b/packages/kbn-test/src/functional_tests/lib/paths.js @@ -0,0 +1,25 @@ +import { resolve, relative } from 'path'; + +// resolve() treats relative paths as relative to process.cwd(), +// so to return a relative path we use relative() +function resolveRelative(path) { + return relative(process.cwd(), resolve(path)); +} + +export const KIBANA_EXEC = 'node'; +export const KIBANA_EXEC_PATH = resolveRelative('scripts/kibana'); +export const KIBANA_ROOT = resolve(__dirname, '../../../../../'); +export const KIBANA_FTR_SCRIPT = resolve( + KIBANA_ROOT, + 'scripts/functional_test_runner' +); +export const PROJECT_ROOT = resolve(__dirname, '../../../../../../'); +export const FUNCTIONAL_CONFIG_PATH = resolve( + KIBANA_ROOT, + 'test/functional/config' +); +export const API_CONFIG_PATH = resolve( + KIBANA_ROOT, + 'test/api_integration/config' +); +export const OPTIMIZE_BUNDLE_DIR = resolve(KIBANA_ROOT, 'optimize/bundles'); diff --git a/packages/kbn-test/src/functional_tests/lib/run_elasticsearch.js b/packages/kbn-test/src/functional_tests/lib/run_elasticsearch.js new file mode 100644 index 0000000000000..4aa643e3a8cda --- /dev/null +++ b/packages/kbn-test/src/functional_tests/lib/run_elasticsearch.js @@ -0,0 +1,30 @@ +import { resolve } from 'path'; +import { KIBANA_ROOT } from './paths'; +import { createEsTestCluster } from '../../es'; + +import { setupUsers, DEFAULT_SUPERUSER_PASS } from './auth'; + +export async function runElasticsearch({ config, log }) { + const isOss = config.get('esTestCluster.license') === 'oss'; + + const cluster = createEsTestCluster({ + port: config.get('servers.elasticsearch.port'), + password: !isOss + ? DEFAULT_SUPERUSER_PASS + : config.get('servers.elasticsearch.password'), + license: config.get('esTestCluster.license'), + log, + basePath: resolve(KIBANA_ROOT, '.es'), + from: config.get('esTestCluster.from'), + }); + + const esArgs = config.get('esTestCluster.serverArgs'); + + await cluster.start(esArgs); + + if (!isOss) { + await setupUsers(log, config); + } + + return cluster; +} diff --git a/packages/kbn-test/src/functional_tests/lib/run_ftr.js b/packages/kbn-test/src/functional_tests/lib/run_ftr.js new file mode 100644 index 0000000000000..4892e18374918 --- /dev/null +++ b/packages/kbn-test/src/functional_tests/lib/run_ftr.js @@ -0,0 +1,29 @@ +import { KIBANA_FTR_SCRIPT, PROJECT_ROOT } from './paths'; + +export async function runFtr({ + procs, + configPath, + bail, + log, + cwd = PROJECT_ROOT, +}) { + const args = [KIBANA_FTR_SCRIPT]; + + if (getLogFlag(log)) args.push(`--${getLogFlag(log)}`); + if (bail) args.push('--bail'); + if (configPath) args.push('--config', configPath); + + await procs.run('ftr', { + cmd: 'node', + args, + cwd, + wait: true, + }); +} + +function getLogFlag(log) { + const level = log.getLevel(); + + if (level === 'info') return null; + return level === 'error' ? 'quiet' : level; +} diff --git a/packages/kbn-test/src/functional_tests/lib/run_kibana_server.js b/packages/kbn-test/src/functional_tests/lib/run_kibana_server.js new file mode 100644 index 0000000000000..5b747bf9d8be2 --- /dev/null +++ b/packages/kbn-test/src/functional_tests/lib/run_kibana_server.js @@ -0,0 +1,17 @@ +import { KIBANA_ROOT, KIBANA_EXEC, KIBANA_EXEC_PATH } from './paths'; + +export async function runKibanaServer({ procs, config }) { + const cliArgs = config.get('kibanaServerArgs') || []; + + // start the kibana server and wait for it to log "Server running" before resolving + await procs.run('kibana', { + cmd: KIBANA_EXEC, + args: [KIBANA_EXEC_PATH, ...cliArgs], + env: { + FORCE_COLOR: 1, + ...process.env, + }, + cwd: KIBANA_ROOT, + wait: /Server running/, + }); +} diff --git a/packages/kbn-test/src/functional_tests/tasks.js b/packages/kbn-test/src/functional_tests/tasks.js new file mode 100644 index 0000000000000..9d83734ee482d --- /dev/null +++ b/packages/kbn-test/src/functional_tests/tasks.js @@ -0,0 +1,90 @@ +import { relative, resolve } from 'path'; +import Rx from 'rxjs/Rx'; +import { withProcRunner } from '@kbn/dev-utils'; + +import { + runElasticsearch, + runKibanaServer, + runFtr, + KIBANA_FTR_SCRIPT, +} from './lib'; + +import { readConfigFile } from '../../../../src/functional_test_runner/lib'; + +const SUCCESS_MESSAGE = ` + +Elasticsearch and Kibana are ready for functional testing. Start the functional tests +in another terminal session by running this command from this directory: + + node ${relative(process.cwd(), KIBANA_FTR_SCRIPT)} + +`; + +/** + * Run servers and tests for each config + * @param {string[]} configPaths Array of paths to configs + * @param {boolean} bail Whether to exit test run at the first failure + * @param {Log} log Optional logger + */ +export async function runTests(configPaths, { bail, log }) { + for (const configPath of configPaths) { + await runSingleConfig(resolve(process.cwd(), configPath), { bail, log }); + } +} + +/** + * Start only servers using single config + * @param {string} configPath Path to a config file + * @param {Log} log Optional logger + */ +export async function startServers(configPath, { log }) { + configPath = resolve(process.cwd(), configPath); + + await withProcRunner(log, async procs => { + const config = await readConfigFile(log, configPath); + + const es = await runElasticsearch({ config, log }); + await runKibanaServer({ procs, config, log }); + + // wait for 5 seconds of silence before logging the + // success message so that it doesn't get buried + await silence(5000, { log }); + log.info(SUCCESS_MESSAGE); + + await procs.waitForAllToStop(); + await es.cleanup(); + }); +} + +async function silence(milliseconds, { log }) { + await Rx.Observable.fromEvent(log, 'data') + .startWith(null) + .switchMap(() => Rx.Observable.timer(milliseconds)) + .take(1) + .toPromise(); +} + +/* + * Start servers and run tests for single config + */ +async function runSingleConfig(configPath, { bail, log }) { + await withProcRunner(log, async procs => { + const config = await readConfigFile(log, configPath); + + const es = await runElasticsearch({ config, log }); + await runKibanaServer({ procs, config }); + + // Note: When solving how to incorporate functional_test_runner + // clean this up + await runFtr({ + procs, + configPath, + bail, + log, + cwd: process.cwd(), + }); + + await procs.stop('kibana'); + await es.cleanup(); + }); +} diff --git a/packages/kbn-test/src/index.js b/packages/kbn-test/src/index.js new file mode 100644 index 0000000000000..e465b9744f4b0 --- /dev/null +++ b/packages/kbn-test/src/index.js @@ -0,0 +1,14 @@ +export { runTestsCli, startServersCli } from './functional_tests/cli'; + +export { runTests, startServers } from './functional_tests/tasks'; + +export { OPTIMIZE_BUNDLE_DIR, KIBANA_ROOT } from './functional_tests/lib/paths'; + +export { esTestConfig, createEsTestCluster } from './es'; + +export { + kbnTestConfig, + kibanaServerTestUser, + kibanaTestUser, + adminTestUser, +} from './kbn'; diff --git a/packages/kbn-test/src/kbn/index.js b/packages/kbn-test/src/kbn/index.js new file mode 100644 index 0000000000000..09828b72a7b5d --- /dev/null +++ b/packages/kbn-test/src/kbn/index.js @@ -0,0 +1,2 @@ +export { kbnTestConfig } from './kbn_test_config'; +export { kibanaTestUser, kibanaServerTestUser, adminTestUser } from './users'; diff --git a/packages/kbn-test/src/kbn/kbn_test_config.js b/packages/kbn-test/src/kbn/kbn_test_config.js new file mode 100644 index 0000000000000..dbfc594cbafb4 --- /dev/null +++ b/packages/kbn-test/src/kbn/kbn_test_config.js @@ -0,0 +1,36 @@ +import { kibanaTestUser } from './users'; +import url from 'url'; + +export const kbnTestConfig = new class KbnTestConfig { + getPort() { + return this.getUrlParts().port; + } + + getUrlParts() { + // allow setting one complete TEST_KIBANA_URL for ES like https://elastic:changeme@example.com:9200 + if (process.env.TEST_KIBANA_URL) { + const testKibanaUrl = url.parse(process.env.TEST_KIBANA_URL); + return { + protocol: testKibanaUrl.protocol.slice(0, -1), + hostname: testKibanaUrl.hostname, + port: parseInt(testKibanaUrl.port, 10), + auth: testKibanaUrl.auth, + username: testKibanaUrl.auth.split(':')[0], + password: testKibanaUrl.auth.split(':')[1], + }; + } + + const username = + process.env.TEST_KIBANA_USERNAME || kibanaTestUser.username; + const password = + process.env.TEST_KIBANA_PASSWORD || kibanaTestUser.password; + return { + protocol: process.env.TEST_KIBANA_PROTOCOL || 'http', + hostname: process.env.TEST_KIBANA_HOSTNAME || 'localhost', + port: parseInt(process.env.TEST_KIBANA_PORT, 10) || 5620, + auth: `${username}:${password}`, + username, + password, + }; + } +}(); diff --git a/packages/kbn-test/src/kbn/users.js b/packages/kbn-test/src/kbn/users.js new file mode 100644 index 0000000000000..8af19fa97c2d3 --- /dev/null +++ b/packages/kbn-test/src/kbn/users.js @@ -0,0 +1,16 @@ +const env = process.env; + +export const kibanaTestUser = { + username: env.TEST_KIBANA_USER || 'elastic', + password: env.TEST_KIBANA_PASS || 'changeme', +}; + +export const kibanaServerTestUser = { + username: env.TEST_KIBANA_SERVER_USER || 'kibana', + password: env.TEST_KIBANA_SERVER_PASS || 'changeme', +}; + +export const adminTestUser = { + username: env.TEST_ES_USER || 'elastic', + password: env.TEST_ES_PASS || 'changeme', +}; diff --git a/packages/kbn-test/yarn.lock b/packages/kbn-test/yarn.lock new file mode 100644 index 0000000000000..4cef430f3ffd6 --- /dev/null +++ b/packages/kbn-test/yarn.lock @@ -0,0 +1,1685 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@kbn/babel-preset@link:../kbn-babel-preset": + version "0.0.0" + uid "" + +"@kbn/dev-utils@link:../kbn-dev-utils": + version "0.0.0" + uid "" + +abbrev@1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" + +ansi-regex@^2.0.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" + +ansi-styles@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" + +ansi-styles@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" + dependencies: + color-convert "^1.9.0" + +anymatch@^1.3.0: + version "1.3.2" + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-1.3.2.tgz#553dcb8f91e3c889845dfdba34c77721b90b9d7a" + dependencies: + micromatch "^2.1.5" + normalize-path "^2.0.0" + +aproba@^1.0.3: + version "1.2.0" + resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a" + +are-we-there-yet@~1.1.2: + version "1.1.4" + resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.4.tgz#bb5dca382bb94f05e15194373d16fd3ba1ca110d" + dependencies: + delegates "^1.0.0" + readable-stream "^2.0.6" + +arr-diff@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-2.0.0.tgz#8f3b827f955a8bd669697e4a4256ac3ceae356cf" + dependencies: + arr-flatten "^1.0.1" + +arr-flatten@^1.0.1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.1.0.tgz#36048bbff4e7b47e136644316c99669ea5ae91f1" + +array-unique@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.2.1.tgz#a1d97ccafcbc2625cc70fadceb36a50c58b01a53" + +async-each@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.1.tgz#19d386a1d9edc6e7c1c85d388aedbcc56d33602d" + +babel-cli@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-cli/-/babel-cli-6.26.0.tgz#502ab54874d7db88ad00b887a06383ce03d002f1" + dependencies: + babel-core "^6.26.0" + babel-polyfill "^6.26.0" + babel-register "^6.26.0" + babel-runtime "^6.26.0" + commander "^2.11.0" + convert-source-map "^1.5.0" + fs-readdir-recursive "^1.0.0" + glob "^7.1.2" + lodash "^4.17.4" + output-file-sync "^1.1.2" + path-is-absolute "^1.0.1" + slash "^1.0.0" + source-map "^0.5.6" + v8flags "^2.1.1" + optionalDependencies: + chokidar "^1.6.1" + +babel-code-frame@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b" + dependencies: + chalk "^1.1.3" + esutils "^2.0.2" + js-tokens "^3.0.2" + +babel-core@^6.26.0: + version "6.26.3" + resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-6.26.3.tgz#b2e2f09e342d0f0c88e2f02e067794125e75c207" + dependencies: + babel-code-frame "^6.26.0" + babel-generator "^6.26.0" + babel-helpers "^6.24.1" + babel-messages "^6.23.0" + babel-register "^6.26.0" + babel-runtime "^6.26.0" + babel-template "^6.26.0" + babel-traverse "^6.26.0" + babel-types "^6.26.0" + babylon "^6.18.0" + convert-source-map "^1.5.1" + debug "^2.6.9" + json5 "^0.5.1" + lodash "^4.17.4" + minimatch "^3.0.4" + path-is-absolute "^1.0.1" + private "^0.1.8" + slash "^1.0.0" + source-map "^0.5.7" + +babel-generator@^6.26.0: + version "6.26.1" + resolved "https://registry.yarnpkg.com/babel-generator/-/babel-generator-6.26.1.tgz#1844408d3b8f0d35a404ea7ac180f087a601bd90" + dependencies: + babel-messages "^6.23.0" + babel-runtime "^6.26.0" + babel-types "^6.26.0" + detect-indent "^4.0.0" + jsesc "^1.3.0" + lodash "^4.17.4" + source-map "^0.5.7" + trim-right "^1.0.1" + +babel-helper-builder-binary-assignment-operator-visitor@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-builder-binary-assignment-operator-visitor/-/babel-helper-builder-binary-assignment-operator-visitor-6.24.1.tgz#cce4517ada356f4220bcae8a02c2b346f9a56664" + dependencies: + babel-helper-explode-assignable-expression "^6.24.1" + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-helper-builder-react-jsx@^6.24.1: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-helper-builder-react-jsx/-/babel-helper-builder-react-jsx-6.26.0.tgz#39ff8313b75c8b65dceff1f31d383e0ff2a408a0" + dependencies: + babel-runtime "^6.26.0" + babel-types "^6.26.0" + esutils "^2.0.2" + +babel-helper-call-delegate@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-call-delegate/-/babel-helper-call-delegate-6.24.1.tgz#ece6aacddc76e41c3461f88bfc575bd0daa2df8d" + dependencies: + babel-helper-hoist-variables "^6.24.1" + babel-runtime "^6.22.0" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + +babel-helper-define-map@^6.24.1: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-helper-define-map/-/babel-helper-define-map-6.26.0.tgz#a5f56dab41a25f97ecb498c7ebaca9819f95be5f" + dependencies: + babel-helper-function-name "^6.24.1" + babel-runtime "^6.26.0" + babel-types "^6.26.0" + lodash "^4.17.4" + +babel-helper-explode-assignable-expression@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-explode-assignable-expression/-/babel-helper-explode-assignable-expression-6.24.1.tgz#f25b82cf7dc10433c55f70592d5746400ac22caa" + dependencies: + babel-runtime "^6.22.0" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + +babel-helper-function-name@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-function-name/-/babel-helper-function-name-6.24.1.tgz#d3475b8c03ed98242a25b48351ab18399d3580a9" + dependencies: + babel-helper-get-function-arity "^6.24.1" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + +babel-helper-get-function-arity@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-get-function-arity/-/babel-helper-get-function-arity-6.24.1.tgz#8f7782aa93407c41d3aa50908f89b031b1b6853d" + dependencies: + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-helper-hoist-variables@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-hoist-variables/-/babel-helper-hoist-variables-6.24.1.tgz#1ecb27689c9d25513eadbc9914a73f5408be7a76" + dependencies: + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-helper-optimise-call-expression@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-optimise-call-expression/-/babel-helper-optimise-call-expression-6.24.1.tgz#f7a13427ba9f73f8f4fa993c54a97882d1244257" + dependencies: + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-helper-regex@^6.24.1: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-helper-regex/-/babel-helper-regex-6.26.0.tgz#325c59f902f82f24b74faceed0363954f6495e72" + dependencies: + babel-runtime "^6.26.0" + babel-types "^6.26.0" + lodash "^4.17.4" + +babel-helper-remap-async-to-generator@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-remap-async-to-generator/-/babel-helper-remap-async-to-generator-6.24.1.tgz#5ec581827ad723fecdd381f1c928390676e4551b" + dependencies: + babel-helper-function-name "^6.24.1" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + +babel-helper-replace-supers@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-replace-supers/-/babel-helper-replace-supers-6.24.1.tgz#bf6dbfe43938d17369a213ca8a8bf74b6a90ab1a" + dependencies: + babel-helper-optimise-call-expression "^6.24.1" + babel-messages "^6.23.0" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + +babel-helpers@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helpers/-/babel-helpers-6.24.1.tgz#3471de9caec388e5c850e597e58a26ddf37602b2" + dependencies: + babel-runtime "^6.22.0" + babel-template "^6.24.1" + +babel-messages@^6.23.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-messages/-/babel-messages-6.23.0.tgz#f3cdf4703858035b2a2951c6ec5edf6c62f2630e" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-add-module-exports@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/babel-plugin-add-module-exports/-/babel-plugin-add-module-exports-0.2.1.tgz#9ae9a1f4a8dc67f0cdec4f4aeda1e43a5ff65e25" + +babel-plugin-check-es2015-constants@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-check-es2015-constants/-/babel-plugin-check-es2015-constants-6.22.0.tgz#35157b101426fd2ffd3da3f75c7d1e91835bbf8a" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-syntax-async-functions@^6.8.0: + version "6.13.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-async-functions/-/babel-plugin-syntax-async-functions-6.13.0.tgz#cad9cad1191b5ad634bf30ae0872391e0647be95" + +babel-plugin-syntax-async-generators@^6.5.0: + version "6.13.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-async-generators/-/babel-plugin-syntax-async-generators-6.13.0.tgz#6bc963ebb16eccbae6b92b596eb7f35c342a8b9a" + +babel-plugin-syntax-class-properties@^6.8.0: + version "6.13.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-class-properties/-/babel-plugin-syntax-class-properties-6.13.0.tgz#d7eb23b79a317f8543962c505b827c7d6cac27de" + +babel-plugin-syntax-exponentiation-operator@^6.8.0: + version "6.13.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-exponentiation-operator/-/babel-plugin-syntax-exponentiation-operator-6.13.0.tgz#9ee7e8337290da95288201a6a57f4170317830de" + +babel-plugin-syntax-flow@^6.18.0: + version "6.18.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-flow/-/babel-plugin-syntax-flow-6.18.0.tgz#4c3ab20a2af26aa20cd25995c398c4eb70310c8d" + +babel-plugin-syntax-jsx@^6.3.13, babel-plugin-syntax-jsx@^6.8.0: + version "6.18.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-jsx/-/babel-plugin-syntax-jsx-6.18.0.tgz#0af32a9a6e13ca7a3fd5069e62d7b0f58d0d8946" + +babel-plugin-syntax-object-rest-spread@^6.8.0: + version "6.13.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz#fd6536f2bce13836ffa3a5458c4903a597bb3bf5" + +babel-plugin-syntax-trailing-function-commas@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-trailing-function-commas/-/babel-plugin-syntax-trailing-function-commas-6.22.0.tgz#ba0360937f8d06e40180a43fe0d5616fff532cf3" + +babel-plugin-transform-async-generator-functions@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-async-generator-functions/-/babel-plugin-transform-async-generator-functions-6.24.1.tgz#f058900145fd3e9907a6ddf28da59f215258a5db" + dependencies: + babel-helper-remap-async-to-generator "^6.24.1" + babel-plugin-syntax-async-generators "^6.5.0" + babel-runtime "^6.22.0" + +babel-plugin-transform-async-to-generator@^6.22.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-async-to-generator/-/babel-plugin-transform-async-to-generator-6.24.1.tgz#6536e378aff6cb1d5517ac0e40eb3e9fc8d08761" + dependencies: + babel-helper-remap-async-to-generator "^6.24.1" + babel-plugin-syntax-async-functions "^6.8.0" + babel-runtime "^6.22.0" + +babel-plugin-transform-class-properties@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-class-properties/-/babel-plugin-transform-class-properties-6.24.1.tgz#6a79763ea61d33d36f37b611aa9def81a81b46ac" + dependencies: + babel-helper-function-name "^6.24.1" + babel-plugin-syntax-class-properties "^6.8.0" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + +babel-plugin-transform-define@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-define/-/babel-plugin-transform-define-1.3.0.tgz#94c5f9459c810c738cc7c50cbd44a31829d6f319" + dependencies: + lodash "4.17.4" + traverse "0.6.6" + +babel-plugin-transform-es2015-arrow-functions@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-arrow-functions/-/babel-plugin-transform-es2015-arrow-functions-6.22.0.tgz#452692cb711d5f79dc7f85e440ce41b9f244d221" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-block-scoped-functions@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-block-scoped-functions/-/babel-plugin-transform-es2015-block-scoped-functions-6.22.0.tgz#bbc51b49f964d70cb8d8e0b94e820246ce3a6141" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-block-scoping@^6.23.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-block-scoping/-/babel-plugin-transform-es2015-block-scoping-6.26.0.tgz#d70f5299c1308d05c12f463813b0a09e73b1895f" + dependencies: + babel-runtime "^6.26.0" + babel-template "^6.26.0" + babel-traverse "^6.26.0" + babel-types "^6.26.0" + lodash "^4.17.4" + +babel-plugin-transform-es2015-classes@^6.23.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-classes/-/babel-plugin-transform-es2015-classes-6.24.1.tgz#5a4c58a50c9c9461e564b4b2a3bfabc97a2584db" + dependencies: + babel-helper-define-map "^6.24.1" + babel-helper-function-name "^6.24.1" + babel-helper-optimise-call-expression "^6.24.1" + babel-helper-replace-supers "^6.24.1" + babel-messages "^6.23.0" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + +babel-plugin-transform-es2015-computed-properties@^6.22.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-computed-properties/-/babel-plugin-transform-es2015-computed-properties-6.24.1.tgz#6fe2a8d16895d5634f4cd999b6d3480a308159b3" + dependencies: + babel-runtime "^6.22.0" + babel-template "^6.24.1" + +babel-plugin-transform-es2015-destructuring@^6.23.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-destructuring/-/babel-plugin-transform-es2015-destructuring-6.23.0.tgz#997bb1f1ab967f682d2b0876fe358d60e765c56d" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-duplicate-keys@^6.22.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-duplicate-keys/-/babel-plugin-transform-es2015-duplicate-keys-6.24.1.tgz#73eb3d310ca969e3ef9ec91c53741a6f1576423e" + dependencies: + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-plugin-transform-es2015-for-of@^6.23.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-for-of/-/babel-plugin-transform-es2015-for-of-6.23.0.tgz#f47c95b2b613df1d3ecc2fdb7573623c75248691" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-function-name@^6.22.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-function-name/-/babel-plugin-transform-es2015-function-name-6.24.1.tgz#834c89853bc36b1af0f3a4c5dbaa94fd8eacaa8b" + dependencies: + babel-helper-function-name "^6.24.1" + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-plugin-transform-es2015-literals@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-literals/-/babel-plugin-transform-es2015-literals-6.22.0.tgz#4f54a02d6cd66cf915280019a31d31925377ca2e" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-modules-amd@^6.22.0, babel-plugin-transform-es2015-modules-amd@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-amd/-/babel-plugin-transform-es2015-modules-amd-6.24.1.tgz#3b3e54017239842d6d19c3011c4bd2f00a00d154" + dependencies: + babel-plugin-transform-es2015-modules-commonjs "^6.24.1" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + +babel-plugin-transform-es2015-modules-commonjs@^6.23.0, babel-plugin-transform-es2015-modules-commonjs@^6.24.1: + version "6.26.2" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.26.2.tgz#58a793863a9e7ca870bdc5a881117ffac27db6f3" + dependencies: + babel-plugin-transform-strict-mode "^6.24.1" + babel-runtime "^6.26.0" + babel-template "^6.26.0" + babel-types "^6.26.0" + +babel-plugin-transform-es2015-modules-systemjs@^6.23.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-systemjs/-/babel-plugin-transform-es2015-modules-systemjs-6.24.1.tgz#ff89a142b9119a906195f5f106ecf305d9407d23" + dependencies: + babel-helper-hoist-variables "^6.24.1" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + +babel-plugin-transform-es2015-modules-umd@^6.23.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-umd/-/babel-plugin-transform-es2015-modules-umd-6.24.1.tgz#ac997e6285cd18ed6176adb607d602344ad38468" + dependencies: + babel-plugin-transform-es2015-modules-amd "^6.24.1" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + +babel-plugin-transform-es2015-object-super@^6.22.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-object-super/-/babel-plugin-transform-es2015-object-super-6.24.1.tgz#24cef69ae21cb83a7f8603dad021f572eb278f8d" + dependencies: + babel-helper-replace-supers "^6.24.1" + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-parameters@^6.23.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-parameters/-/babel-plugin-transform-es2015-parameters-6.24.1.tgz#57ac351ab49caf14a97cd13b09f66fdf0a625f2b" + dependencies: + babel-helper-call-delegate "^6.24.1" + babel-helper-get-function-arity "^6.24.1" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + +babel-plugin-transform-es2015-shorthand-properties@^6.22.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-shorthand-properties/-/babel-plugin-transform-es2015-shorthand-properties-6.24.1.tgz#24f875d6721c87661bbd99a4622e51f14de38aa0" + dependencies: + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-plugin-transform-es2015-spread@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-spread/-/babel-plugin-transform-es2015-spread-6.22.0.tgz#d6d68a99f89aedc4536c81a542e8dd9f1746f8d1" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-sticky-regex@^6.22.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-sticky-regex/-/babel-plugin-transform-es2015-sticky-regex-6.24.1.tgz#00c1cdb1aca71112cdf0cf6126c2ed6b457ccdbc" + dependencies: + babel-helper-regex "^6.24.1" + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-plugin-transform-es2015-template-literals@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-template-literals/-/babel-plugin-transform-es2015-template-literals-6.22.0.tgz#a84b3450f7e9f8f1f6839d6d687da84bb1236d8d" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-typeof-symbol@^6.23.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-typeof-symbol/-/babel-plugin-transform-es2015-typeof-symbol-6.23.0.tgz#dec09f1cddff94b52ac73d505c84df59dcceb372" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-unicode-regex@^6.22.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-unicode-regex/-/babel-plugin-transform-es2015-unicode-regex-6.24.1.tgz#d38b12f42ea7323f729387f18a7c5ae1faeb35e9" + dependencies: + babel-helper-regex "^6.24.1" + babel-runtime "^6.22.0" + regexpu-core "^2.0.0" + +babel-plugin-transform-exponentiation-operator@^6.22.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-exponentiation-operator/-/babel-plugin-transform-exponentiation-operator-6.24.1.tgz#2ab0c9c7f3098fa48907772bb813fe41e8de3a0e" + dependencies: + babel-helper-builder-binary-assignment-operator-visitor "^6.24.1" + babel-plugin-syntax-exponentiation-operator "^6.8.0" + babel-runtime "^6.22.0" + +babel-plugin-transform-flow-strip-types@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-flow-strip-types/-/babel-plugin-transform-flow-strip-types-6.22.0.tgz#84cb672935d43714fdc32bce84568d87441cf7cf" + dependencies: + babel-plugin-syntax-flow "^6.18.0" + babel-runtime "^6.22.0" + +babel-plugin-transform-object-rest-spread@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-object-rest-spread/-/babel-plugin-transform-object-rest-spread-6.26.0.tgz#0f36692d50fef6b7e2d4b3ac1478137a963b7b06" + dependencies: + babel-plugin-syntax-object-rest-spread "^6.8.0" + babel-runtime "^6.26.0" + +babel-plugin-transform-react-display-name@^6.23.0: + version "6.25.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-react-display-name/-/babel-plugin-transform-react-display-name-6.25.0.tgz#67e2bf1f1e9c93ab08db96792e05392bf2cc28d1" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-react-jsx-self@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-react-jsx-self/-/babel-plugin-transform-react-jsx-self-6.22.0.tgz#df6d80a9da2612a121e6ddd7558bcbecf06e636e" + dependencies: + babel-plugin-syntax-jsx "^6.8.0" + babel-runtime "^6.22.0" + +babel-plugin-transform-react-jsx-source@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-react-jsx-source/-/babel-plugin-transform-react-jsx-source-6.22.0.tgz#66ac12153f5cd2d17b3c19268f4bf0197f44ecd6" + dependencies: + babel-plugin-syntax-jsx "^6.8.0" + babel-runtime "^6.22.0" + +babel-plugin-transform-react-jsx@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-react-jsx/-/babel-plugin-transform-react-jsx-6.24.1.tgz#840a028e7df460dfc3a2d29f0c0d91f6376e66a3" + dependencies: + babel-helper-builder-react-jsx "^6.24.1" + babel-plugin-syntax-jsx "^6.8.0" + babel-runtime "^6.22.0" + +babel-plugin-transform-regenerator@^6.22.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-regenerator/-/babel-plugin-transform-regenerator-6.26.0.tgz#e0703696fbde27f0a3efcacf8b4dca2f7b3a8f2f" + dependencies: + regenerator-transform "^0.10.0" + +babel-plugin-transform-strict-mode@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.24.1.tgz#d5faf7aa578a65bbe591cf5edae04a0c67020758" + dependencies: + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-polyfill@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-polyfill/-/babel-polyfill-6.26.0.tgz#379937abc67d7895970adc621f284cd966cf2153" + dependencies: + babel-runtime "^6.26.0" + core-js "^2.5.0" + regenerator-runtime "^0.10.5" + +babel-preset-env@1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/babel-preset-env/-/babel-preset-env-1.4.0.tgz#c8e02a3bcc7792f23cded68e0355b9d4c28f0f7a" + dependencies: + babel-plugin-check-es2015-constants "^6.22.0" + babel-plugin-syntax-trailing-function-commas "^6.22.0" + babel-plugin-transform-async-to-generator "^6.22.0" + babel-plugin-transform-es2015-arrow-functions "^6.22.0" + babel-plugin-transform-es2015-block-scoped-functions "^6.22.0" + babel-plugin-transform-es2015-block-scoping "^6.23.0" + babel-plugin-transform-es2015-classes "^6.23.0" + babel-plugin-transform-es2015-computed-properties "^6.22.0" + babel-plugin-transform-es2015-destructuring "^6.23.0" + babel-plugin-transform-es2015-duplicate-keys "^6.22.0" + babel-plugin-transform-es2015-for-of "^6.23.0" + babel-plugin-transform-es2015-function-name "^6.22.0" + babel-plugin-transform-es2015-literals "^6.22.0" + babel-plugin-transform-es2015-modules-amd "^6.22.0" + babel-plugin-transform-es2015-modules-commonjs "^6.23.0" + babel-plugin-transform-es2015-modules-systemjs "^6.23.0" + babel-plugin-transform-es2015-modules-umd "^6.23.0" + babel-plugin-transform-es2015-object-super "^6.22.0" + babel-plugin-transform-es2015-parameters "^6.23.0" + babel-plugin-transform-es2015-shorthand-properties "^6.22.0" + babel-plugin-transform-es2015-spread "^6.22.0" + babel-plugin-transform-es2015-sticky-regex "^6.22.0" + babel-plugin-transform-es2015-template-literals "^6.22.0" + babel-plugin-transform-es2015-typeof-symbol "^6.23.0" + babel-plugin-transform-es2015-unicode-regex "^6.22.0" + babel-plugin-transform-exponentiation-operator "^6.22.0" + babel-plugin-transform-regenerator "^6.22.0" + browserslist "^1.4.0" + invariant "^2.2.2" + +babel-preset-flow@^6.23.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-preset-flow/-/babel-preset-flow-6.23.0.tgz#e71218887085ae9a24b5be4169affb599816c49d" + dependencies: + babel-plugin-transform-flow-strip-types "^6.22.0" + +babel-preset-react@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-preset-react/-/babel-preset-react-6.24.1.tgz#ba69dfaea45fc3ec639b6a4ecea6e17702c91380" + dependencies: + babel-plugin-syntax-jsx "^6.3.13" + babel-plugin-transform-react-display-name "^6.23.0" + babel-plugin-transform-react-jsx "^6.24.1" + babel-plugin-transform-react-jsx-self "^6.22.0" + babel-plugin-transform-react-jsx-source "^6.22.0" + babel-preset-flow "^6.23.0" + +babel-register@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-register/-/babel-register-6.26.0.tgz#6ed021173e2fcb486d7acb45c6009a856f647071" + dependencies: + babel-core "^6.26.0" + babel-runtime "^6.26.0" + core-js "^2.5.0" + home-or-tmp "^2.0.0" + lodash "^4.17.4" + mkdirp "^0.5.1" + source-map-support "^0.4.15" + +babel-runtime@^6.18.0, babel-runtime@^6.22.0, babel-runtime@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe" + dependencies: + core-js "^2.4.0" + regenerator-runtime "^0.11.0" + +babel-template@^6.24.1, babel-template@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.26.0.tgz#de03e2d16396b069f46dd9fff8521fb1a0e35e02" + dependencies: + babel-runtime "^6.26.0" + babel-traverse "^6.26.0" + babel-types "^6.26.0" + babylon "^6.18.0" + lodash "^4.17.4" + +babel-traverse@^6.24.1, babel-traverse@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.26.0.tgz#46a9cbd7edcc62c8e5c064e2d2d8d0f4035766ee" + dependencies: + babel-code-frame "^6.26.0" + babel-messages "^6.23.0" + babel-runtime "^6.26.0" + babel-types "^6.26.0" + babylon "^6.18.0" + debug "^2.6.8" + globals "^9.18.0" + invariant "^2.2.2" + lodash "^4.17.4" + +babel-types@^6.19.0, babel-types@^6.24.1, babel-types@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.26.0.tgz#a3b073f94ab49eb6fa55cd65227a334380632497" + dependencies: + babel-runtime "^6.26.0" + esutils "^2.0.2" + lodash "^4.17.4" + to-fast-properties "^1.0.3" + +babylon@^6.18.0: + version "6.18.0" + resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.18.0.tgz#af2f3b88fa6f5c1e4c634d1a0f8eac4f55b395e3" + +balanced-match@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" + +binary-extensions@^1.0.0: + version "1.11.0" + resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.11.0.tgz#46aa1751fb6a2f93ee5e689bb1087d4b14c6c205" + +bl@^1.0.0: + version "1.2.2" + resolved "https://registry.yarnpkg.com/bl/-/bl-1.2.2.tgz#a160911717103c07410cef63ef51b397c025af9c" + dependencies: + readable-stream "^2.3.5" + safe-buffer "^5.1.1" + +brace-expansion@^1.1.7: + version "1.1.11" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" + dependencies: + balanced-match "^1.0.0" + concat-map "0.0.1" + +braces@^1.8.2: + version "1.8.5" + resolved "https://registry.yarnpkg.com/braces/-/braces-1.8.5.tgz#ba77962e12dff969d6b76711e914b737857bf6a7" + dependencies: + expand-range "^1.8.1" + preserve "^0.2.0" + repeat-element "^1.1.2" + +browserslist@^1.4.0: + version "1.7.7" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-1.7.7.tgz#0bd76704258be829b2398bb50e4b62d1a166b0b9" + dependencies: + caniuse-db "^1.0.30000639" + electron-to-chromium "^1.2.7" + +buffer-alloc-unsafe@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/buffer-alloc-unsafe/-/buffer-alloc-unsafe-0.1.1.tgz#ffe1f67551dd055737de253337bfe853dfab1a6a" + +buffer-alloc@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/buffer-alloc/-/buffer-alloc-1.1.0.tgz#05514d33bf1656d3540c684f65b1202e90eca303" + dependencies: + buffer-alloc-unsafe "^0.1.0" + buffer-fill "^0.1.0" + +buffer-fill@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/buffer-fill/-/buffer-fill-0.1.1.tgz#76d825c4d6e50e06b7a31eb520c04d08cc235071" + +caniuse-db@^1.0.30000639: + version "1.0.30000836" + resolved "https://registry.yarnpkg.com/caniuse-db/-/caniuse-db-1.0.30000836.tgz#788b6c8f6f02991743b18cdbbd54f96d05b4b95a" + +chalk@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" + dependencies: + ansi-styles "^2.2.1" + escape-string-regexp "^1.0.2" + has-ansi "^2.0.0" + strip-ansi "^3.0.0" + supports-color "^2.0.0" + +chalk@^2.3.0, chalk@^2.4.1: + version "2.4.1" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.1.tgz#18c49ab16a037b6eb0152cc83e3471338215b66e" + dependencies: + ansi-styles "^3.2.1" + escape-string-regexp "^1.0.5" + supports-color "^5.3.0" + +chokidar@^1.6.1: + version "1.7.0" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-1.7.0.tgz#798e689778151c8076b4b360e5edd28cda2bb468" + dependencies: + anymatch "^1.3.0" + async-each "^1.0.0" + glob-parent "^2.0.0" + inherits "^2.0.1" + is-binary-path "^1.0.0" + is-glob "^2.0.0" + path-is-absolute "^1.0.0" + readdirp "^2.0.0" + optionalDependencies: + fsevents "^1.0.0" + +chownr@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.0.1.tgz#e2a75042a9551908bebd25b8523d5f9769d79181" + +code-point-at@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" + +color-convert@^1.9.0: + version "1.9.1" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.1.tgz#c1261107aeb2f294ebffec9ed9ecad529a6097ed" + dependencies: + color-name "^1.1.1" + +color-name@^1.1.1: + version "1.1.3" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" + +commander@^2.11.0: + version "2.15.1" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.15.1.tgz#df46e867d0fc2aec66a34662b406a9ccafff5b0f" + +concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + +console-control-strings@^1.0.0, console-control-strings@~1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" + +convert-source-map@^1.5.0, convert-source-map@^1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.5.1.tgz#b8278097b9bc229365de5c62cf5fcaed8b5599e5" + +core-js@^2.4.0, core-js@^2.5.0: + version "2.5.6" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.5.6.tgz#0fe6d45bf3cac3ac364a9d72de7576f4eb221b9d" + +core-util-is@~1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" + +cross-spawn@^6.0.0: + version "6.0.5" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" + dependencies: + nice-try "^1.0.4" + path-key "^2.0.1" + semver "^5.5.0" + shebang-command "^1.2.0" + which "^1.2.9" + +debug@^2.1.2, debug@^2.6.8, debug@^2.6.9: + version "2.6.9" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" + dependencies: + ms "2.0.0" + +dedent@^0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/dedent/-/dedent-0.7.0.tgz#2495ddbaf6eb874abb0e1be9df22d2e5a544326c" + +deep-extend@^0.5.1: + version "0.5.1" + resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.5.1.tgz#b894a9dd90d3023fbf1c55a394fb858eb2066f1f" + +delegates@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" + +detect-indent@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-4.0.0.tgz#f76d064352cdf43a1cb6ce619c4ee3a9475de208" + dependencies: + repeating "^2.0.0" + +detect-libc@^1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b" + +electron-to-chromium@^1.2.7: + version "1.3.45" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.45.tgz#458ac1b1c5c760ce8811a16d2bfbd97ec30bafb8" + +end-of-stream@^1.0.0, end-of-stream@^1.1.0: + version "1.4.1" + resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.1.tgz#ed29634d19baba463b6ce6b80a37213eab71ec43" + dependencies: + once "^1.4.0" + +escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" + +esutils@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" + +execa@^0.10.0: + version "0.10.0" + resolved "https://registry.yarnpkg.com/execa/-/execa-0.10.0.tgz#ff456a8f53f90f8eccc71a96d11bdfc7f082cb50" + dependencies: + cross-spawn "^6.0.0" + get-stream "^3.0.0" + is-stream "^1.1.0" + npm-run-path "^2.0.0" + p-finally "^1.0.0" + signal-exit "^3.0.0" + strip-eof "^1.0.0" + +expand-brackets@^0.1.4: + version "0.1.5" + resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-0.1.5.tgz#df07284e342a807cd733ac5af72411e581d1177b" + dependencies: + is-posix-bracket "^0.1.0" + +expand-range@^1.8.1: + version "1.8.2" + resolved "https://registry.yarnpkg.com/expand-range/-/expand-range-1.8.2.tgz#a299effd335fe2721ebae8e257ec79644fc85337" + dependencies: + fill-range "^2.1.0" + +extglob@^0.3.1: + version "0.3.2" + resolved "https://registry.yarnpkg.com/extglob/-/extglob-0.3.2.tgz#2e18ff3d2f49ab2765cec9023f011daa8d8349a1" + dependencies: + is-extglob "^1.0.0" + +filename-regex@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/filename-regex/-/filename-regex-2.0.1.tgz#c1c4b9bee3e09725ddb106b75c1e301fe2f18b26" + +fill-range@^2.1.0: + version "2.2.4" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-2.2.4.tgz#eb1e773abb056dcd8df2bfdf6af59b8b3a936565" + dependencies: + is-number "^2.1.0" + isobject "^2.0.0" + randomatic "^3.0.0" + repeat-element "^1.1.2" + repeat-string "^1.5.2" + +for-in@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" + +for-own@^0.1.4: + version "0.1.5" + resolved "https://registry.yarnpkg.com/for-own/-/for-own-0.1.5.tgz#5265c681a4f294dabbf17c9509b6763aa84510ce" + dependencies: + for-in "^1.0.1" + +fs-constants@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs-constants/-/fs-constants-1.0.0.tgz#6be0de9be998ce16af8afc24497b9ee9b7ccd9ad" + +fs-minipass@^1.2.5: + version "1.2.5" + resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-1.2.5.tgz#06c277218454ec288df77ada54a03b8702aacb9d" + dependencies: + minipass "^2.2.1" + +fs-readdir-recursive@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/fs-readdir-recursive/-/fs-readdir-recursive-1.1.0.tgz#e32fc030a2ccee44a6b5371308da54be0b397d27" + +fs.realpath@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + +fsevents@^1.0.0: + version "1.2.3" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.2.3.tgz#08292982e7059f6674c93d8b829c1e8604979ac0" + dependencies: + nan "^2.9.2" + node-pre-gyp "^0.9.0" + +gauge@~2.7.3: + version "2.7.4" + resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7" + dependencies: + aproba "^1.0.3" + console-control-strings "^1.0.0" + has-unicode "^2.0.0" + object-assign "^4.1.0" + signal-exit "^3.0.0" + string-width "^1.0.1" + strip-ansi "^3.0.1" + wide-align "^1.1.0" + +get-stream@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14" + +getopts@^2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/getopts/-/getopts-2.0.6.tgz#4788d533a977527e79efd57b5e742ffa0dd33105" + +glob-base@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/glob-base/-/glob-base-0.3.0.tgz#dbb164f6221b1c0b1ccf82aea328b497df0ea3c4" + dependencies: + glob-parent "^2.0.0" + is-glob "^2.0.0" + +glob-parent@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-2.0.0.tgz#81383d72db054fcccf5336daa902f182f6edbb28" + dependencies: + is-glob "^2.0.0" + +glob@^7.0.5, glob@^7.1.2: + version "7.1.2" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15" + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + +globals@^9.18.0: + version "9.18.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-9.18.0.tgz#aa3896b3e69b487f17e31ed2143d69a8e30c2d8a" + +graceful-fs@^4.1.2, graceful-fs@^4.1.4: + version "4.1.11" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658" + +has-ansi@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" + dependencies: + ansi-regex "^2.0.0" + +has-flag@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" + +has-unicode@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" + +home-or-tmp@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/home-or-tmp/-/home-or-tmp-2.0.0.tgz#e36c3f2d2cae7d746a857e38d18d5f32a7882db8" + dependencies: + os-homedir "^1.0.0" + os-tmpdir "^1.0.1" + +iconv-lite@^0.4.4: + version "0.4.23" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.23.tgz#297871f63be507adcfbfca715d0cd0eed84e9a63" + dependencies: + safer-buffer ">= 2.1.2 < 3" + +ignore-walk@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/ignore-walk/-/ignore-walk-3.0.1.tgz#a83e62e7d272ac0e3b551aaa82831a19b69f82f8" + dependencies: + minimatch "^3.0.4" + +inflight@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + dependencies: + once "^1.3.0" + wrappy "1" + +inherits@2, inherits@^2.0.1, inherits@~2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" + +ini@~1.3.0: + version "1.3.5" + resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927" + +invariant@^2.2.2: + version "2.2.4" + resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6" + dependencies: + loose-envify "^1.0.0" + +is-binary-path@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-1.0.1.tgz#75f16642b480f187a711c814161fd3a4a7655898" + dependencies: + binary-extensions "^1.0.0" + +is-buffer@^1.1.5: + version "1.1.6" + resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" + +is-dotfile@^1.0.0: + version "1.0.3" + resolved "https://registry.yarnpkg.com/is-dotfile/-/is-dotfile-1.0.3.tgz#a6a2f32ffd2dfb04f5ca25ecd0f6b83cf798a1e1" + +is-equal-shallow@^0.1.3: + version "0.1.3" + resolved "https://registry.yarnpkg.com/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz#2238098fc221de0bcfa5d9eac4c45d638aa1c534" + dependencies: + is-primitive "^2.0.0" + +is-extendable@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" + +is-extglob@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-1.0.0.tgz#ac468177c4943405a092fc8f29760c6ffc6206c0" + +is-finite@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-finite/-/is-finite-1.0.2.tgz#cc6677695602be550ef11e8b4aa6305342b6d0aa" + dependencies: + number-is-nan "^1.0.0" + +is-fullwidth-code-point@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb" + dependencies: + number-is-nan "^1.0.0" + +is-glob@^2.0.0, is-glob@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-2.0.1.tgz#d096f926a3ded5600f3fdfd91198cb0888c2d863" + dependencies: + is-extglob "^1.0.0" + +is-number@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f" + dependencies: + kind-of "^3.0.2" + +is-number@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-4.0.0.tgz#0026e37f5454d73e356dfe6564699867c6a7f0ff" + +is-posix-bracket@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz#3334dc79774368e92f016e6fbc0a88f5cd6e6bc4" + +is-primitive@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-primitive/-/is-primitive-2.0.0.tgz#207bab91638499c07b2adf240a41a87210034575" + +is-stream@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" + +isarray@1.0.0, isarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" + +isexe@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + +isobject@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89" + dependencies: + isarray "1.0.0" + +js-tokens@^3.0.0, js-tokens@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" + +jsesc@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-1.3.0.tgz#46c3fec8c1892b12b0833db9bc7622176dbab34b" + +jsesc@~0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d" + +json5@^0.5.1: + version "0.5.1" + resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821" + +kind-of@^3.0.2: + version "3.2.2" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" + dependencies: + is-buffer "^1.1.5" + +kind-of@^6.0.0: + version "6.0.2" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.2.tgz#01146b36a6218e64e58f3a8d66de5d7fc6f6d051" + +lodash@4.17.4: + version "4.17.4" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae" + +lodash@^4.17.4: + version "4.17.10" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.10.tgz#1b7793cf7259ea38fb3661d4d38b3260af8ae4e7" + +loose-envify@^1.0.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.3.1.tgz#d1a8ad33fa9ce0e713d65fdd0ac8b748d478c848" + dependencies: + js-tokens "^3.0.0" + +math-random@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/math-random/-/math-random-1.0.1.tgz#8b3aac588b8a66e4975e3cdea67f7bb329601fac" + +micromatch@^2.1.5: + version "2.3.11" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-2.3.11.tgz#86677c97d1720b363431d04d0d15293bd38c1565" + dependencies: + arr-diff "^2.0.0" + array-unique "^0.2.1" + braces "^1.8.2" + expand-brackets "^0.1.4" + extglob "^0.3.1" + filename-regex "^2.0.0" + is-extglob "^1.0.0" + is-glob "^2.0.1" + kind-of "^3.0.2" + normalize-path "^2.0.1" + object.omit "^2.0.0" + parse-glob "^3.0.4" + regex-cache "^0.4.2" + +minimatch@^3.0.2, minimatch@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" + dependencies: + brace-expansion "^1.1.7" + +minimist@0.0.8: + version "0.0.8" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" + +minimist@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" + +minipass@^2.2.1, minipass@^2.2.4: + version "2.3.0" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.3.0.tgz#2e11b1c46df7fe7f1afbe9a490280add21ffe384" + dependencies: + safe-buffer "^5.1.1" + yallist "^3.0.0" + +minizlib@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-1.1.0.tgz#11e13658ce46bc3a70a267aac58359d1e0c29ceb" + dependencies: + minipass "^2.2.1" + +mkdirp@^0.5.0, mkdirp@^0.5.1: + version "0.5.1" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" + dependencies: + minimist "0.0.8" + +moment@^2.20.1: + version "2.22.1" + resolved "https://registry.yarnpkg.com/moment/-/moment-2.22.1.tgz#529a2e9bf973f259c9643d237fda84de3a26e8ad" + +ms@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" + +nan@^2.9.2: + version "2.10.0" + resolved "https://registry.yarnpkg.com/nan/-/nan-2.10.0.tgz#96d0cd610ebd58d4b4de9cc0c6828cda99c7548f" + +needle@^2.2.0: + version "2.2.1" + resolved "https://registry.yarnpkg.com/needle/-/needle-2.2.1.tgz#b5e325bd3aae8c2678902fa296f729455d1d3a7d" + dependencies: + debug "^2.1.2" + iconv-lite "^0.4.4" + sax "^1.2.4" + +nice-try@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.4.tgz#d93962f6c52f2c1558c0fbda6d512819f1efe1c4" + +node-pre-gyp@^0.9.0: + version "0.9.1" + resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.9.1.tgz#f11c07516dd92f87199dbc7e1838eab7cd56c9e0" + dependencies: + detect-libc "^1.0.2" + mkdirp "^0.5.1" + needle "^2.2.0" + nopt "^4.0.1" + npm-packlist "^1.1.6" + npmlog "^4.0.2" + rc "^1.1.7" + rimraf "^2.6.1" + semver "^5.3.0" + tar "^4" + +nopt@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/nopt/-/nopt-4.0.1.tgz#d0d4685afd5415193c8c7505602d0d17cd64474d" + dependencies: + abbrev "1" + osenv "^0.1.4" + +normalize-path@^2.0.0, normalize-path@^2.0.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9" + dependencies: + remove-trailing-separator "^1.0.1" + +npm-bundled@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/npm-bundled/-/npm-bundled-1.0.3.tgz#7e71703d973af3370a9591bafe3a63aca0be2308" + +npm-packlist@^1.1.6: + version "1.1.10" + resolved "https://registry.yarnpkg.com/npm-packlist/-/npm-packlist-1.1.10.tgz#1039db9e985727e464df066f4cf0ab6ef85c398a" + dependencies: + ignore-walk "^3.0.1" + npm-bundled "^1.0.1" + +npm-run-path@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f" + dependencies: + path-key "^2.0.0" + +npmlog@^4.0.2: + version "4.1.2" + resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b" + dependencies: + are-we-there-yet "~1.1.2" + console-control-strings "~1.1.0" + gauge "~2.7.3" + set-blocking "~2.0.0" + +number-is-nan@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" + +object-assign@^4.1.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" + +object.omit@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/object.omit/-/object.omit-2.0.1.tgz#1a9c744829f39dbb858c76ca3579ae2a54ebd1fa" + dependencies: + for-own "^0.1.4" + is-extendable "^0.1.1" + +once@^1.3.0, once@^1.3.1, once@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + dependencies: + wrappy "1" + +os-homedir@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" + +os-tmpdir@^1.0.0, os-tmpdir@^1.0.1, os-tmpdir@~1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" + +osenv@^0.1.4: + version "0.1.5" + resolved "https://registry.yarnpkg.com/osenv/-/osenv-0.1.5.tgz#85cdfafaeb28e8677f416e287592b5f3f49ea410" + dependencies: + os-homedir "^1.0.0" + os-tmpdir "^1.0.0" + +output-file-sync@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/output-file-sync/-/output-file-sync-1.1.2.tgz#d0a33eefe61a205facb90092e826598d5245ce76" + dependencies: + graceful-fs "^4.1.4" + mkdirp "^0.5.1" + object-assign "^4.1.0" + +p-finally@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" + +parse-glob@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/parse-glob/-/parse-glob-3.0.4.tgz#b2c376cfb11f35513badd173ef0bb6e3a388391c" + dependencies: + glob-base "^0.3.0" + is-dotfile "^1.0.0" + is-extglob "^1.0.0" + is-glob "^2.0.0" + +path-is-absolute@^1.0.0, path-is-absolute@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + +path-key@^2.0.0, path-key@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" + +preserve@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" + +private@^0.1.6, private@^0.1.8: + version "0.1.8" + resolved "https://registry.yarnpkg.com/private/-/private-0.1.8.tgz#2381edb3689f7a53d653190060fcf822d2f368ff" + +process-nextick-args@~2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.0.tgz#a37d732f4271b4ab1ad070d35508e8290788ffaa" + +pump@^1.0.0: + version "1.0.3" + resolved "https://registry.yarnpkg.com/pump/-/pump-1.0.3.tgz#5dfe8311c33bbf6fc18261f9f34702c47c08a954" + dependencies: + end-of-stream "^1.1.0" + once "^1.3.1" + +randomatic@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-3.0.0.tgz#d35490030eb4f7578de292ce6dfb04a91a128923" + dependencies: + is-number "^4.0.0" + kind-of "^6.0.0" + math-random "^1.0.1" + +rc@^1.1.7: + version "1.2.7" + resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.7.tgz#8a10ca30d588d00464360372b890d06dacd02297" + dependencies: + deep-extend "^0.5.1" + ini "~1.3.0" + minimist "^1.2.0" + strip-json-comments "~2.0.1" + +readable-stream@^2.0.0, readable-stream@^2.0.2, readable-stream@^2.0.6, readable-stream@^2.3.5: + version "2.3.6" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.6.tgz#b11c27d88b8ff1fbe070643cf94b0c79ae1b0aaf" + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.3" + isarray "~1.0.0" + process-nextick-args "~2.0.0" + safe-buffer "~5.1.1" + string_decoder "~1.1.1" + util-deprecate "~1.0.1" + +readdirp@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-2.1.0.tgz#4ed0ad060df3073300c48440373f72d1cc642d78" + dependencies: + graceful-fs "^4.1.2" + minimatch "^3.0.2" + readable-stream "^2.0.2" + set-immediate-shim "^1.0.1" + +regenerate@^1.2.1: + version "1.3.3" + resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.3.3.tgz#0c336d3980553d755c39b586ae3b20aa49c82b7f" + +regenerator-runtime@^0.10.5: + version "0.10.5" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.10.5.tgz#336c3efc1220adcedda2c9fab67b5a7955a33658" + +regenerator-runtime@^0.11.0: + version "0.11.1" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz#be05ad7f9bf7d22e056f9726cee5017fbf19e2e9" + +regenerator-transform@^0.10.0: + version "0.10.1" + resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.10.1.tgz#1e4996837231da8b7f3cf4114d71b5691a0680dd" + dependencies: + babel-runtime "^6.18.0" + babel-types "^6.19.0" + private "^0.1.6" + +regex-cache@^0.4.2: + version "0.4.4" + resolved "https://registry.yarnpkg.com/regex-cache/-/regex-cache-0.4.4.tgz#75bdc58a2a1496cec48a12835bc54c8d562336dd" + dependencies: + is-equal-shallow "^0.1.3" + +regexpu-core@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-2.0.0.tgz#49d038837b8dcf8bfa5b9a42139938e6ea2ae240" + dependencies: + regenerate "^1.2.1" + regjsgen "^0.2.0" + regjsparser "^0.1.4" + +regjsgen@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.2.0.tgz#6c016adeac554f75823fe37ac05b92d5a4edb1f7" + +regjsparser@^0.1.4: + version "0.1.5" + resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.1.5.tgz#7ee8f84dc6fa792d3fd0ae228d24bd949ead205c" + dependencies: + jsesc "~0.5.0" + +remove-trailing-separator@^1.0.1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef" + +repeat-element@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.2.tgz#ef089a178d1483baae4d93eb98b4f9e4e11d990a" + +repeat-string@^1.5.2: + version "1.6.1" + resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" + +repeating@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/repeating/-/repeating-2.0.1.tgz#5214c53a926d3552707527fbab415dbc08d06dda" + dependencies: + is-finite "^1.0.0" + +rimraf@^2.6.1: + version "2.6.2" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.2.tgz#2ed8150d24a16ea8651e6d6ef0f47c4158ce7a36" + dependencies: + glob "^7.0.5" + +rxjs@^5.4.3: + version "5.5.10" + resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-5.5.10.tgz#fde02d7a614f6c8683d0d1957827f492e09db045" + dependencies: + symbol-observable "1.0.1" + +safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: + version "5.1.2" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" + +"safer-buffer@>= 2.1.2 < 3": + version "2.1.2" + resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" + +sax@^1.2.4: + version "1.2.4" + resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" + +semver@^5.3.0, semver@^5.5.0: + version "5.5.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.0.tgz#dc4bbc7a6ca9d916dee5d43516f0092b58f7b8ab" + +set-blocking@~2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" + +set-immediate-shim@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz#4b2b1b27eb808a9f8dcc481a58e5e56f599f3f61" + +shebang-command@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" + dependencies: + shebang-regex "^1.0.0" + +shebang-regex@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" + +signal-exit@^3.0.0: + version "3.0.2" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" + +slash@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55" + +source-map-support@^0.4.15: + version "0.4.18" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.4.18.tgz#0286a6de8be42641338594e97ccea75f0a2c585f" + dependencies: + source-map "^0.5.6" + +source-map@^0.5.6, source-map@^0.5.7: + version "0.5.7" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" + +string-width@^1.0.1, string-width@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" + dependencies: + code-point-at "^1.0.0" + is-fullwidth-code-point "^1.0.0" + strip-ansi "^3.0.0" + +string_decoder@~1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" + dependencies: + safe-buffer "~5.1.0" + +strip-ansi@^3.0.0, strip-ansi@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" + dependencies: + ansi-regex "^2.0.0" + +strip-eof@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf" + +strip-json-comments@~2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" + +supports-color@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" + +supports-color@^5.3.0: + version "5.4.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.4.0.tgz#1c6b337402c2137605efe19f10fec390f6faab54" + dependencies: + has-flag "^3.0.0" + +symbol-observable@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.0.1.tgz#8340fc4702c3122df5d22288f88283f513d3fdd4" + +tar-fs@^1.16.2: + version "1.16.2" + resolved "https://registry.yarnpkg.com/tar-fs/-/tar-fs-1.16.2.tgz#17e5239747e399f7e77344f5f53365f04af53577" + dependencies: + chownr "^1.0.1" + mkdirp "^0.5.1" + pump "^1.0.0" + tar-stream "^1.1.2" + +tar-stream@^1.1.2: + version "1.6.0" + resolved "https://registry.yarnpkg.com/tar-stream/-/tar-stream-1.6.0.tgz#a50efaa7b17760b82c27b3cae4a301a8254a5715" + dependencies: + bl "^1.0.0" + buffer-alloc "^1.1.0" + end-of-stream "^1.0.0" + fs-constants "^1.0.0" + readable-stream "^2.0.0" + to-buffer "^1.1.0" + xtend "^4.0.0" + +tar@^4: + version "4.4.2" + resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.2.tgz#60685211ba46b38847b1ae7ee1a24d744a2cd462" + dependencies: + chownr "^1.0.1" + fs-minipass "^1.2.5" + minipass "^2.2.4" + minizlib "^1.1.0" + mkdirp "^0.5.0" + safe-buffer "^5.1.2" + yallist "^3.0.2" + +tmp@^0.0.33: + version "0.0.33" + resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" + dependencies: + os-tmpdir "~1.0.2" + +to-buffer@^1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/to-buffer/-/to-buffer-1.1.1.tgz#493bd48f62d7c43fcded313a03dcadb2e1213a80" + +to-fast-properties@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.3.tgz#b83571fa4d8c25b82e231b06e3a3055de4ca1a47" + +traverse@0.6.6: + version "0.6.6" + resolved "https://registry.yarnpkg.com/traverse/-/traverse-0.6.6.tgz#cbdf560fd7b9af632502fed40f918c157ea97137" + +tree-kill@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/tree-kill/-/tree-kill-1.2.0.tgz#5846786237b4239014f05db156b643212d4c6f36" + +trim-right@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003" + +user-home@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/user-home/-/user-home-1.1.1.tgz#2b5be23a32b63a7c9deb8d0f28d485724a3df190" + +util-deprecate@~1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" + +v8flags@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/v8flags/-/v8flags-2.1.1.tgz#aab1a1fa30d45f88dd321148875ac02c0b55e5b4" + dependencies: + user-home "^1.1.1" + +which@^1.2.9: + version "1.3.0" + resolved "https://registry.yarnpkg.com/which/-/which-1.3.0.tgz#ff04bdfc010ee547d780bec38e1ac1c2777d253a" + dependencies: + isexe "^2.0.0" + +wide-align@^1.1.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.2.tgz#571e0f1b0604636ebc0dfc21b0339bbe31341710" + dependencies: + string-width "^1.0.2" + +wrappy@1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + +xtend@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" + +yallist@^3.0.0, yallist@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.0.2.tgz#8452b4bb7e83c7c188d8041c1a837c773d6d8bb9" + +zlib@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/zlib/-/zlib-1.0.5.tgz#6e7c972fc371c645a6afb03ab14769def114fcc0" diff --git a/scripts/README.md b/scripts/README.md index 6ce2fdace6962..ab8d53babfd7c 100644 --- a/scripts/README.md +++ b/scripts/README.md @@ -1,4 +1,4 @@ -# kibana dev scripts +# Kibana Dev Scripts This directory contains scripts useful for interacting with Kibana tools in development. Use the node executable and `--help` flag to learn about how they work: @@ -6,11 +6,37 @@ This directory contains scripts useful for interacting with Kibana tools in deve node scripts/{{script name}} --help ``` -## for developers +## For Developers This directory is excluded from the build and tools within it should help users discover their capabilities. Each script in this directory must: - require `src/babel-register` to bootstrap babel -- call out to source code that is in the `src` directory +- call out to source code in the [`src`](../src) or [`packages`](../packages) directories - react to the `--help` flag -- run everywhere OR check and fail fast when a required OS or toolchain is not available \ No newline at end of file +- run everywhere OR check and fail fast when a required OS or toolchain is not available + +## Functional Test Scripts + +**`node scripts/functional_tests [--config test/functional/config.js --config test/api_integration/config.js]`** + +Runs all the functional tests: selenium tests and api integration tests. List configs with multiple `--config` arguments. Uses the [@kbn/test](../packages/kbn-test) library to run Elasticsearch and Kibana servers and tests against those servers, for multiple server+test setups. In particular, calls out to [`runTests()`](../packages/kbn-test/src/functional_tests/tasks.js). Can be run on a single config. + +**`node scripts/functional_tests_server [--config test/functional/config.js]`** + +Starts just the Elasticsearch and Kibana servers given a single config, i.e. via `--config test/functional/config.js` or `--config test/api_integration/config`. Allows the user to start just the servers with this script, and keep them running while running tests against these servers. The idea is that the same config file configures both Elasticsearch and Kibana servers. Uses the [`startServers()`](../packages/kbn-test/src/functional_tests/tasks.js#L52-L80) method from [@kbn/test](../packages/kbn-test) library. + +Example. Start servers _and_ run tests, separately, but using the same config: + +```sh +# Just the servers +node scripts/functional_tests_server --config path/to/config +``` + +In another terminal: + +```sh +# Just the tests--against the running servers +node scripts/functional_test_runner --config path/to/config +``` + +For details on how the internal methods work, [read this readme](../packages/kbn-test/README.md). diff --git a/scripts/functional_tests.js b/scripts/functional_tests.js new file mode 100644 index 0000000000000..5b946f026e7ec --- /dev/null +++ b/scripts/functional_tests.js @@ -0,0 +1,5 @@ +require('../src/babel-register'); +require('../packages/kbn-test').runTestsCli([ + require.resolve('../test/functional/config.js'), + require.resolve('../test/api_integration/config.js'), +]); diff --git a/scripts/functional_tests_server.js b/scripts/functional_tests_server.js new file mode 100644 index 0000000000000..a26e14de9265e --- /dev/null +++ b/scripts/functional_tests_server.js @@ -0,0 +1,4 @@ +require('../src/babel-register'); +require('../packages/kbn-test').startServersCli( + require.resolve('../test/functional/config.js'), +); diff --git a/src/core_plugins/elasticsearch/lib/__tests__/ensure_es_version.js b/src/core_plugins/elasticsearch/lib/__tests__/ensure_es_version.js index b6828c3562261..bea283cc8d84a 100644 --- a/src/core_plugins/elasticsearch/lib/__tests__/ensure_es_version.js +++ b/src/core_plugins/elasticsearch/lib/__tests__/ensure_es_version.js @@ -3,7 +3,7 @@ import Promise from 'bluebird'; import sinon from 'sinon'; import expect from 'expect.js'; -import { esTestConfig } from '../../../../test_utils/es'; +import { esTestConfig } from '@kbn/test'; import { ensureEsVersion } from '../ensure_es_version'; describe('plugins/elasticsearch', () => { diff --git a/src/core_plugins/elasticsearch/lib/__tests__/health_check.js b/src/core_plugins/elasticsearch/lib/__tests__/health_check.js index 43b6ddf2b9344..45722950c3920 100644 --- a/src/core_plugins/elasticsearch/lib/__tests__/health_check.js +++ b/src/core_plugins/elasticsearch/lib/__tests__/health_check.js @@ -7,7 +7,7 @@ const NoConnections = require('elasticsearch').errors.NoConnections; import mappings from './fixtures/mappings'; import healthCheck from '../health_check'; import kibanaVersion from '../kibana_version'; -import { esTestConfig } from '../../../../test_utils/es'; +import { esTestConfig } from '@kbn/test'; import * as patchKibanaIndexNS from '../patch_kibana_index'; const esPort = esTestConfig.getPort(); diff --git a/src/functional_test_runner/lib/config/schema.js b/src/functional_test_runner/lib/config/schema.js index 1788ee5ffaa78..52d84597b53b0 100644 --- a/src/functional_test_runner/lib/config/schema.js +++ b/src/functional_test_runner/lib/config/schema.js @@ -88,6 +88,15 @@ export const schema = Joi.object().keys({ elasticsearch: urlPartsSchema(), }).default(), + esTestCluster: Joi.object().keys({ + license: Joi.string().default('oss'), + from: Joi.string().default('snapshot'), + serverArgs: Joi.array(), + }).default(), + + kibanaServerArgs: Joi.array(), + + // env allows generic data, but should be removed env: Joi.object().default(), chromedriver: Joi.object().keys({ diff --git a/src/test_utils/es/index.js b/src/test_utils/es/index.js deleted file mode 100644 index 2ca864d5d0432..0000000000000 --- a/src/test_utils/es/index.js +++ /dev/null @@ -1,2 +0,0 @@ -export { esTestConfig } from './es_test_config'; -export { createTestCluster } from './es_test_cluster'; diff --git a/src/test_utils/get_url.js b/src/test_utils/get_url.js index b7f9d12391bf1..cf90ecccf96c5 100644 --- a/src/test_utils/get_url.js +++ b/src/test_utils/get_url.js @@ -9,7 +9,7 @@ import url from 'url'; * protocol: 'http', * hostname: 'localhost', * port: 9220, -* auth: shield.kibanaUser.username + ':' + shield.kibanaUser.password +* auth: kibanaTestUser.username + ':' + kibanaTestUser.password * } * @param {object} app The params to append * example: diff --git a/src/test_utils/kbn_server.js b/src/test_utils/kbn_server.js index 1fe8601b12cbf..ef1a7de94221a 100644 --- a/src/test_utils/kbn_server.js +++ b/src/test_utils/kbn_server.js @@ -1,8 +1,7 @@ import { resolve } from 'path'; import { defaultsDeep, set } from 'lodash'; import { header as basicAuthHeader } from './base_auth'; -import { kibanaUser, kibanaServer } from '../../test/shield'; -import { esTestConfig } from '../test_utils/es'; +import { esTestConfig, kibanaTestUser, kibanaServerTestUser } from '@kbn/test'; import KbnServer from '../../src/server/kbn_server'; const DEFAULTS_SETTINGS = { @@ -29,8 +28,8 @@ const DEFAULT_SETTINGS_WITH_CORE_PLUGINS = { }, elasticsearch: { url: esTestConfig.getUrl(), - username: kibanaServer.username, - password: kibanaServer.password + username: kibanaServerTestUser.username, + password: kibanaServerTestUser.password } }; @@ -60,7 +59,7 @@ export function createServerWithCorePlugins(settings = {}) { * Creates request configuration with a basic auth header */ export function authOptions() { - const { username, password } = kibanaUser; + const { username, password } = kibanaTestUser; const authHeader = basicAuthHeader(username, password); return set({}, 'headers.Authorization', authHeader); } diff --git a/src/ui/ui_settings/create_or_upgrade_saved_config/__tests__/create_or_upgrade_integration.js b/src/ui/ui_settings/create_or_upgrade_saved_config/__tests__/create_or_upgrade_integration.js index 3905820d271ef..f5151753310e5 100644 --- a/src/ui/ui_settings/create_or_upgrade_saved_config/__tests__/create_or_upgrade_integration.js +++ b/src/ui/ui_settings/create_or_upgrade_saved_config/__tests__/create_or_upgrade_integration.js @@ -1,7 +1,7 @@ import sinon from 'sinon'; import expect from 'expect.js'; -import { createTestCluster } from '../../../../test_utils/es'; +import { createEsTestCluster } from '@kbn/test'; import { createServerWithCorePlugins } from '../../../../test_utils/kbn_server'; import { createToolingLog } from '../../../../dev'; import { createOrUpgradeSavedConfig } from '../create_or_upgrade_saved_config'; @@ -19,7 +19,7 @@ describe('createOrUpgradeSavedConfig()', () => { log.info('starting elasticsearch'); log.indent(4); - const es = createTestCluster({ log }); + const es = createEsTestCluster({ log }); this.timeout(es.getStartTimeout()); log.indent(-4); @@ -47,7 +47,7 @@ describe('createOrUpgradeSavedConfig()', () => { type: 'config', attributes: { buildNum: 54090, - '5.4.0-SNAPSHOT': true + '5.4.0-SNAPSHOT': true, }, }, { @@ -55,7 +55,7 @@ describe('createOrUpgradeSavedConfig()', () => { type: 'config', attributes: { buildNum: 54010, - '5.4.0-rc1': true + '5.4.0-rc1': true, }, }, { @@ -63,7 +63,7 @@ describe('createOrUpgradeSavedConfig()', () => { type: 'config', attributes: { buildNum: 99999, - '@@version': true + '@@version': true, }, }, ]); @@ -83,18 +83,20 @@ describe('createOrUpgradeSavedConfig()', () => { savedObjectsClient, version: '5.4.0', buildNum: 54099, - log: sinon.stub() + log: sinon.stub(), }); const config540 = await savedObjectsClient.get('config', '5.4.0'); - expect(config540).to.have.property('attributes').eql({ - // should have the new build number - buildNum: 54099, + expect(config540) + .to.have.property('attributes') + .eql({ + // should have the new build number + buildNum: 54099, - // 5.4.0-SNAPSHOT and @@version were ignored so we only have the - // attributes from 5.4.0-rc1, even though the other build nums are greater - '5.4.0-rc1': true, - }); + // 5.4.0-SNAPSHOT and @@version were ignored so we only have the + // attributes from 5.4.0-rc1, even though the other build nums are greater + '5.4.0-rc1': true, + }); // add the 5.4.0 flag to the 5.4.0 savedConfig await savedObjectsClient.update('config', '5.4.0', { @@ -107,18 +109,20 @@ describe('createOrUpgradeSavedConfig()', () => { savedObjectsClient, version: '5.4.1', buildNum: 54199, - log: sinon.stub() + log: sinon.stub(), }); const config541 = await savedObjectsClient.get('config', '5.4.1'); - expect(config541).to.have.property('attributes').eql({ - // should have the new build number - buildNum: 54199, + expect(config541) + .to.have.property('attributes') + .eql({ + // should have the new build number + buildNum: 54199, - // should also include properties from 5.4.0 and 5.4.0-rc1 - '5.4.0': true, - '5.4.0-rc1': true, - }); + // should also include properties from 5.4.0 and 5.4.0-rc1 + '5.4.0': true, + '5.4.0-rc1': true, + }); // add the 5.4.1 flag to the 5.4.1 savedConfig await savedObjectsClient.update('config', '5.4.1', { @@ -131,19 +135,21 @@ describe('createOrUpgradeSavedConfig()', () => { savedObjectsClient, version: '7.0.0-rc1', buildNum: 70010, - log: sinon.stub() + log: sinon.stub(), }); const config700rc1 = await savedObjectsClient.get('config', '7.0.0-rc1'); - expect(config700rc1).to.have.property('attributes').eql({ - // should have the new build number - buildNum: 70010, - - // should also include properties from 5.4.1, 5.4.0 and 5.4.0-rc1 - '5.4.1': true, - '5.4.0': true, - '5.4.0-rc1': true, - }); + expect(config700rc1) + .to.have.property('attributes') + .eql({ + // should have the new build number + buildNum: 70010, + + // should also include properties from 5.4.1, 5.4.0 and 5.4.0-rc1 + '5.4.1': true, + '5.4.0': true, + '5.4.0-rc1': true, + }); // tag the 7.0.0-rc1 doc await savedObjectsClient.update('config', '7.0.0-rc1', { @@ -156,20 +162,22 @@ describe('createOrUpgradeSavedConfig()', () => { savedObjectsClient, version: '7.0.0', buildNum: 70099, - log: sinon.stub() + log: sinon.stub(), }); const config700 = await savedObjectsClient.get('config', '7.0.0'); - expect(config700).to.have.property('attributes').eql({ - // should have the new build number - buildNum: 70099, - - // should also include properties from ancestors, including 7.0.0-rc1 - '7.0.0-rc1': true, - '5.4.1': true, - '5.4.0': true, - '5.4.0-rc1': true, - }); + expect(config700) + .to.have.property('attributes') + .eql({ + // should have the new build number + buildNum: 70099, + + // should also include properties from ancestors, including 7.0.0-rc1 + '7.0.0-rc1': true, + '5.4.1': true, + '5.4.0': true, + '5.4.0-rc1': true, + }); // tag the 7.0.0 doc await savedObjectsClient.update('config', '7.0.0', { @@ -182,18 +190,20 @@ describe('createOrUpgradeSavedConfig()', () => { savedObjectsClient, version: '6.2.3-rc1', buildNum: 62310, - log: sinon.stub() + log: sinon.stub(), }); const config623rc1 = await savedObjectsClient.get('config', '6.2.3-rc1'); - expect(config623rc1).to.have.property('attributes').eql({ - // should have the new build number - buildNum: 62310, - - // should also include properties from ancestors, but not 7.0.0-rc1 or 7.0.0 - '5.4.1': true, - '5.4.0': true, - '5.4.0-rc1': true, - }); + expect(config623rc1) + .to.have.property('attributes') + .eql({ + // should have the new build number + buildNum: 62310, + + // should also include properties from ancestors, but not 7.0.0-rc1 or 7.0.0 + '5.4.1': true, + '5.4.0': true, + '5.4.0-rc1': true, + }); }); }); diff --git a/src/ui/ui_settings/routes/__tests__/lib/servers.js b/src/ui/ui_settings/routes/__tests__/lib/servers.js index 773dbba9016bd..596c2249f7962 100644 --- a/src/ui/ui_settings/routes/__tests__/lib/servers.js +++ b/src/ui/ui_settings/routes/__tests__/lib/servers.js @@ -1,4 +1,5 @@ -import { createTestCluster } from '../../../../../test_utils/es'; +import { createEsTestCluster } from '@kbn/test'; +import { createToolingLog } from '@kbn/dev-utils'; import * as kbnTestServer from '../../../../../test_utils/kbn_server'; let kbnServer; @@ -6,9 +7,17 @@ let services; let es; export async function startServers() { - es = createTestCluster(); + const log = createToolingLog('debug'); + log.pipe(process.stdout); + log.indent(6); + + log.info('starting elasticsearch'); + log.indent(4); + + es = createEsTestCluster({ log }); this.timeout(es.getStartTimeout()); + log.indent(-4); await es.start(); kbnServer = kbnTestServer.createServerWithCorePlugins(); @@ -35,7 +44,7 @@ export function getServices() { kbnServer, callCluster, savedObjectsClient, - uiSettings + uiSettings, }; return services; diff --git a/tasks/config/run.js b/tasks/config/run.js index a202e417685f2..0dc75aaa12d30 100644 --- a/tasks/config/run.js +++ b/tasks/config/run.js @@ -1,5 +1,4 @@ -import { esTestConfig } from '../../src/test_utils/es'; -import { kibanaTestServerUrlParts } from '../../test/kibana_test_server_url_parts'; +import { esTestConfig, kbnTestConfig } from '@kbn/test'; import { resolve } from 'path'; const SECOND = 1000; @@ -47,14 +46,14 @@ module.exports = function (grunt) { '--optimize.enabled=false', '--elasticsearch.url=' + esTestConfig.getUrl(), '--elasticsearch.healthCheck.delay=' + HOUR, - '--server.port=' + kibanaTestServerUrlParts.port, + '--server.port=' + kbnTestConfig.getPort(), '--server.xsrf.disableProtection=true', ]; const funcTestServerFlags = [ '--server.maxPayloadBytes=1648576', //default is 1048576 '--elasticsearch.url=' + esTestConfig.getUrl(), - '--server.port=' + kibanaTestServerUrlParts.port, + '--server.port=' + kbnTestConfig.getPort(), ]; const browserTestServerFlags = [ diff --git a/test/api_integration/config.js b/test/api_integration/config.js index a9518b4f83180..80f480ea9c81e 100644 --- a/test/api_integration/config.js +++ b/test/api_integration/config.js @@ -6,6 +6,7 @@ import { export default async function ({ readConfigFile }) { const commonConfig = await readConfigFile(require.resolve('../common/config')); + const functionalConfig = await readConfigFile(require.resolve('../functional/config')); return { testFiles: [ @@ -22,6 +23,14 @@ export default async function ({ readConfigFile }) { servers: commonConfig.get('servers'), junit: { reportName: 'API Integration Tests' - } + }, + env: commonConfig.get('env'), + esTestCluster: commonConfig.get('esTestCluster'), + kibanaServerArgs: [ + ...functionalConfig.get('kibanaServerArgs'), + '--optimize.enabled=false', + '--elasticsearch.healthCheck.delay=3600000', + '--server.xsrf.disableProtection=true', + ], }; } diff --git a/test/common/config.js b/test/common/config.js index 40973b7ad609e..d10681e244353 100644 --- a/test/common/config.js +++ b/test/common/config.js @@ -1,3 +1,5 @@ +import { format as formatUrl } from 'url'; +import { OPTIMIZE_BUNDLE_DIR, esTestConfig, kbnTestConfig } from '@kbn/test'; import { KibanaServerProvider, EsProvider, @@ -5,15 +7,37 @@ import { RetryProvider, } from './services'; -import { esTestConfig } from '../../src/test_utils/es'; -import { kibanaTestServerUrlParts } from '../kibana_test_server_url_parts'; - export default function () { + const servers = { + kibana: kbnTestConfig.getUrlParts(), + elasticsearch: esTestConfig.getUrlParts(), + }; + return { - servers: { - kibana: kibanaTestServerUrlParts, - elasticsearch: esTestConfig.getUrlParts(), + servers, + + esTestCluster: { + license: 'oss', + from: 'snapshot', + serverArgs: [ + ], }, + + kibanaServerArgs: [ + '--env=development', + '--logging.json=false', + '--no-base-path', + `--server.port=${kbnTestConfig.getPort()}`, + `--optimize.watchPort=${kbnTestConfig.getPort()}`, + '--optimize.watchPrebuild=true', + '--status.allowAnonymous=true', + '--optimize.enabled=true', + `--optimize.bundleDir=${OPTIMIZE_BUNDLE_DIR}`, + `--elasticsearch.url=${formatUrl(servers.elasticsearch)}`, + `--elasticsearch.username=${servers.elasticsearch.username}`, + `--elasticsearch.password=${servers.elasticsearch.password}`, + ], + services: { kibanaServer: KibanaServerProvider, retry: RetryProvider, diff --git a/test/functional/config.js b/test/functional/config.js index 7f6e170e9c0cd..a14f37b6ca755 100644 --- a/test/functional/config.js +++ b/test/functional/config.js @@ -82,6 +82,16 @@ export default async function ({ readConfigFile }) { dashboardAddPanel: DashboardAddPanelProvider, }, servers: commonConfig.get('servers'), + + env: commonConfig.get('env'), + + esTestCluster: commonConfig.get('esTestCluster'), + + kibanaServerArgs: [ + ...commonConfig.get('kibanaServerArgs'), + '--oss', + ], + apps: { status_page: { pathname: '/status', diff --git a/test/kibana_test_server_url_parts.js b/test/kibana_test_server_url_parts.js deleted file mode 100644 index e8d8a48d1a778..0000000000000 --- a/test/kibana_test_server_url_parts.js +++ /dev/null @@ -1,30 +0,0 @@ -import { kibanaUser } from './shield'; -import url from 'url'; - -function getUrlParts() { - // allow setting one complete TEST_KIBANA_URL for ES like https://elastic:changeme@example.com:9200 - if (process.env.TEST_KIBANA_URL) { - const testKibanaUrl = url.parse(process.env.TEST_KIBANA_URL); - return { - protocol: testKibanaUrl.protocol.slice(0, -1), - hostname: testKibanaUrl.hostname, - port: parseInt(testKibanaUrl.port, 10), - auth: testKibanaUrl.auth, - username: testKibanaUrl.auth.split(':')[0], - password: testKibanaUrl.auth.split(':')[1] - }; - } - - const username = process.env.TEST_KIBANA_USERNAME || kibanaUser.username; - const password = process.env.TEST_KIBANA_PASSWORD || kibanaUser.password; - return { - protocol: process.env.TEST_KIBANA_PROTOCOL || 'http', - hostname: process.env.TEST_KIBANA_HOSTNAME || 'localhost', - port: parseInt(process.env.TEST_KIBANA_PORT, 10) || 5620, - auth: `${username}:${password}`, - username, - password, - }; -} - -export const kibanaTestServerUrlParts = getUrlParts(); diff --git a/test/scripts/jenkins_xpack.sh b/test/scripts/jenkins_xpack.sh index 90ed0dc884ab4..6207a9fc78fb8 100755 --- a/test/scripts/jenkins_xpack.sh +++ b/test/scripts/jenkins_xpack.sh @@ -35,14 +35,7 @@ mkdir -p "$installDir" tar -xzf "$linuxBuild" -C "$installDir" --strip=1 -echo " -> Running api integration tests" -cd "$XPACK_DIR" -node scripts/functional_tests_api --kibana-install-dir "$installDir" --es-from=source -echo "" -echo "" - - -echo " -> Running functional tests" +echo " -> Running functional and api tests" cd "$XPACK_DIR" xvfb-run node scripts/functional_tests --bail --kibana-install-dir "$installDir" --es-from=source echo "" diff --git a/test/shield.js b/test/shield.js deleted file mode 100644 index eb4fdcd4a22e6..0000000000000 --- a/test/shield.js +++ /dev/null @@ -1,16 +0,0 @@ -const env = process.env; - -export const kibanaUser = { - username: env.TEST_KIBANA_USER || 'elastic', - password: env.TEST_KIBANA_PASS || 'changeme' -}; - -export const kibanaServer = { - username: env.TEST_KIBANA_SERVER_USER || 'kibana', - password: env.TEST_KIBANA_SERVER_PASS || 'changeme' -}; - -export const admin = { - username: env.TEST_ES_USER || 'elastic', - password: env.TEST_ES_PASS || 'changeme' -}; diff --git a/x-pack/README.md b/x-pack/README.md index b0f3118f40f9f..194f341345bb8 100644 --- a/x-pack/README.md +++ b/x-pack/README.md @@ -54,7 +54,15 @@ yarn test:server #### Running functional tests -The functional tests are run against a live browser, Kibana, and Elasticsearch install. They build their own version of elasticsearch and x-pack-elasticsearch, run the builds automatically, startup the kibana server, and run the tests against them. +The functional UI tests, the API integration tests, and the SAML API integration tests are all run against a live browser, Kibana, and Elasticsearch install. Each set of tests is specified with a unique config that describes how to start the Elasticsearch server, the Kibana server, and what tests to run against them. The sets of tests that exist today are *functional UI tests* ([specified by this config](test/functional/config.js)), *API integration tests* ([specified by this config](test/api_integration/config.js)), and *SAML API integration tests* ([specified by this config](test/saml_api_integration/config.js)). + +The script runs all sets of tests sequentially like so: +* builds Elasticsearch and X-Pack +* runs Elasticsearch with X-Pack +* starts up the Kibana server with X-Pack +* runs the functional UI tests against those servers +* tears down the servers +* repeats the same process for the API and SAML API integration test configs. To do all of this in a single command run: @@ -62,61 +70,60 @@ To do all of this in a single command run: node scripts/functional_tests ``` -If you are **developing functional tests** then you probably don't want to rebuild elasticsearch and wait for all that setup on every test run, so instead use this command to get started: - -```sh -node scripts/functional_tests_server -``` +#### Running UI tests -After both Elasticsearch and Kibana are running, open a new terminal (without tearing down Elasticsearch, Kibana, etc.) and use the following to run the tests: +The functional UI tests can be run separately like so: ```sh -# this command accepts a bunch of arguments to tweak the run, try sending --help to learn more -node ../scripts/functional_test_runner +node scripts/functional_tests --config test/functional/config ``` -#### Running API integration tests +It does the same as the previous command, except that it only does setup/test/teardown for the UI tests. -API integration tests are very similar to functional tests in a sense that they are organized in the same way and run against live Kibana and Elasticsearch instances. -The difference is that API integration tests are intended to test only programmatic API exposed by Kibana. There is no need to run browser and simulate user actions that significantly reduces execution time. +#### Running API integration tests -To build, run `x-pack-kibana` with `x-pack-elasticsearch` and then run API integration tests against them use the following command: +API integration tests are run with a unique setup usually without UI assets built for the Kibana server. -```sh -node scripts/functional_tests_api -``` +API integration tests are intended to test _only programmatic API exposed by Kibana_. There is no need to run browser and simulate user actions, which significantly reduces execution time. In addition, the configuration for API integration tests typically sets `optimize.enabled=false` for Kibana because UI assets are usually not needed for these tests. -If you are **developing api integration tests** then you probably don't want to rebuild `x-pack-elasticsearch` and wait for all that setup on every test run, so instead use this command to get started: +The API integration tests can be run separately like so: ```sh -node scripts/functional_tests_server +node scripts/functional_tests --config test/api_integration/config ``` -Once Kibana and Elasticsearch are up and running open a new terminal and run this command to just run the tests (without tearing down Elasticsearch, Kibana, etc.) +#### Running SAML API integration tests + +We also have SAML API integration tests which set up Elasticsearch and Kibana with SAML support. Run API integration tests separately with SAML support like so: ```sh -# this command accepts a bunch of arguments to tweak the run, try sending --help to learn more -node ../scripts/functional_test_runner --config test/api_integration/config.js +node scripts/functional_tests --config test/saml_api_integration/config ``` -You can also run API integration tests with SAML support. The `--saml` option configures both Kibana and Elasticsearch -with the SAML security realm, as required by the SAML security API. +#### Developing functional tests -Start the functional test server with SAML support: +If you are **developing functional tests** then you probably don't want to rebuild Elasticsearch and wait for all that setup on every test run, so instead use this command to build and start just the Elasticsearch and Kibana servers: ```sh -node scripts/functional_tests_server --saml +node scripts/functional_tests_server ``` -Then run the tests with: +After the servers are started, open a new terminal and run this command to run just the tests (without tearing down Elasticsearch or Kibana): + ```sh # make sure you are in the x-pack-kibana project -cd x-pack-kibana +cd x-pack -# use a different config for SAML -node ../scripts/functional_test_runner --config test/saml_api_integration/config.js +# invoke the functional_test_runner from kibana project. try sending --help to learn more +node ../scripts/functional_test_runner ``` +For both of the above commands, it's crucial that you pass in `--config` to specify the same config file to both commands. This makes sure that the right tests will run against the right servers. Typically a set of tests and server configuration go together. + +Read more about how the scripts work [here](scripts/README.md). + +For a deeper dive, read more about the way functional tests and servers work [here](packages/kbn-test/README.md). + ### Issues starting dev more of creating builds You may see an error like this when you are getting started: diff --git a/x-pack/dev-tools/functional_tests/index.js b/x-pack/dev-tools/functional_tests/index.js deleted file mode 100644 index 6eba9bc3361bf..0000000000000 --- a/x-pack/dev-tools/functional_tests/index.js +++ /dev/null @@ -1,11 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License; - * you may not use this file except in compliance with the Elastic License. - */ - -export { - runFunctionTests, - runApiTests, - runFunctionalTestsServer, -} from './tasks'; diff --git a/x-pack/dev-tools/functional_tests/lib/errors.js b/x-pack/dev-tools/functional_tests/lib/errors.js deleted file mode 100644 index 58ef32a94ee0a..0000000000000 --- a/x-pack/dev-tools/functional_tests/lib/errors.js +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License; - * you may not use this file except in compliance with the Elastic License. - */ - -const $isCliError = Symbol('isCliError'); - -export function createCliError(message) { - const error = new Error(message); - error[$isCliError] = true; - return error; -} - -export function isCliError(error) { - return error && !!error[$isCliError]; -} diff --git a/x-pack/dev-tools/functional_tests/lib/get_ftr_config.js b/x-pack/dev-tools/functional_tests/lib/get_ftr_config.js deleted file mode 100644 index 65a584123d86e..0000000000000 --- a/x-pack/dev-tools/functional_tests/lib/get_ftr_config.js +++ /dev/null @@ -1,14 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License; - * you may not use this file except in compliance with the Elastic License. - */ - -import { readFtrConfigFile } from '@kbn/plugin-helpers'; - -import { FTR_CONFIG_PATH } from './paths'; -import { log } from './log'; - -export async function getFtrConfig() { - return await readFtrConfigFile(log, FTR_CONFIG_PATH); -} diff --git a/x-pack/dev-tools/functional_tests/lib/index.js b/x-pack/dev-tools/functional_tests/lib/index.js deleted file mode 100644 index 471e674446a3c..0000000000000 --- a/x-pack/dev-tools/functional_tests/lib/index.js +++ /dev/null @@ -1,14 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License; - * you may not use this file except in compliance with the Elastic License. - */ - -export { getFtrConfig } from './get_ftr_config'; - -export { runKibanaServer } from './run_kibana_server'; -export { runEsWithXpack } from './run_es_with_xpack'; -export { runFtr } from './run_ftr'; -export { log } from './log'; -export { KIBANA_FTR_SCRIPT } from './paths'; -export { isCliError } from './errors'; diff --git a/x-pack/dev-tools/functional_tests/lib/log.js b/x-pack/dev-tools/functional_tests/lib/log.js deleted file mode 100644 index 0997807563791..0000000000000 --- a/x-pack/dev-tools/functional_tests/lib/log.js +++ /dev/null @@ -1,10 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License; - * you may not use this file except in compliance with the Elastic License. - */ - -import { createToolingLog } from '@kbn/dev-utils'; - -export const log = createToolingLog('debug'); -log.pipe(process.stdout); diff --git a/x-pack/dev-tools/functional_tests/lib/paths.js b/x-pack/dev-tools/functional_tests/lib/paths.js deleted file mode 100644 index 019d531405597..0000000000000 --- a/x-pack/dev-tools/functional_tests/lib/paths.js +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License; - * you may not use this file except in compliance with the Elastic License. - */ - -import { resolve } from 'path'; - -import { resolveKibanaPath } from '@kbn/plugin-helpers'; - -function useBat(bin) { - return process.platform.startsWith('win') ? `${bin}.bat` : bin; -} - -export const KIBANA_BIN_PATH = useBat(resolveKibanaPath('bin/kibana')); -export const KIBANA_ROOT = resolveKibanaPath(''); -export const XPACK_KIBANA_ROOT = resolve(KIBANA_ROOT, 'x-pack'); -export const GULP_COMMAND_PATH = resolve(XPACK_KIBANA_ROOT, 'node_modules/.bin/gulp'); -export const KIBANA_FTR_SCRIPT = resolve(KIBANA_ROOT, 'scripts/functional_test_runner'); -export const PROJECT_ROOT = resolve(__dirname, '../../../'); -export const FTR_CONFIG_PATH = resolve(PROJECT_ROOT, 'test/functional/config'); -export const OPTIMIZE_BUNDLE_DIR = resolve(KIBANA_ROOT, 'optimize/xpackTestUiServer'); diff --git a/x-pack/dev-tools/functional_tests/lib/run_es_with_xpack.js b/x-pack/dev-tools/functional_tests/lib/run_es_with_xpack.js deleted file mode 100644 index e2cefdbed853e..0000000000000 --- a/x-pack/dev-tools/functional_tests/lib/run_es_with_xpack.js +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License; - * you may not use this file except in compliance with the Elastic License. - */ - -import { resolve } from 'path'; -import { createTestCluster } from '../../../../src/test_utils/es/es_test_cluster'; -import { log } from './log'; - -import { setupUsers, DEFAULT_SUPERUSER_PASS } from './auth'; - -export async function runEsWithXpack({ ftrConfig, useSAML = false, from }) { - const cluster = createTestCluster({ - port: ftrConfig.get('servers.elasticsearch.port'), - password: DEFAULT_SUPERUSER_PASS, - license: 'trial', - from, - log, - }); - - const kibanaPort = ftrConfig.get('servers.kibana.port'); - const idpPath = resolve( - __dirname, - '../../../test/saml_api_integration/fixtures/idp_metadata.xml' - ); - - const esArgs = [ - 'xpack.security.enabled=true', - ]; - - const samlEsArgs = [ - ...esArgs, - 'xpack.security.authc.token.enabled=true', - 'xpack.security.authc.token.timeout=15s', - 'xpack.security.authc.realms.saml1.type=saml', - 'xpack.security.authc.realms.saml1.order=0', - `xpack.security.authc.realms.saml1.idp.metadata.path=${idpPath}`, - 'xpack.security.authc.realms.saml1.idp.entity_id=http://www.elastic.co', - `xpack.security.authc.realms.saml1.sp.entity_id=http://localhost:${kibanaPort}`, - `xpack.security.authc.realms.saml1.sp.logout=http://localhost:${kibanaPort}/logout`, - `xpack.security.authc.realms.saml1.sp.acs=http://localhost:${kibanaPort}/api/security/v1/saml`, - 'xpack.security.authc.realms.saml1.attributes.principal=urn:oid:0.0.7', - ]; - - await cluster.start(useSAML ? samlEsArgs : esArgs); - await setupUsers(log, ftrConfig); - - return cluster; -} diff --git a/x-pack/dev-tools/functional_tests/lib/run_ftr.js b/x-pack/dev-tools/functional_tests/lib/run_ftr.js deleted file mode 100644 index 530c75ba098c5..0000000000000 --- a/x-pack/dev-tools/functional_tests/lib/run_ftr.js +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License; - * you may not use this file except in compliance with the Elastic License. - */ - - -import { - KIBANA_FTR_SCRIPT, - PROJECT_ROOT -} from './paths'; - -export async function runFtr({ procs, configPath, bail }) { - const args = [KIBANA_FTR_SCRIPT, '--debug']; - - if (configPath) { - args.push('--config', configPath); - } - - if (bail) { - args.push('--bail'); - } - - await procs.run('ftr', { - cmd: 'node', - args, - cwd: PROJECT_ROOT, - wait: true - }); -} diff --git a/x-pack/dev-tools/functional_tests/lib/run_kibana_server.js b/x-pack/dev-tools/functional_tests/lib/run_kibana_server.js deleted file mode 100644 index 3f9c097f56f72..0000000000000 --- a/x-pack/dev-tools/functional_tests/lib/run_kibana_server.js +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License; - * you may not use this file except in compliance with the Elastic License. - */ - -import { resolve, relative } from 'path'; -import { format as formatUrl } from 'url'; - -import { - KIBANA_ROOT, - KIBANA_BIN_PATH, - OPTIMIZE_BUNDLE_DIR -} from './paths'; - -export async function runKibanaServer(options) { - const { - procs, - ftrConfig, - devMode = false, - enableUI = true, - useSAML = false, - existingInstallDir = null, - } = options; - - if (devMode && existingInstallDir) { - throw new Error('Kibana installations can not be run in dev mode'); - } - - const runFromSourceArgs = existingInstallDir - ? ['--optimize.useBundleCache=true'] - : [ - '--no-base-path', - `--optimize.bundleDir=${OPTIMIZE_BUNDLE_DIR}`, - ]; - - const samlArgs = useSAML ? [ - '--server.xsrf.whitelist=[\"/api/security/v1/saml\"]', - '--xpack.security.authProviders=[\"saml\"]', - ] : []; - - // start the kibana server and wait for it to log "Server running" before resolving - await procs.run('kibana', { - cwd: existingInstallDir || KIBANA_ROOT, - - cmd: existingInstallDir - ? resolve(existingInstallDir, relative(KIBANA_ROOT, KIBANA_BIN_PATH)) - : KIBANA_BIN_PATH, - - args: [ - ...runFromSourceArgs, - devMode ? '--dev' : '--env=development', - '--logging.json=false', - `--server.port=${ftrConfig.get('servers.kibana.port')}`, - `--server.uuid=${ftrConfig.get('env').kibana.server.uuid}`, - `--elasticsearch.url=${formatUrl(ftrConfig.get('servers.elasticsearch'))}`, - `--optimize.enabled=${enableUI}`, - `--optimize.lazyPort=${ftrConfig.get('servers.kibana.port') + 1}`, - '--optimize.lazyPrebuild=true', - '--status.allowAnonymous=true', - `--elasticsearch.username=${ftrConfig.get('servers.elasticsearch.username')}`, - `--elasticsearch.password=${ftrConfig.get('servers.elasticsearch.password')}`, - '--xpack.security.encryptionKey="wuGNaIhoMpk5sO4UBxgr3NyW1sFcLgIf"', // server restarts should not invalidate active sessions - '--xpack.monitoring.kibana.collection.enabled=false', - '--xpack.xpack_main.telemetry.enabled=false', - ...samlArgs, - ], - - env: { - FORCE_COLOR: 1, - ...process.env, - }, - - wait: /Server running/, - }); -} diff --git a/x-pack/dev-tools/functional_tests/tasks.js b/x-pack/dev-tools/functional_tests/tasks.js deleted file mode 100644 index 35d91c31cd75e..0000000000000 --- a/x-pack/dev-tools/functional_tests/tasks.js +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License; - * you may not use this file except in compliance with the Elastic License. - */ - -import { relative } from 'path'; -import Rx from 'rxjs/Rx'; -import { Command } from 'commander'; -import { withProcRunner } from '@kbn/dev-utils'; - -import { - getFtrConfig, - runKibanaServer, - runEsWithXpack, - runFtr, - log, - KIBANA_FTR_SCRIPT, - isCliError, -} from './lib'; - -const SUCCESS_MESSAGE = ` - -Elasticsearch and Kibana are ready for functional testing. Start the functional tests -in another terminal session by running this command from this directory: - - node ${relative(process.cwd(), KIBANA_FTR_SCRIPT)} - -`; - -export function fatalErrorHandler(err) { - log.error('FATAL ERROR'); - log.error(isCliError(err) ? err.message : err); - process.exit(1); -} - -export async function runFunctionTests() { - try { - const cmd = new Command('node scripts/functional_tests'); - - cmd - .option( - '--bail', - 'Stop the functional_test_runner as soon as a failure occurs' - ) - .option( - '--kibana-install-dir ', - 'Run Kibana from an existing install directory' - ) - .option( - '--es-from ', - 'Run ES from either source or snapshot [default: snapshot]' - ) - .parse(process.argv); - - await withProcRunner(log, async procs => { - const ftrConfig = await getFtrConfig(); - - const es = await runEsWithXpack({ ftrConfig, from: cmd.esFrom }); - await runKibanaServer({ - procs, - ftrConfig, - existingInstallDir: cmd.kibanaInstallDir, - }); - await runFtr({ - procs, - bail: cmd.bail, - }); - - await procs.stop('kibana'); - await es.cleanup(); - }); - } catch (err) { - fatalErrorHandler(err); - } -} - -export async function runApiTests() { - const cmd = new Command('node scripts/functional_tests_api'); - - cmd - .option( - '--bail', - 'Stop the functional_test_runner as soon as a failure occurs' - ) - .option( - '--kibana-install-dir ', - 'Run Kibana from an existing install directory' - ) - .option( - '--es-from ', - 'Run ES from either source or snapshot [default: snapshot]' - ) - .parse(process.argv); - - try { - await withProcRunner(log, async procs => { - const ftrConfig = await getFtrConfig(); - - const es = await runEsWithXpack({ ftrConfig, from: cmd.esFrom }); - await runKibanaServer({ - procs, - ftrConfig, - enableUI: true, - existingInstallDir: cmd.kibanaInstallDir, - }); - await runFtr({ - procs, - configPath: require.resolve('../../test/api_integration/config.js'), - bail: cmd.bail, - }); - - await procs.stop('kibana'); - await es.cleanup(); - - // Run SAML specific API integration tests. - const samlEs = await runEsWithXpack({ - ftrConfig, - useSAML: true, - from: cmd.esFrom, - }); - await runKibanaServer({ - procs, - ftrConfig, - enableUI: false, - useSAML: true, - existingInstallDir: cmd.kibanaInstallDir, - }); - await runFtr({ - procs, - configPath: require.resolve( - '../../test/saml_api_integration/config.js' - ), - }); - - await procs.stop('kibana'); - await samlEs.cleanup(); - }); - } catch (err) { - fatalErrorHandler(err); - } -} - -export async function runFunctionalTestsServer() { - const cmd = new Command('node scripts/functional_test_server'); - - cmd - .option( - '--saml', - 'Run Elasticsearch and Kibana with configured SAML security realm', - false - ) - .option( - '--es-from ', - 'Run ES from either source or snapshot [default: snapshot]' - ) - .parse(process.argv); - - const useSAML = cmd.saml; - - try { - await withProcRunner(log, async procs => { - const ftrConfig = await getFtrConfig(); - await runEsWithXpack({ ftrConfig, useSAML, from: cmd.esFrom }); - await runKibanaServer({ - devMode: true, - procs, - ftrConfig, - useSAML, - }); - - // wait for 5 seconds of silence before logging the - // success message so that it doesn't get buried - await Rx.Observable.fromEvent(log, 'data') - .startWith(null) - .switchMap(() => Rx.Observable.timer(5000)) - .take(1) - .toPromise(); - - log.success(SUCCESS_MESSAGE); - await procs.waitForAllToStop(); - }); - } catch (err) { - fatalErrorHandler(err); - } -} diff --git a/x-pack/package.json b/x-pack/package.json index 131eac04afa0f..5dd06e3113aa5 100644 --- a/x-pack/package.json +++ b/x-pack/package.json @@ -24,7 +24,9 @@ }, "devDependencies": { "@kbn/dev-utils": "link:../packages/kbn-dev-utils", + "@kbn/es": "link:../packages/kbn-es", "@kbn/plugin-helpers": "link:../packages/kbn-plugin-helpers", + "@kbn/test": "link:../packages/kbn-test", "@types/jest": "^22.2.3", "abab": "^1.0.4", "ansicolors": "0.3.2", diff --git a/x-pack/scripts/functional_tests.js b/x-pack/scripts/functional_tests.js index 546d8baa78fc1..a7804100c52cb 100644 --- a/x-pack/scripts/functional_tests.js +++ b/x-pack/scripts/functional_tests.js @@ -5,4 +5,8 @@ */ require('@kbn/plugin-helpers').babelRegister(); -require('../dev-tools/functional_tests').runFunctionTests(); +require('@kbn/test').runTestsCli([ + require.resolve('../test/functional/config.js'), + require.resolve('../test/api_integration/config.js'), + require.resolve('../test/saml_api_integration/config.js'), +]); diff --git a/x-pack/scripts/functional_tests_api.js b/x-pack/scripts/functional_tests_api.js deleted file mode 100644 index f6aab24238c9d..0000000000000 --- a/x-pack/scripts/functional_tests_api.js +++ /dev/null @@ -1,8 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License; - * you may not use this file except in compliance with the Elastic License. - */ - -require('@kbn/plugin-helpers').babelRegister(); -require('../dev-tools/functional_tests').runApiTests(); diff --git a/x-pack/scripts/functional_tests_server.js b/x-pack/scripts/functional_tests_server.js index ebf21c320ac50..c361f1839c50b 100644 --- a/x-pack/scripts/functional_tests_server.js +++ b/x-pack/scripts/functional_tests_server.js @@ -5,4 +5,6 @@ */ require('@kbn/plugin-helpers').babelRegister(); -require('../dev-tools/functional_tests').runFunctionalTestsServer(); +require('@kbn/test').startServersCli( + require.resolve('../test/functional/config.js'), +); diff --git a/x-pack/test/api_integration/config.js b/x-pack/test/api_integration/config.js index c994383c82be2..2a28fe73bc3a9 100644 --- a/x-pack/test/api_integration/config.js +++ b/x-pack/test/api_integration/config.js @@ -11,7 +11,7 @@ export default async function ({ readConfigFile }) { // Read the Kibana API integration tests config file so that we can utilize its services. const kibanaAPITestsConfig = await readConfigFile(require.resolve('../../../test/api_integration/config.js')); const xPackFunctionalTestsConfig = await readConfigFile(require.resolve('../functional/config.js')); - const kibanaFunctionalConfig = await readConfigFile(require.resolve('../../../test/functional/config.js')); + const kibanaCommonConfig = await readConfigFile(require.resolve('../../../test/common/config.js')); return { testFiles: [require.resolve('./apis')], @@ -20,12 +20,15 @@ export default async function ({ readConfigFile }) { supertest: kibanaAPITestsConfig.get('services.supertest'), esSupertest: kibanaAPITestsConfig.get('services.esSupertest'), supertestWithoutAuth: SupertestWithoutAuthProvider, - es: kibanaFunctionalConfig.get('services.es'), - esArchiver: kibanaFunctionalConfig.get('services.esArchiver'), + es: kibanaCommonConfig.get('services.es'), + esArchiver: kibanaCommonConfig.get('services.esArchiver'), }, esArchiver: xPackFunctionalTestsConfig.get('esArchiver'), junit: { reportName: 'X-Pack API Integration Tests', }, + env: xPackFunctionalTestsConfig.get('env'), + kibanaServerArgs: xPackFunctionalTestsConfig.get('kibanaServerArgs'), + esTestCluster: xPackFunctionalTestsConfig.get('esTestCluster'), }; } diff --git a/x-pack/test/functional/config.js b/x-pack/test/functional/config.js index bef6355fdb775..75a18126f1cca 100644 --- a/x-pack/test/functional/config.js +++ b/x-pack/test/functional/config.js @@ -7,6 +7,7 @@ /* eslint-disable kibana-custom/no-default-export */ import { resolve } from 'path'; +import { format as formatUrl } from 'url'; import { SecurityPageProvider, @@ -52,11 +53,37 @@ import { // that returns an object with the projects config values 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(require.resolve('../../../test/functional/config.js')); + const kibanaCommonConfig = await readConfigFile(require.resolve('../../../test/common/config.js')); + const kibanaFunctionalConfig = await readConfigFile(require.resolve('../../../test/functional/config.js')); const kibanaAPITestsConfig = await readConfigFile(require.resolve('../../../test/api_integration/config.js')); + const servers = { + elasticsearch: { + protocol: process.env.TEST_ES_PROTOCOL || 'http', + hostname: process.env.TEST_ES_HOSTNAME || 'localhost', + port: parseInt(process.env.TEST_ES_PORT, 10) || 9240, + auth: 'elastic:changeme', + username: 'elastic', + password: 'changeme', + }, + kibana: { + protocol: process.env.TEST_KIBANA_PROTOCOL || 'http', + hostname: process.env.TEST_KIBANA_HOSTNAME || 'localhost', + port: parseInt(process.env.TEST_KIBANA_PORT, 10) || 5640, + auth: 'elastic:changeme', + username: 'elastic', + password: 'changeme', + }, + }; + + const env = { + kibana: { + server: { + uuid: '5b2de169-2785-441b-ae8c-186a1936b17d', // Kibana UUID for "primary" cluster in monitoring data + } + } + }; + return { // list paths to the files that contain your plugins tests testFiles: [ @@ -74,7 +101,7 @@ export default async function ({ readConfigFile }) { // available to your tests. If you don't specify anything here // only the built-in services will be avaliable services: { - ...kibanaConfig.get('services'), + ...kibanaFunctionalConfig.get('services'), esSupertest: kibanaAPITestsConfig.get('services.esSupertest'), monitoringNoData: MonitoringNoDataProvider, monitoringClusterList: MonitoringClusterListProvider, @@ -107,7 +134,7 @@ export default async function ({ readConfigFile }) { // just like services, PageObjects are defined as a map of // names to Providers. Merge in Kibana's or pick specific ones pageObjects: { - ...kibanaConfig.get('pageObjects'), + ...kibanaFunctionalConfig.get('pageObjects'), security: SecurityPageProvider, reporting: ReportingPageProvider, monitoring: MonitoringPageProvider, @@ -117,34 +144,35 @@ export default async function ({ readConfigFile }) { watcher: WatcherPageProvider, }, - servers: { - elasticsearch: { - port: 9240, - auth: 'elastic:changeme', - username: 'elastic', - password: 'changeme', - }, - kibana: { - port: 5640, - auth: 'elastic:changeme', - username: 'elastic', - password: 'changeme', - }, - }, - env: { - kibana: { - server: { - uuid: '5b2de169-2785-441b-ae8c-186a1936b17d', // Kibana UUID for "primary" cluster in monitoring data - } - } + servers, + + env, + + esTestCluster: { + license: 'trial', + from: 'source', + serverArgs: [ + 'xpack.license.self_generated.type=trial', + 'xpack.security.enabled=true', + ], }, + kibanaServerArgs: [ + ...kibanaCommonConfig.get('kibanaServerArgs'), + `--server.uuid=${env.kibana.server.uuid}`, + `--server.port=${servers.kibana.port}`, + `--elasticsearch.url=${formatUrl(servers.elasticsearch)}`, + '--xpack.monitoring.kibana.collection.enabled=false', + '--xpack.xpack_main.telemetry.enabled=false', + '--xpack.security.encryptionKey="wuGNaIhoMpk5sO4UBxgr3NyW1sFcLgIf"', // server restarts should not invalidate active sessions + ], + // the apps section defines the urls that // `PageObjects.common.navigateTo(appKey)` will use. // Merge urls for your plugin with the urls defined in // Kibana's config in order to use this helper apps: { - ...kibanaConfig.get('apps'), + ...kibanaFunctionalConfig.get('apps'), login: { pathname: '/login' }, diff --git a/x-pack/test/saml_api_integration/config.js b/x-pack/test/saml_api_integration/config.js index 334ab0c151a9d..c5b7abcf4479e 100644 --- a/x-pack/test/saml_api_integration/config.js +++ b/x-pack/test/saml_api_integration/config.js @@ -4,11 +4,15 @@ * you may not use this file except in compliance with the Elastic License. */ +import { resolve } from 'path'; + export default async function ({ readConfigFile }) { - // Read the Kibana API integration tests config file so that we can utilize its services. const kibanaAPITestsConfig = await readConfigFile(require.resolve('../../../test/api_integration/config.js')); const xPackAPITestsConfig = await readConfigFile(require.resolve('../api_integration/config.js')); + const kibanaPort = xPackAPITestsConfig.get('servers.kibana.port'); + const idpPath = resolve(__dirname, '../../test/saml_api_integration/fixtures/idp_metadata.xml'); + return { testFiles: [require.resolve('./apis')], servers: xPackAPITestsConfig.get('servers'), @@ -19,5 +23,30 @@ export default async function ({ readConfigFile }) { junit: { reportName: 'X-Pack SAML API Integration Tests', }, + env: xPackAPITestsConfig.get('env'), + + esTestCluster: { + ...xPackAPITestsConfig.get('esTestCluster'), + serverArgs: [ + ...xPackAPITestsConfig.get('esTestCluster.serverArgs'), + 'xpack.security.authc.token.enabled=true', + 'xpack.security.authc.token.timeout=15s', + 'xpack.security.authc.realms.saml1.type=saml', + 'xpack.security.authc.realms.saml1.order=0', + `xpack.security.authc.realms.saml1.idp.metadata.path=${idpPath}`, + 'xpack.security.authc.realms.saml1.idp.entity_id=http://www.elastic.co', + `xpack.security.authc.realms.saml1.sp.entity_id=http://localhost:${kibanaPort}`, + `xpack.security.authc.realms.saml1.sp.logout=http://localhost:${kibanaPort}/logout`, + `xpack.security.authc.realms.saml1.sp.acs=http://localhost:${kibanaPort}/api/security/v1/saml`, + 'xpack.security.authc.realms.saml1.attributes.principal=urn:oid:0.0.7', + ], + }, + + kibanaServerArgs: [ + ...xPackAPITestsConfig.get('kibanaServerArgs'), + '--optimize.enabled=false', + '--server.xsrf.whitelist=[\"/api/security/v1/saml\"]', + '--xpack.security.authProviders=[\"saml\"]', + ], }; } diff --git a/x-pack/yarn.lock b/x-pack/yarn.lock index 993173a69ebae..4a57654ce84c4 100644 --- a/x-pack/yarn.lock +++ b/x-pack/yarn.lock @@ -54,10 +54,18 @@ version "0.0.0" uid "" +"@kbn/es@link:../packages/kbn-es": + version "0.0.0" + uid "" + "@kbn/plugin-helpers@link:../packages/kbn-plugin-helpers": version "0.0.0" uid "" +"@kbn/test@link:../packages/kbn-test": + version "0.0.0" + uid "" + "@kbn/ui-framework@link:../packages/kbn-ui-framework": version "0.0.0" uid "" @@ -103,6 +111,12 @@ agentkeepalive@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/agentkeepalive/-/agentkeepalive-2.2.0.tgz#c5d1bd4b129008f1163f236f86e5faea2026e2ef" +agentkeepalive@^3.4.1: + version "3.4.1" + resolved "https://registry.yarnpkg.com/agentkeepalive/-/agentkeepalive-3.4.1.tgz#aa95aebc3a749bca5ed53e3880a09f5235b48f0c" + dependencies: + humanize-ms "^1.2.1" + ajv@^4.9.1: version "4.11.8" resolved "https://registry.yarnpkg.com/ajv/-/ajv-4.11.8.tgz#82ffb02b29e662ae53bdc20af15947706739c536" @@ -1174,9 +1188,9 @@ chalk@^2.0.0, chalk@^2.0.1, chalk@^2.3.0: escape-string-regexp "^1.0.5" supports-color "^4.0.0" -chalk@^2.3.2: - version "2.3.2" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.3.2.tgz#250dc96b07491bfd601e648d66ddf5f60c7a5c65" +chalk@^2.3.1, chalk@^2.3.2, chalk@^2.4.1: + version "2.4.1" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.1.tgz#18c49ab16a037b6eb0152cc83e3471338215b66e" dependencies: ansi-styles "^3.2.1" escape-string-regexp "^1.0.5" @@ -1203,6 +1217,10 @@ cheerio@^1.0.0-rc.2: lodash "^4.15.0" parse5 "^3.0.1" +chownr@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.0.1.tgz#e2a75042a9551908bebd25b8523d5f9769d79181" + chrome-remote-interface@0.24.2: version "0.24.2" resolved "https://registry.yarnpkg.com/chrome-remote-interface/-/chrome-remote-interface-0.24.2.tgz#43a05440a1fa60b73769e72f3e7892ac11d66eba" @@ -1943,6 +1961,17 @@ elasticsearch@13.0.1: lodash.isempty "^4.4.0" lodash.trimend "^4.5.1" +elasticsearch@^14.1.0: + version "14.2.2" + resolved "https://registry.yarnpkg.com/elasticsearch/-/elasticsearch-14.2.2.tgz#6bbb63b19b17fa97211b22eeacb0f91197f4d6b6" + dependencies: + agentkeepalive "^3.4.1" + chalk "^1.0.0" + lodash "2.4.2" + lodash.get "^4.4.2" + lodash.isempty "^4.4.0" + lodash.trimend "^4.5.1" + encoding@^0.1.11: version "0.1.12" resolved "https://registry.yarnpkg.com/encoding/-/encoding-0.1.12.tgz#538b66f3ee62cd1ab51ec323829d1f9480c74beb" @@ -2615,6 +2644,10 @@ get-value@^2.0.3, get-value@^2.0.6: version "2.0.6" resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" +getopts@^2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/getopts/-/getopts-2.0.6.tgz#4788d533a977527e79efd57b5e742ffa0dd33105" + getos@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/getos/-/getos-3.1.0.tgz#db3aa4df15a3295557ce5e81aa9e3e5cdfaa6567" @@ -3225,6 +3258,12 @@ http-signature@~1.2.0: jsprim "^1.2.2" sshpk "^1.7.0" +humanize-ms@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/humanize-ms/-/humanize-ms-1.2.1.tgz#c46e3159a293f6b896da29316d8b6fe8bb79bbed" + dependencies: + ms "^2.0.0" + humps@2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/humps/-/humps-2.0.1.tgz#dd02ea6081bd0568dc5d073184463957ba9ef9aa" @@ -4729,6 +4768,10 @@ ms@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" +ms@^2.0.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a" + multimatch@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/multimatch/-/multimatch-2.0.0.tgz#c5ada425357b744ba54842ebdce1c8f0be542b6f" @@ -4813,7 +4856,7 @@ node-fetch@^1.0.1: encoding "^0.1.11" is-stream "^1.0.1" -node-fetch@^2.1.2: +node-fetch@^2.0.0, node-fetch@^2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.1.2.tgz#ab884e8e7e57e38a944753cec706f788d1768bb5" @@ -5103,7 +5146,7 @@ os-shim@^0.1.2: version "0.1.3" resolved "https://registry.yarnpkg.com/os-shim/-/os-shim-0.1.3.tgz#6b62c3791cf7909ea35ed46e17658bb417cb3917" -os-tmpdir@^1.0.0, os-tmpdir@^1.0.1, os-tmpdir@~1.0.1: +os-tmpdir@^1.0.0, os-tmpdir@^1.0.1, os-tmpdir@~1.0.1, os-tmpdir@~1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" @@ -6251,6 +6294,12 @@ rxjs@5.3.0: dependencies: symbol-observable "^1.0.1" +rxjs@^5.4.3: + version "5.5.10" + resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-5.5.10.tgz#fde02d7a614f6c8683d0d1957827f492e09db045" + dependencies: + symbol-observable "1.0.1" + safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@~5.1.0, safe-buffer@~5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.1.tgz#893312af69b2123def71f57889001671eeb2c853" @@ -6390,6 +6439,12 @@ simple-git@1.37.0: version "1.37.0" resolved "https://registry.yarnpkg.com/simple-git/-/simple-git-1.37.0.tgz#a5d522dd4e97c6091f657766c28a323738233f0f" +simple-git@^1.91.0: + version "1.92.0" + resolved "https://registry.yarnpkg.com/simple-git/-/simple-git-1.92.0.tgz#6061468eb7d19f0141078fc742e62457e910f547" + dependencies: + debug "^3.1.0" + sinon-as-promised@4.0.3: version "4.0.3" resolved "https://registry.yarnpkg.com/sinon-as-promised/-/sinon-as-promised-4.0.3.tgz#c0545b1685fd813588a4ed697012487ed11d151b" @@ -6790,6 +6845,10 @@ supports-color@^5.3.0: dependencies: has-flag "^3.0.0" +symbol-observable@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.0.1.tgz#8340fc4702c3122df5d22288f88283f513d3fdd4" + symbol-observable@^1.0.1, symbol-observable@^1.0.3: version "1.1.0" resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.1.0.tgz#5c68fd8d54115d9dfb72a84720549222e8db9b32" @@ -6818,6 +6877,24 @@ tar-fs@1.13.0: pump "^1.0.0" tar-stream "^1.1.2" +tar-fs@^1.16.0: + version "1.16.0" + resolved "https://registry.yarnpkg.com/tar-fs/-/tar-fs-1.16.0.tgz#e877a25acbcc51d8c790da1c57c9cf439817b896" + dependencies: + chownr "^1.0.1" + mkdirp "^0.5.1" + pump "^1.0.0" + tar-stream "^1.1.2" + +tar-fs@^1.16.2: + version "1.16.2" + resolved "https://registry.yarnpkg.com/tar-fs/-/tar-fs-1.16.2.tgz#17e5239747e399f7e77344f5f53365f04af53577" + dependencies: + chownr "^1.0.1" + mkdirp "^0.5.1" + pump "^1.0.0" + tar-stream "^1.1.2" + tar-pack@^3.4.0: version "3.4.1" resolved "https://registry.yarnpkg.com/tar-pack/-/tar-pack-3.4.1.tgz#e1dbc03a9b9d3ba07e896ad027317eb679a10a1f" @@ -6950,6 +7027,12 @@ tmp@^0.0.29: dependencies: os-tmpdir "~1.0.1" +tmp@^0.0.33: + version "0.0.33" + resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" + dependencies: + os-tmpdir "~1.0.2" + tmpl@1.0.x: version "1.0.4" resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.4.tgz#23640dd7b42d00433911140820e5cf440e521dd1" @@ -7595,3 +7678,7 @@ yazl@^2.1.0: resolved "https://registry.yarnpkg.com/yazl/-/yazl-2.4.3.tgz#ec26e5cc87d5601b9df8432dbdd3cd2e5173a071" dependencies: buffer-crc32 "~0.2.3" + +zlib@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/zlib/-/zlib-1.0.5.tgz#6e7c972fc371c645a6afb03ab14769def114fcc0" diff --git a/yarn.lock b/yarn.lock index 60b5d480424dc..050cd4b96e376 100644 --- a/yarn.lock +++ b/yarn.lock @@ -157,6 +157,10 @@ version "0.0.0" uid "" +"@kbn/test@link:packages/kbn-test": + version "0.0.0" + uid "" + "@kbn/ui-framework@link:packages/kbn-ui-framework": version "0.0.0" uid "" @@ -2105,6 +2109,14 @@ chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0, chalk@^2.3.0, chalk@^2.3.1, chalk@^2.3 escape-string-regexp "^1.0.5" supports-color "^5.3.0" +chalk@^2.4.1: + version "2.4.1" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.1.tgz#18c49ab16a037b6eb0152cc83e3471338215b66e" + dependencies: + ansi-styles "^3.2.1" + escape-string-regexp "^1.0.5" + supports-color "^5.3.0" + chalk@~0.5.1: version "0.5.1" resolved "https://registry.yarnpkg.com/chalk/-/chalk-0.5.1.tgz#663b3a648b68b55d04690d49167aa837858f2174" @@ -5003,6 +5015,10 @@ getopts@^2.0.0: version "2.0.5" resolved "https://registry.yarnpkg.com/getopts/-/getopts-2.0.5.tgz#e4d3948e87fd9fb50c8a0f2912f4de16301fb8ae" +getopts@^2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/getopts/-/getopts-2.0.6.tgz#4788d533a977527e79efd57b5e742ffa0dd33105" + getos@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/getos/-/getos-3.1.0.tgz#db3aa4df15a3295557ce5e81aa9e3e5cdfaa6567" @@ -10822,6 +10838,12 @@ rxjs@5.4.3: dependencies: symbol-observable "^1.0.1" +rxjs@^5.4.3: + version "5.5.10" + resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-5.5.10.tgz#fde02d7a614f6c8683d0d1957827f492e09db045" + dependencies: + symbol-observable "1.0.1" + safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@~5.1.0, safe-buffer@~5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.1.tgz#893312af69b2123def71f57889001671eeb2c853" @@ -11695,6 +11717,10 @@ svgo@^0.7.0: sax "~1.2.1" whet.extend "~0.9.9" +symbol-observable@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.0.1.tgz#8340fc4702c3122df5d22288f88283f513d3fdd4" + symbol-observable@^1.0.1, symbol-observable@^1.0.3: version "1.2.0" resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.2.0.tgz#c22688aed4eab3cdc2dfeacbb561660560a00804" @@ -11758,6 +11784,15 @@ tar-fs@^1.16.0: pump "^1.0.0" tar-stream "^1.1.2" +tar-fs@^1.16.2: + version "1.16.2" + resolved "https://registry.yarnpkg.com/tar-fs/-/tar-fs-1.16.2.tgz#17e5239747e399f7e77344f5f53365f04af53577" + dependencies: + chownr "^1.0.1" + mkdirp "^0.5.1" + pump "^1.0.0" + tar-stream "^1.1.2" + tar-pack@^3.4.0: version "3.4.1" resolved "https://registry.yarnpkg.com/tar-pack/-/tar-pack-3.4.1.tgz#e1dbc03a9b9d3ba07e896ad027317eb679a10a1f"