From f3803a15bc3f47bcff7613be6d0c62da23328ebc Mon Sep 17 00:00:00 2001 From: Kim Joar Bekkelund Date: Mon, 19 Jun 2017 23:14:13 +0200 Subject: [PATCH] removing integration tests for now --- .../__tests__/__snapshots__/cli.test.ts.snap | 38 ------------------- .../integration_tests/__tests__/cli.test.ts | 7 ---- platform/integration_tests/runCli.ts | 22 ----------- 3 files changed, 67 deletions(-) delete mode 100644 platform/integration_tests/__tests__/__snapshots__/cli.test.ts.snap delete mode 100644 platform/integration_tests/__tests__/cli.test.ts delete mode 100644 platform/integration_tests/runCli.ts diff --git a/platform/integration_tests/__tests__/__snapshots__/cli.test.ts.snap b/platform/integration_tests/__tests__/__snapshots__/cli.test.ts.snap deleted file mode 100644 index ab8ffdacff8f864..000000000000000 --- a/platform/integration_tests/__tests__/__snapshots__/cli.test.ts.snap +++ /dev/null @@ -1,38 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`displays help 1`] = ` -Object { - "status": 0, - "stderr": "", - "stdout": "Usage: bin/kibana [options] - -Kibana is an open source (Apache Licensed), browser-based analytics and search -dashboard for Elasticsearch. - -Options: - --version, -v Show version number [boolean] - --help, -h Show help [boolean] - --config, -c Path to the config file, can be changed with the - \`CONFIG_PATH\` environment variable as well. [string] - --elasticsearch, -e URI for Elasticsearch instance [string] - --host, -H The host to bind to [string] - --port, -p The port to bind Kibana to [number] - --quiet, -q Prevent all logging except errors - --silent, -Q Prevent all logging - --verbose Turns on verbose logging - --log-file, -l The file to log to [string] - --dev Run the server with development mode defaults - --ssl Dev only. Specify --no-ssl to not run the dev server - using HTTPS [boolean] [default: true] - --base-path Dev only. Specify --no-base-path to not put a proxy with - a random base path in front of the dev server - [boolean] [default: true] - --watch Dev only. Specify --no-watch to prevent automatic - restarts of the server in dev mode - [boolean] [default: true] - -Documentation: https://elastic.co/kibana - -", -} -`; diff --git a/platform/integration_tests/__tests__/cli.test.ts b/platform/integration_tests/__tests__/cli.test.ts deleted file mode 100644 index cb172cd0113eeff..000000000000000 --- a/platform/integration_tests/__tests__/cli.test.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { pick } from 'lodash'; -import { runCli } from '../runCli'; - -test('displays help', () => { - const result = runCli('.', ['--help']); - expect(pick(result, ['stdout', 'stderr', 'status'])).toMatchSnapshot(); -}); diff --git a/platform/integration_tests/runCli.ts b/platform/integration_tests/runCli.ts deleted file mode 100644 index b003e60cb1c9431..000000000000000 --- a/platform/integration_tests/runCli.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { resolve } from 'path'; -import { spawnSync } from 'child_process'; - -const KIBANA_CLI_PATH = resolve(__dirname, '../../scripts/platform.js'); - -export function runCli(dir: string, args: string[] = []) { - const isRelative = dir[0] !== '/'; - - if (isRelative) { - dir = resolve(__dirname, dir); - } - - const result = spawnSync('node', [KIBANA_CLI_PATH, ...args], { - cwd: dir - }); - - return { - ...result, - stdout: result.stdout && result.stdout.toString(), - stderr: result.stderr && result.stderr.toString() - }; -};