Commit graph

289 commits

Author SHA1 Message Date
CJ Cenizal
5fe49098f6
Disable CCR and Remote Clusters API integration tests on Cloud, because Cloud has disabled those features. (#38612) (#38631) 2019-06-10 20:59:09 -07:00
spalger
6f99ebddc0 disable flaky test #34038
(cherry picked from commit 02dbf2df4e)
2019-05-03 18:28:32 -07:00
igoristic
a469f88b05
Fixed default timestamp sort and added tests (#35640) (#36042)
* Fixed default timestamp sort and added tests

* Removed duplicate functionality

* Fixed unit tests

* Removed debug code

* Update helpers.js
2019-05-03 12:48:37 -04:00
Peter
510ab8c6b1
enable security plugin in basic (#35890)
enable security on file dataviz and import (ML plugin)

update unit tests

add api test coverage for security in basic

move audit logging to standard+ license level
2019-05-01 16:40:13 -07:00
Ahmad Bamieh
29d32f8710 Monitoring telemetry collection interval (#34609) (#35693)
* Only collect usage data once a day from kibana monitoring
2019-04-26 23:52:30 -04:00
Mike Côté
acb08ecafa
Fix conflicts (#35046) 2019-04-12 23:08:28 -04:00
Tim Roes
cb49d73534
[7.0] Don't save the current timezone in visualizations (#34795) (#34926)
* Don't save the current timezone in visualizations (#34795)

* Don't save the current timezone in visualizations

* Add additional test

* Add test and switch migration number

* Don't clone object according to review feedback

* Better documentation

* Update src/legacy/core_plugins/kibana/migrations.js

Co-Authored-By: timroes <mail@timroes.de>

* Fix migrationVersion in tests
2019-04-12 08:01:38 +02:00
CJ Cenizal
e1c115d502
Update Delete Remote Cluster API to support multiple comma-delimited clusters. (#34595) (#34736) 2019-04-10 08:43:12 -07:00
Nathan Reese
34ca18304f
merge with master (#34280) 2019-04-01 11:22:09 -06:00
Mike Côté
530553d344
Fix includeFields function to return root saved object properties (#33847) (#33945) 2019-03-27 11:11:03 -04:00
Dmitry Lemeshko
0b55ee9001
FTR: fix 10 sec timeout in waitForDeleted (#33313) (#33920)
* use css selector instead of className, set implicit wait to 1 sec
2019-03-27 11:30:44 +01:00
Spencer
76cc216aa0
[@kbn/expect] "fork" expect.js into repo (#33761) (#33799)
* [@kbn/expect] "fork" expect.js into repo

* [eslint] autofix references to expect.js

* [tslint] autofix all expect.js imports

* now that expect.js is in strict mode, avoid reassigning fn.length
2019-03-25 13:13:12 -07:00
Spencer
56352b26fb
[7.0] [eslint] merge custom rules into a single plugin (#33733) (#33759)
Backports the following commits to 7.0:
 - [eslint] merge custom rules into a single plugin  (#33733)
2019-03-22 18:53:54 -07:00
Spencer
2b656737ac
[random] generate ids with length 10-15 so that they are more unique (#33259) (#33265) 2019-03-14 13:27:59 -07:00
Justin Kambic
2b7093919c
[Uptime] Fix flaky behavior and re-enable Uptime API tests (#32819) (#33179)
* Attempt to fix issue causing flaky behavior in uptime API tests.

* run x-pack-intake group 20 times to test flakiness

* Revert "run x-pack-intake group 20 times to test flakiness"

This reverts commit ad2e8c7003.
2019-03-13 18:52:21 -04:00
Justin Kambic
db1ea9ccfb
[Uptime] Add functional UI tests (#29667) (#33191)
* Refactor es queries and associated components/endpoints.

* Add unit tests, repair broken tests.

* [Uptime] Add API functional tests for uptime graphQL (#29128)

* Add API functional tests for uptime graphQL.

* Remove obsolete code.

* Add CI group for UI functional tests.

* Delete obsolete code, rename heartbeat es archive.

* Refactor adapter methods.

* Refactor adapter methods.

* Attempt to fix ci-group tag error.

* Skip functional app tests until later PR.

* Remove unused code.

* Optimize test runs.

* Add uptime to api test index.

* Fix formatting.

* Add HB 7.0 data for API tests.

* Configure first error_list test to work with 7.x data.

* Configure error_list filtered by id to work with 7.x data.

* Configure error_list functional tests to work with 7.x data.

* Update snapshot test to work with 7.x data.

* Update snapshot down filtered test to work with 7.x data.

* Configure snapshot up test to work with 7.x data.

* Configure ping list tests to work with 7.x data.

* Configure monitor list tests to work with 7.x data.

* Configure monitor status bar tests to work with 7.x data.

* Configure filterBar tests to work with 7.x data.

* Configure docCount tests to work with 7.x data.

* Simplify code based on PR feedback.

* Add loading spinner to monitor page title based on PR feedback.

* Rename GQL type based on PR feedback.

* Remove use of 'undefined' in ES query based on PR feedback.

* Simplify code based on PR feedback.

* Add definite size/shard_size for terms agg based on PR feedback.

* Simplify ES query based on PR feedback.

* Update x-pack/plugins/uptime/server/lib/adapters/monitors/elasticsearch_monitors_adapter.ts

Implement PR feedback.

Co-Authored-By: justinkambic <justin.kambic@elastic.co>

* Increase size for ES errors query based on PR feedback.

* Fix hardcoded field in terms filter based on PR feedback.

* Simplify get code for monitors function.

* Reduce unnecessarily large size for terms agg based on PR feedback.

* Pluralize filter bar props.

* Refactor filter bar query based on PR feedback.

* Update test.

* Fix busted GQL query.

* Update functional test docs to use data without buggy values.

* Update index name in HB functional api test docs.

* Update snapshot base functional test.

* Make snapshot filter tests pass, fix associated bug.

* Configure remaining snapshot e2e tests to work with 7.x data.

* Give better variable names and comments for ugly code.

* Configure ping list query tests to work with updated 7.x data.

* Rename graphql describe block.

* Update monitor status bar query tests to work with updated 7.x data.

* Update monitor list query tests to work with updated 7.x data.

* Update filter bar query to work with updated 7.x data.

* Update error list query to work with updated 7.x data.

* Update doc count fixture to work with new 7.x data.

* Create functional UI tests for Overview and Monitor pages.

* Add additional waits to functional UI test to try to prevent flakiness.

* [ftr/services/superDatePicker] make specialized service

* Add data-test-subj value to monitor link.

* Remove wait calls from UI tests.

* Set default timezone for tests' kibana server.

* Add @types for mocha and expect.js.

* Implement PR feedback.

* Remove added types.

* Re-add mocha types.

* Remove obsolete comment.

* Disable timestamp on uptime app navigation for functional tests.

* Undo previous change for default value of function parameter.

* Add redirect hack to uptime client to change window location when expected router path is not satisfied.
2019-03-13 18:22:35 -04:00
Spencer
6e834cb722
[7.0] Refactor ES-related environment variables (#33036) (#33170)
Backports the following commits to 7.0:
 - Refactor ES-related environment variables  (#33036)
2019-03-13 13:19:10 -07:00
Thomas Neirynck
decdbeec3e
[Maps] Do not fill line geometries (#33072) (#33134) 2019-03-13 11:29:05 -04:00
Josh Dover
b68ba34bec Add reindex warning for mapping type changes (#32081) (#33088) 2019-03-12 23:34:35 -07:00
Josh Dover
803d5636b7
[7.0] Add button for adding index.query.default_field setting to metricbeat indices #32829 (#33057)
* Add button for adding `index.query.default_field` setting to metricbeat indices (#32829)

* Add button for adding `index.query.default_field` setting to metricbeat indices

* Add button to 'group by index' view

* Refactor to more generic API

* Remove comment

* Update functional tests

* Use typeless API in 7.0
2019-03-12 18:46:19 -05:00
Chris Roberson
2e832799b8
Add in explicit mappings (#33004) (#33013) 2019-03-12 13:38:30 -04:00
Dmitry Lemeshko
737b544418
Improving way to check if pipelines list is loaded (#32370) (#32861)
* [services/pipeline_list] wait for loadingPipelines is not displayed

* run x-pack-ciGroup2 x20 times

* Revert "run x-pack-ciGroup2 x20 times"

This reverts commit 1fb4077c2c.
2019-03-10 12:36:52 +01:00
Dmitry Lemeshko
1e416cafb1
Improve logstash pipeline tests (#32198) (#32295)
* [services/pipeline_list] optimize getRows function

* run ciGroup2 x16 times

* [services/pipeline_list] wait for table body loaded

* Revert "run ciGroup2 x16 times"

This reverts commit 4e45a5eaf1.

* removed unused browser_exec_scripts
2019-03-10 11:18:50 +01:00
Dmitry Lemeshko
53ecc0b119
Restore webdriver-based functional test runner driver (#31446) (#32846) 2019-03-09 19:45:28 +01:00
Spencer
2c2637d4ee
[7.0] [ts] add script to verify that all ts is in a project (#32727) (#32827)
* [ts] add script to verify that all ts is in a project (#32727)

Based on #32705 

We currently have TypeScript code that was backported to 7.0, which was backported without issue because it falls outside of any TypeScript projects in 7.0. This means that the pre-commit hooks break on changes to these files, and that they are not getting type checked by the type_check script. To fix this we need to verify that every typescript file in the repository is covered by a tsconfig.json file as part of CI.

* tests typescript migration (#31234)

* add typescript support for functional tests

* [ts][ftr] improve types for ftr and expect.js, cleanup changes to tsconfig files (#31948)

In https://github.com/elastic/kibana/pull/31234 there were some extra changes that I've reverted, like use of the `tsconfig-paths` package to magically rewrite import statements to defy the standard node module resolution algorithm, the inclusion of several unnecessary options in the `test/tsconfig.json` file, and changes of the line-endings in the config files. This also brings a few enhancements from https://github.com/elastic/kibana/pull/30190 including a modularized version of the expect.js types, and options for explicit mappings for the PageObjects and services used in ftr tests.
# Conflicts:
#	src/functional_test_runner/lib/config/schema.js
#	test/common/services/es.ts
#	test/functional/page_objects/index.ts
#	test/functional/services/apps_menu.js
#	yarn.lock
2019-03-08 19:50:34 -08:00
Justin Kambic
507e7139e3
[Uptime] Improve monitor charts query (#30561) (#32343)
* Refactor chart querying.

* Fix monitor chart query.

* Refactor several inline computations to helper functions. Improve schema naming.

* Move unit conversion to client, remove bare conversion values.

* Add API tests for monitor charts.

* Add test for conversion function.

* Add type annotations to latest schema additions.

* Fix typo.

* Refactor based on PR feedback, add comments asked for in PR feedback.

* Rename fields in schema, update tests. Extract monitor charts to functional component and add unit test.
2019-03-05 14:42:50 -05:00
Spencer
d7f95fee0d
[logstash/pipelineCreate] retry reading rows (#32436) (#32485) 2019-03-05 11:02:28 -08:00
Spencer
3538af23e1
[7.0] [junit] use default rootDirectory for project (#32256) (#32346)
Backports the following commits to 7.0:
 - [junit] use default rootDirectory for project  (#32256)
2019-03-01 16:07:56 -08:00
Spencer
4bbc9a1bfd
[eslint] require final newline (#32265) (#32272)
We have had `insert_final_newline = true` in our `.editorconfig` file since April 2015, but never validated it with eslint. I'm a little tired of extra changes showing up in PRs because some people use editors which respect the `.editorconfig` file and some don't, so I figured we might want to enable the rule in eslint so that the can be autofixed.

Votes requested please :)
2019-02-28 19:25:46 -08:00
Spencer
ad8a40cac5
[build/fs/copy] use fs.copyFile to avoid race condition (#32220) (#32239)
Fixes #31913

There have been 6 failures in this test in the last 60 days, which I believe is caused by a race condition of some sort that prevents us from accessing the file right after it's been written. It might have to do with writeStreams not actually flushing to the filesystem within time, but I haven't been able to prove it. @mikecote is taking a look at seeing if he can do some simple testing to reproduce the situation locally.

In order to avoid further errors this PR updates to use the `fs.copyFile` function that was added in node 8.5, which does the whole copy in a single native operation.
2019-02-28 14:09:38 -08:00
Aaron Caldwell
765b24f368
[7.0] [Maps] Remove unneeded and breaking layer condition that prevents cancel from add layer panel (#31634) (#31930)
* [Maps] Remove unneeded and breaking layer condition that prevents cancel from add layer panel (#31634)

* Remove unneeded and breaking layer condition that prevents cancelling unless a layer's selected

* Add layer tests. Review feedback

* .....and the test file

* Review feedback. Factor out reusable maps test functions. Clean up

* Picky picky

* Review feedback. Remove sleeps

# Conflicts:
#	x-pack/plugins/maps/public/components/widget_overlay/layer_control/__snapshots__/view.test.js.snap
#	x-pack/plugins/maps/public/components/widget_overlay/layer_control/layer_toc/toc_entry/__snapshots__/view.test.js.snap
#	x-pack/plugins/maps/public/components/widget_overlay/layer_control/layer_toc/toc_entry/view.js
#	x-pack/plugins/maps/public/components/widget_overlay/layer_control/view.js
#	x-pack/test/functional/apps/maps/index.js

* Remove trailing space
2019-02-25 16:04:43 -07:00
Nathan Reese
f25d526887
[Maps] disable fit to data for geo_shape fields until elasticsearch supports a way to get the bounds (#31638) (#31700)
* [Maps] disable fit to data for geo_shape fields until elasticsearch supports a way to get the bounds

* add function test for fit to bounds

* add jest test for layer_toc_actions component

* review feedback
2019-02-21 10:28:53 -07:00
Matt Apperson
fc9649a716
[BeatsCM] fix API for tokens to support any number (#30335) (#31659)
* add basic script for standing up a fake env

* tweaks

* API needs to support any number of tokens not us

* [BeatsCM] Add testing script used to create test deployments

* Move to JWT for enrollment

* wrap dont scroll command

* Dont use token as token ID

* fix tests

* not sure why this file is enabled in this branch/PR…
2019-02-21 07:21:54 -05:00
nicknak
4e30272e6a
[Saved Objects] Add hidden types to savedobjects (#28722) (#31592)
* Saved Objects routes and service should be able to hide objects.

* Remove context providers as a feature.

* Respository should be creatable to include hidden types.

* Fixes failing unit tests.

* Fixes issues with filter method.

* Adds check to get method for allowed types.

* Adds tests for get,delete,bulkGet,find

* Remove need for schema in saved objects api.

* Remove more traces of schema validation added to rest api.

* Remove inclusion of hidden types in route specific client.

* Removes getAvailableTypes as it is no longer used.

* Fixing up initialization of components.

* Moves default setting for includeHiddenTypes

* Allows for single value or array in assertAllowedTypes.

* Adds type assertion to bulkCreate, and incrementCounter with tests.

* Conversion to boolean should be more explicit.

* Repository should restrict types allowed to be manipulated.

* Saved objects should use the right root type.

Privileges should have unit test.

* All saved objects APIs should validate types.

* No need for test to be typescript if under test not ts.

* Handle extraTypes being undefined.

* Routes should verify that they do not allow invalid types.

* Bulk create should be tested.

* Saved objects mixin does not need extra blank lines.

* Saved objects integration tests should test unknown types.

* Integration tests should test for bad request with unknown type.

* Adds missing privileges to global all.

* Tests should use valid types.

Tests should have accurate expectations.

* Fix bulkCreate to assert allowed types.

* Fix unknown search field tests.

* Adjust expectations for unknown type in saved object api.

* Saved object integration should return proper responses.

* Fix expect to use a separated matcher.

* Should expect forbidden responses for unauthorized users.

* Should expect 400 when trying to use unknown types.

* Removes unwanted .only call.

* Adjust repository to throw error unless it has allowed types.

* Unknown types should return 403s and empty results where applicable

* Removes type validation from saved object API.

* Captures and returns appropriate exceptions for type assertion.

* Properly filtter c'tor params to repository.

* Checking allowed type should be bool check function.

* Cleanup test situation descriptions.

* Updating snapshot file for jest tests.

* Changes expected results for find from saved object service.

* Expect an empty response when attempting to access an unsupported type.

* Adds test coverage for new error methods added.

Adds create test to repository.

* Adds bulkGet, bulkCreate unsupported type errors.

* First step in refactoring saved object service.

Adding missing test coverage of saved object service creation.

* Move extra saved objects test to legacy folder.

* Adds references filtering by allowed type.

* Adds more coverage for mixin repository creation.

* Removes unnecessary decorate on server object for unused method.

* Revert reworking how kibana migrator uses mappings.

* Revert "Adds references filtering by allowed type."

This reverts commit 92b07d4b92.

* Adds check for unexpected callCluster type.

* Should cover as many parts of the mixin as possible.

* More expectations to tests.

* Keeps ordering of created items but does not pass unsupported types.

* Fix a failing before hook test.

* Should not use escaped single quotes inside template literals.

Co-Authored-By: njd5475 <njd5475@gmail.com>

* Changed how check is done in repository.

* Remove unused mappings file.

* Cleans up a couple of nits.

* Adds test for overwrite option being passed if it is in the url.

* Missed semicolon.
2019-02-20 13:58:25 -05:00
Chris Roberson
6da397bd7b
[Monitoring] Add mappings for standalone archives and fix tests (#31315) (#31469)
* Add mappings for standalone and fix tests

* We are apparently mutating this and need to return a copy each time
2019-02-19 10:06:38 -05:00
Spencer
d565777054
[7.0] [ftr/services/pipelineList] reduce calls to the browser to avoid flakiness (#31366) (#31373)
Backports the following commits to 7.0:
 - [ftr/services/pipelineList] reduce calls to the browser to avoid flakiness  (#31366)
2019-02-17 23:11:50 -08:00
spalger
03eeb6b025 actually disable test 2019-02-17 20:00:09 -08:00
spalger
984dd3b1dd disable flaky test suite 2019-02-17 19:56:08 -08:00
Chris Cowan
d3f8669a6a
[Infra UI] Clean up Docker and Kubernetes fields for ECS (#31175) (#31301)
* [Infra UI] Clean up Docker and Kubernetes fields for ECS

* updating tests with latest ecs fields

* Fixing documentation
2019-02-15 13:22:38 -07:00
Shaunak Kashyap
8a6d5ba5eb
[7.0] Using POST instead of DELETE for bulk deletion of pipelines (#31023) (#31204)
Backports the following commits to 7.0:
 - Using POST instead of DELETE for bulk deletion of pipelines  (#31023)
2019-02-14 15:06:34 -08:00
Spencer
595ec5c08c
[7.0] [ftr/defaultTimezone] make UTC the default timezone (#30460) (#31074)
Backports the following commits to 7.0:
 - [ftr/defaultTimezone] make UTC the default timezone  (#30460)
2019-02-14 13:50:31 -08:00
Justin Kambic
83556d75fd
[Uptime] Update targeted index pattern for 7.0.0 (#30998)
* Configure targeted index pattern to only use heartbeat 7 docs.

* Fix busted unit tests.
2019-02-14 13:28:35 -05:00
Matt Apperson
02c8dc95c7
[BeatsCM] remove type from ES template and requests (#30549) (#30823) (#31116)
* remove dype from ES template and requests

* remove doc type?
2019-02-14 09:56:36 -05:00
Chris Roberson
85ce5e61cf
[Monitoring] Skip tests for cloud (#30879) (#31068)
* Skip tests for cloud

* Add TODOs
2019-02-14 09:11:43 -05:00
Matt Apperson
c803b8340b
[ftr/services/es] use apiVersion from es plugin in x-pack (#30853) (#30939) 2019-02-14 08:33:39 -05:00
Spencer
e80d433bf5
[esArchiver] stable archives (#30477) (#30706)
* [esArchiver/save] serialize with stable json stringify

* [esArchives] rebuild all archives
2019-02-13 19:00:27 -08:00
Justin Kambic
d7e4cf9b82
[Uptime] Fix snapshot query to handle large numbers of monitors (#30441) (#30754)
* Refactor snapshot histogram ES query and subsequent processing.

* Fix issues on client, remove obsolete code, update tests.

* Get type check passing and update Snapshot component's unit tests to work with new schema data.
2019-02-13 10:35:34 -05:00
Nathan Reese
395f134ddd
merge with master (#30781) 2019-02-12 06:27:09 -07:00
Spencer
09d2511c28
[ftr/uiSettingDefaults] disable telemetry by default (#30473) (#30671) 2019-02-11 18:50:45 -08:00
Mike Côté
ced35a0c5e
Clone saved object document before migrating to prevent accidental mutations (#30475) (#30731)
* Clone saved object document before migrating to prevent accidental mutations

* Add tests

* Add example comment

* Use latest version of lodash cloneDeep

* Revise spaces functional tests to use same sample data.

* Fix broken test
2019-02-11 16:53:19 -05:00