Commit graph

25 commits

Author SHA1 Message Date
Spencer 4c2a90dbdd
[tslint] lint typescript code (#19105)
* [tslint] lint typescript code

* [tslint] filter projects when running specific project

* [dev/ts] use more explicit types

* [dev/ts] add note about why using glob

* [dev/ts] rely on ts, use fewer getters
2018-05-22 14:00:02 -07:00
Spencer f24a725144
[mocha] remove grunt-simple-mocha (#19079)
* [mocha] run tests with mocha script, remove grunt-simple-mocha

* [ci] force colored output

* [ci] disable color when reading the yarn bin

* [dev/build/exec] support tooling log having its own chalk

* [dev/mocha] avoid changing the cwd of the process

* [dev/mocha] only match files, speed up negative matches

* [cli/serve/test] strip ansi control characters from logs

* [ci] disable color in all `yarn bin` invocations

* [dev/mocha] cleanup old runInBand check

* [dev/mocha] enable gloabl leak checks
2018-05-16 10:43:55 -07:00
archana b58e757794
Functional test setup with kbn-test package (#18568)
Restructure testing with kbn-test package

 - Run with multiple configs, move cli options to config
 - Package-ify kbn-test
 - Eventually we'll have functional_test_runner live in a package
of its own, and then this kbn-test will use that as a dependency,
probably still as a devDependency.
 - Implement functional_tests_server
 - Collapse single and multiple config apis into one command

Use kbn-es

Replace es_test_cluster + es_test_config with kbn/test utils

Implement new createEsTestCluster

Improve scripts, jsdocs, cli top-level tools

Lift error handling to the top level
2018-05-09 18:23:49 -05:00
Tyler Smalley 5d8cf56532
[kbn-es] Use basic license as default (#18577)
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2018-04-25 14:00:24 -07:00
Jenkins CI fe4609647d Migrate x-pack-kibana source to kibana 2018-04-24 13:48:10 -07:00
Spencer 608a1e3553
Add/generate/verify NOTICE.txt file (#17504)
* [dev/notice] add scripts for generating NOTICE.txt file

* [notice] react-resize-detector@0.6.0 was removed in b445389b79

* [notice] move notice text into relevant source

* [dev/notice] Generate NOTICE.txt file

* [jenkins] verify that notice.txt is up to date in CI

* [tasks/notice] update test to use new NOTICE.txt file

* [dev/notice] update company name in NOTICE.txt

* [notice/cli] exit with 0 when --help requested

* [notice/cli] add helpful logging

* [notice/cli] use --validate flag name instead

* [notice/cli] simplify NEWLINE_RE, ignore obscure line endings

* [utils/decode_geo_hash] fixup comment

* [utils/decode_geo_hash] remove useless comment
2018-04-04 09:12:44 -07:00
Tyler Smalley 82e17f435f
[kbn-es] Package for managing Elasticsearch during dev and testing (#17168)
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2018-03-20 08:30:15 -07:00
Aleh Zasypkin f2fda4aca3
Introduce Jest integration tests. (#16735) 2018-02-19 17:02:01 +01:00
Spencer 4d246a10a8
[kbn-pm] rename from kbn-build (#16739) 2018-02-14 10:57:13 -07:00
Spencer 2c7a1f34cb
[kbn-plugin-generator] add plugin generator to the repo (#16655)
* [kbn-plugin-generator] add plugin generator to the repo

* [plugin-generator] use snake_case plugin name for directory name

* [plugin-generator] fix typo

* [plugin-generator] remove translation support until we resume i18n efforts

* [yarn] update lockfile

* [mocha] remove plugin-generator selector from mocha tests

* [plugin-generator] update generated readme to recommend yarn

* [plugin-generator] add readme to generator pacakge

* [plugin-generator] link from plugin-resource docs

* [plugin-generator] mention very important `kbn bootstrap` script

* [plugin-generator] rework some parts of the README

* [plugin-generator] log actual directory name with system separators

* [plugin-generator] include bootstrap/yarn preinstall check script
2018-02-12 12:23:23 -07:00
Jonathan Budzenski 37e42432c6
Snake case scripts/kibana-keystore.js and scripts/kibana-plugin.js (#15331) 2018-02-02 09:54:02 -06:00
Kim Joar Bekkelund 08e48aa847
Kibana build tool (#15055)
* Introduce `kbn`, the Kibana build tool

* yarn kbn

* Make all deps devDeps

* Exclude __fixtures__ folder from Jest to avoid warnings

* Review fixes

* Update readme

* Use 'yarn kbn'

* Consistent rootPath

* Link to kbn tool

* Unsupported URL 'debug help' in contributing guide
2018-01-24 10:34:52 +01:00
Spencer f71ec29bd6
[CI] Produce junit test reports (#15281)
* [mocha] use custom reporter for legible results in jenkins

* [jest] use custom result processor for legible results in jenkins

* [karma] enable junit output on CI

* [mocha/junitReporter] accept rootDirectory as configuration

* [jest/reporter] use reporters option added in jest 20

* [toolingLog] remove black/white specific colors

* [dev/mocha/junit] no reason for junit to be a "reporter"

* typos

* [dev/mocha/junit] use else if

* [karma/junit] use string#replace for explicitness

* [junit] use test file path as "classname"

* [ftr/mocha] no longer a "console" specific reporter
2017-12-05 17:29:48 -07:00
Jonathan Budzenski ee4828b726
Remove node fallback from kibana-keystore (#15066) 2017-11-27 10:11:38 -06:00
Jonathan Budzenski 218986c07e
Create separate startup scripts for development and production (#13806)
* Use separate startup scripts for development and production

* build kibana directly

* [build] Use downloaded node when pre-optimizing

* clearer variable name

* Add breaking changes docs
2017-11-22 12:49:37 -06:00
Spencer 95329c581f
[precommit hook] add dev script (#14890)
* [precommitHook] move to dev script

* [eslint] fix lint error

* [dev/eslint] do simply boolean checks first

* [dev] use shared REPO_ROOT constant

* [dev/File] precompute relative/ext of path

* [dev/eslint] fix relative import

* [dev/eslint] fix typos

* [grunt] remove unused run:eslintStaged config

* [dev/run] only create log if we are going to use it

* [dev/run/isFailError] ensure return value is Boolean

* [dev/precommitHook] use less intermediate vars
2017-11-20 14:22:24 -07:00
Spencer a3014d7a63
[eslint] add eslint dev script (#14889) 2017-11-14 10:11:59 -07:00
Søren Louv-Jansen 7dbb01552e Add Backport to toolchain (#14525) 2017-10-24 16:38:18 -04:00
Spencer 48d35f81fd create babel-preset and babel-register modules (#13973)
* [babel] create babel-preset and babel-register modules

* [babel-preset] add comments to babel-preset-env.target choices

* [babel-preset] use more normal BUILT_WITH_BABEL signal

* [babel-register] extended comment about filtering ./src in dist

* [babel-preset] stage of class properties has changed, sorta
2017-09-19 17:44:47 -07:00
Court Ewing 7b836f91b2 Shortcut to build asciidocs (#13164)
* Shortcut to build asciidocs

The command to build the Kibana docs using the elastic/docs repo can be
easy to forget, so this script is an easy to way to do it right every
time.

* Configurable docs repo location

For folks that clone the elastic docs repo to a different location than
as a sibling of kibana.
2017-08-23 10:27:34 -04:00
Spencer d3ba428796 [ftr] make room for more projects (#11848)
Squashed commit of the following:

commit 659ea986fdeb9a5ff2ca1fa5360cccb01c671ede
Author: spalger <spalger@users.noreply.github.com>
Date:   Wed May 17 09:19:22 2017 -0700

    [test/*/fixtures] rename es_archives to es_archiver

commit d3667457c78e88e2d6974f3c38dd0fe61b846b91
Author: spalger <spalger@users.noreply.github.com>
Date:   Wed May 17 08:22:03 2017 -0700

    [ftr/config] fix default directory value functions

commit 9a6a2cc0b295e2281e83da04fcea40e9d6f00781
Author: spalger <spalger@users.noreply.github.com>
Date:   Wed May 17 07:30:52 2017 -0700

    fix import paths

commit fcb65a877d54b5b1d36b8c81f1264b36845e826e
Author: spalger <spalger@users.noreply.github.com>
Date:   Tue May 16 21:39:57 2017 -0700

    [grunt/ftr] use named exports for configs

commit 7d7f38c7615cdbf8eb0119efc0f2a5188bca8792
Author: spalger <spalger@users.noreply.github.com>
Date:   Tue May 16 18:50:04 2017 -0700

    [test] remove unnecessary directory definitions

commit 0c28984669768482f0a2ee7fc2800d5bcaf49025
Author: spalger <spalger@users.noreply.github.com>
Date:   Tue May 16 18:46:29 2017 -0700

    [ftr/config] make default directories relative to config path

commit cd2f33612624cacffec138797f3fc0f4ecb46cca
Author: spalger <spalger@users.noreply.github.com>
Date:   Tue May 16 18:32:12 2017 -0700

    [test/common] put server config into common

commit 7851ed811a236576c63bd20850b3ef2099be2a4e
Author: spalger <spalger@users.noreply.github.com>
Date:   Tue May 16 18:18:20 2017 -0700

    [grunt] "deprecate" test:api:runner task

commit b2ac4c26593a1947c94f0168191fe8123ff74122
Author: spalger <spalger@users.noreply.github.com>
Date:   Tue May 16 18:15:41 2017 -0700

    [ftr] accept the project name as an unnamed arg

commit 47e292894fc70c0a04883403c50c5d2ae0738d76
Author: spalger <spalger@users.noreply.github.com>
Date:   Tue May 16 17:56:34 2017 -0700

    [ftr/grunt] convert ftr task to multi-task with config

commit 83375855f88e5e7b3fa8b6a1c5d24a9f54766ce5
Author: spalger <spalger@users.noreply.github.com>
Date:   Tue May 16 17:54:54 2017 -0700

    [test/functional] move fixtures into test/functional project

commit 05994e9c92cf134c58f831c285b3b522a801acbc
Author: spalger <spalger@users.noreply.github.com>
Date:   Tue May 16 17:02:51 2017 -0700

    [src/test_utils] merge with test/utils directory

commit c77ee5ed36b8b7eadf876cb6d9482a49dfc92b66
Author: spalger <spalger@users.noreply.github.com>
Date:   Tue May 16 16:53:00 2017 -0700

    [test/api_integration] migrate api tests to functional test runner

commit ca328c34648dd7e07f70e1844e07cfc392e41103
Author: spalger <spalger@users.noreply.github.com>
Date:   Tue May 16 16:50:12 2017 -0700

    [esArchiver] refresh modified indices after load

commit cde74a540850fd97578f441d6dccaefd1444e656
Author: spalger <spalger@users.noreply.github.com>
Date:   Tue May 16 16:46:48 2017 -0700

    [test/functional] move shared services into test/common

commit 0ea2646aea5817f6d1595e6ae0d356c426f138f0
Author: spalger <spalger@users.noreply.github.com>
Date:   Mon May 15 22:51:23 2017 -0700

    [scripts/mocha] run _mocha script when debugging

commit 1cc80600d90e318d4738920aa557d124075a4570
Author: spalger <spalger@users.noreply.github.com>
Date:   Mon May 15 22:48:12 2017 -0700

    [ftr/config] allow child config files to have no testFiles config

commit 2bb6c957443b18cebc419baa6f9db301c8f4dc4f
Author: spalger <spalger@users.noreply.github.com>
Date:   Mon May 15 21:52:26 2017 -0700

    [ftr] move screenshots into test/functional
2017-05-17 18:53:45 -07:00
Spencer d126e7c5f4 Convert makelogs and mocha npm scripts (#11665)
* [scripts] convert `npm run makelogs` to script

* [scripts] convert `npm run mocha` to script

* [scripts] add warning to `test:ui:runner` npm script

* [script] fix location of scripts in warnings
2017-05-09 10:53:10 -07:00
Spencer 90434765c0 [functionalTestRunner] replace intern (#10910)
* [functional_test_runner] replace functional testing tools with custom/pluggable solution

* [functional_test_runner] Convert unit tests to commonjs format

* [functional_test_runner] Fix dashboard test in wrong mode

* [functional_test_runner] Add dashboardLandingPage test subject

* [functional_test_runner] Get Visualize page object

* [functional_test_runner] Fix outdated references

* [functional_test_runner] Fix more outdated refs

* [functional_test_runner] Remove duplicate tests

* [functional_test_runner] Improve test readability

* [functional_test_runner] 😞 So many duplicate methods

* [functional_test_runner] Move mgmt `before` outside toplevel describe

* [functional_test_runner] Settings page obj missing methods

* [functional_test_runner] Add improvements from @gammon

* [functional_test_runner] Fix return statements in async funcs

* [functional_test_runner] Move before() to correct scope

* [functional_test_runner] Add after() hooks to remove index patterns

* [functional_test_runner] Attempt to fix vertical bar chart tests

* [functional_test_runner] Clean up

* [functional_test_runner] Reinstate unit tests

* [functional_test_runner] Set default loglevel back to info

* [functional_test_runner] Replace `context`s with `describe`s

* [functional_test_runner] Better error handling

* [functional_test_runner] Add in new Tile Map tests

* Incorporate changes from master

* [functional_test_runner] validate that every test file has a single top-level suite

* Update contributing doc with link to full doc

* [docs] Spelling and grammar fixes

* docs: writing and running functional tests

* [docs] Move plugin doc to plugin area

* [docs] Housekeeping. Doc in wrong place

* [docs] Remove dup doc file

* [grunt] Only run mocha_setup when running tests, not every grunt task
2017-04-11 17:01:06 -05:00
Kim Joar Bekkelund 90be7e882f Move Jest test setup to root (#10963) 2017-04-05 21:24:01 -04:00
Spencer e67790037a [esArchiver] combine elasticDump and ScenarioManager (#10359)
* As a part of bringing functional testing to plugins, esArchiver gives these plugins a way to capture and reload es indexes without needing to write a bunch of custom code. It works similarly to the elasticDump and ScenarioManager tools that it replaces.

Differences:
  - Streaming implementation allows for much larger archives
  - CLI for creating and using archives
  - Configurable archive location
  - Stores the data in gzipped files (better for source control, searching, large archives)
  - Automatically identifies and upgrades Kibana config documents

Methods:
  - `#load(name)`: import an archive
  - `#loadIfNeeded(name)`: import an archive, but skip the documents what belong to any existing index
  - `#unload(name)`: delete the indexes stored in an archive

CLI operations:
  - `./bin/es_archiver save <name> [index patterns...]`: save the mapping and documents in one or more indexes that match the wild-card patterns into an the `<name>` archive
  - `./bin/es_archiver load <name>`: load the mapping and documents from the `<name>` archive

* [functional_tests/common/nagivate] check for statusPage

* [es_archiver] move bins into new scripts dir

* [functional_tests/apps/context] use esArchiver

* [esArchiver] general improvements after showing to a few folks

 - remove auto-upgrading config doc logic (until we have better access to kibana version info)
 - export unload command
 - remove preemptive checks in favor of reacting to errors
 - use type "doc" vs "hit" for doc records (consistency)
 - wrote a bunch of pending tests to think though and plan

* [esArchiver] make log a stream that writes to itself

* [esArchiver] fill in stats and archive format tests

* [esArchiver] splitup action logic

* [esArchiver/cli] fix cli --help output and comment

* [esArchiver] remove type-based param coercion

* [esArchiver/log] use strings for log levels

* [esArchvier] remove unused var

* [esArchiver/indexDocRecordsStream] add tests

* [esArchive] fill in remaining tests

* [esArchiver] fix dem tests

* [eslint] remove unused vars

* [esArchiver/loadIfNeeded] fix call to load()

* [esArchiver] remove loadDumpData helpers
2017-03-27 15:29:14 -04:00