mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
Plugin test readme’s (#26632)
* Plugin test readme’s * clarify * Update scripts/README.md Co-Authored-By: Stacey-Gammon <gammon@elastic.co>
This commit is contained in:
parent
ef77982980
commit
8a2f8bc7d6
2 changed files with 43 additions and 1 deletions
|
@ -40,3 +40,29 @@ 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).
|
||||
|
||||
### ES archiver
|
||||
|
||||
#### Loading data
|
||||
|
||||
If you wish to load up specific es archived data for your test, you can do so via:
|
||||
|
||||
```
|
||||
node scripts/es_archiver.js load <archive> [--es-url=http://username:password@localhost:9200] [--kibana-url=http://username:password@localhost:5601/{basepath?}]
|
||||
```
|
||||
|
||||
That will load the specified archive located in the archive directory specified by the default functional config file, located in `test/functional/config.js`. To load archives from other function config files you can pass `--config path/to/config.js`.
|
||||
|
||||
*Note:* The `--es-url` and `--kibana-url` options may or may not be neccessary depending on your current Kibana configuration settings, and their values
|
||||
may also change based on those settings (for example if you are not running with security you will not need the `username:password` portion).
|
||||
|
||||
#### Saving data
|
||||
|
||||
You can save existing data into an archive by using the `save` command:
|
||||
|
||||
```
|
||||
node scripts/es_archiver.js save <archive name for kibana data> [space separated list of index patterns to include]
|
||||
```
|
||||
|
||||
You may want to store the .kibana index separate from data. Since adding a lot of data will bloat our repo size, we have many tests that reuse the same
|
||||
data indices but use their own `.kibana` index.
|
||||
|
|
|
@ -29,4 +29,20 @@ test plugin), you can just run:
|
|||
|
||||
```
|
||||
yarn start --plugin-path=test/plugin_functional/plugins/<plugin_folder>
|
||||
```
|
||||
```
|
||||
|
||||
If you wish to start Kibana with multiple test plugins, you can run:
|
||||
|
||||
```
|
||||
yarn start --plugin-path=test/plugin_functional/plugins/<plugin_folder1> --plugin-path=test/plugin_functional/plugins/<plugin_folder2> ...
|
||||
```
|
||||
|
||||
If you wish to load up specific es archived data for your test, you can do so via the `es_archiver` script detailed in the [Scripts README.md](../../scripts/README.md#es-archiver)
|
||||
|
||||
Another option, which will automatically use any specific settings the test environment may rely on, is to boot up the functional test server pointing to the plugin configuration file.
|
||||
|
||||
```
|
||||
node scripts/functional_tests_server --config test/plugin_functional/config.js
|
||||
```
|
||||
|
||||
*Note:* you may still need to use the es_archiver script to boot up any required data.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue