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
* 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
* [@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
* 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.
* 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.
* 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
* [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.
* [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
* 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.
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 :)
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.
* [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
* 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…
* 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.
* 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.
* 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