Commit graph

112 commits

Author SHA1 Message Date
Tyler Smalley 6977be0140
Revert "Revert: [7.x] [FTR][CI] Use default distribution for all tests (#102019) (#102580)
* Revert "Revert: [7.x] [FTR][CI] Use default distribution for all tests (#102019)"

This reverts commit c272bdbc25.

* [FTR] Stabilize SSLP functional tests (#102553)

* Removes spaces check, since spaces should always be available
* Disables Monitoring, SecuritySolutions, and Reporting in SSPL tests
until #102552 is completed

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-06-21 03:28:12 -04:00
Tyler Smalley c272bdbc25
Revert: [7.x] [FTR][CI] Use default distribution for all tests (#102019)
* Revert "[FTR] Use importExport for saved_object/basic archive (#100244) (#102016)"

This reverts commit 9851b7bcfa.

* Revert "[7.x] [FTR][CI] Use default distribution for all tests (#94968) (#101118)"

This reverts commit 73225daa87.
2021-06-13 23:29:03 -07:00
Tyler Smalley 73225daa87
[7.x] [FTR][CI] Use default distribution for all tests (#94968) (#101118)
* [FTR][CI] Use default distribution for all tests (#94968)
* [FTR] Use importExport for saved_object/basic archive (#100244)

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2021-06-12 09:53:10 -07:00
Spencer 34c5979eeb
[kbnArchiver] convert archive names to root-relative paths (#101839) (#101936)
* [kbnArchiver] convert archive names to root-relative paths

* ensure that newly multiline hooks are explicitly async

* missed a newly multiline hook

* fix exists check

* avoid extra lines by wrapping arrow body in {}

* one block more

* fix errant `name` variable

Co-authored-by: spalger <spalger@users.noreply.github.com>
# Conflicts:
#	test/api_integration/apis/kql_telemetry/kql_telemetry.ts
#	test/api_integration/apis/saved_objects/bulk_create.ts
#	test/api_integration/apis/saved_objects/bulk_get.ts
#	test/api_integration/apis/saved_objects/bulk_update.ts
#	test/api_integration/apis/saved_objects/create.ts
#	test/api_integration/apis/saved_objects/delete.ts
#	test/api_integration/apis/saved_objects/export.ts
#	test/api_integration/apis/saved_objects/find.ts
#	test/api_integration/apis/saved_objects/get.ts
#	test/api_integration/apis/saved_objects/import.ts
#	test/api_integration/apis/saved_objects/resolve.ts
#	test/api_integration/apis/saved_objects/resolve_import_errors.ts
#	test/api_integration/apis/saved_objects/update.ts
#	test/api_integration/apis/saved_objects_management/find.ts
#	test/api_integration/apis/saved_objects_management/get.ts
#	test/api_integration/apis/saved_objects_management/relationships.ts
#	test/api_integration/apis/shorten/index.js
#	test/api_integration/apis/stats/stats.js
#	test/api_integration/apis/suggestions/suggestions.js
#	test/functional/apps/discover/_discover.ts

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-06-10 16:54:10 -04:00
Spencer bcdeccb39b
[7.x] [esArchiver] drop support for --dir, use repo-relative paths instead (#101345) (#101676)
* [esArchiver] drop support for --dir, use repo-relative paths instead (#101345)

Co-authored-by: spalger <spalger@users.noreply.github.com>
# Conflicts:
#	test/api_integration/apis/suggestions/suggestions.js
#	test/functional/apps/discover/_large_string.ts
#	test/functional/apps/visualize/index.ts
#	x-pack/test/functional/apps/infra/feature_controls/logs_security.ts
#	x-pack/test/functional/apps/saved_objects_management/import_saved_objects_between_versions_6.x_7.x.ts
#	x-pack/test/functional/apps/upgrade_assistant/upgrade_assistant.ts

* convert references to `saved_objects/basic` archive

* adapt other `saved_objects/*` archives

* update management/saved_obejcts/relationships archives

* replace old monitoring setup() usage

* remove reference to `empty_kibana` archive

Co-authored-by: spalger <spalger@users.noreply.github.com>
2021-06-08 22:45:04 -04:00
Spencer 11ecb4e6fc
[ts] migrate x-pack/test to composite ts project (#101441) (#101651)
Co-authored-by: spalger <spalger@users.noreply.github.com>
# Conflicts:
#	x-pack/test/functional/page_objects/gis_page.ts
#	x-pack/test/functional/page_objects/index.ts
#	x-pack/test/functional/page_objects/reporting_page.ts
2021-06-08 15:04:53 -04:00
Tyler Smalley 52dd72e0a2 Revert "[7.x] [FTR][CI] Use default distribution for all tests (#94968) (#99980)"
This reverts commit be40e96806.
2021-05-28 17:21:51 -07:00
Tyler Smalley be40e96806
[7.x] [FTR][CI] Use default distribution for all tests (#94968) (#99980)
* [FTR][CI] Use default distribution for all tests (#94968)

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>

* Use default output

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>

* [FTR] Use importExport for saved_object/basic archive

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>

* Update suggestions tests

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>

* Fix build

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>

* More migrations to kbnArchiver

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2021-05-28 15:25:52 -04:00
Tre 35a193d8d6
[QA] Add saved objects info svc (#96364) (#100700)
Add svc and fn to return saved object types in a given index,
defaulted to ".kibana" index.
2021-05-26 14:00:21 -04:00
Spencer b601c5c3b4
[ftr] implement FtrService classes and migrate common services (#99546) (#100585)
Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
# Conflicts:
#	test/common/services/deployment.ts
#	test/common/services/index.ts
#	test/common/services/saved_object_info.ts
#	test/functional/apps/visualize/index.ts
2021-05-25 16:31:02 -04:00
Kibana Machine 4b712fda4b
[kbn/test] move types/ftr into src (#99555) (#100228)
* [kbn/test] move types/ftr into src

* Apply eslint updates

* fix import of Lifecycle type

Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Spencer <email@spalger.com>
Co-authored-by: spalger <spalger@users.noreply.github.com>
2021-05-17 14:49:48 -04:00
Spencer d773e4f78a
[kbn/es] disable geoip downloader at the root (#98372) (#98533)
Co-authored-by: spalger <spalger@users.noreply.github.com>
# Conflicts:
#	packages/kbn-es/src/cluster.js
2021-04-27 16:34:23 -04:00
Aleh Zasypkin 096be61d6a
Handle 401 Unauthorized errors in a more user-friendly way (#94927) (#98526)
# Conflicts:
#	x-pack/plugins/security/server/authentication/providers/saml.ts
#	x-pack/plugins/security/server/routes/authentication/saml.ts
2021-04-27 15:42:27 -04:00
Kibana Machine bdc8663cb2
[FTR] Disables GeoIP downloader (#97813) (#97835)
A temporary workaround to the increased segment memory issues we have in
the new ES snapshots

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>

Co-authored-by: Tyler Smalley <tyler.smalley@elastic.co>
2021-04-21 08:23:24 -07:00
Joe Portner 8d8b0f3c60
Add config properties for HTTP security headers (#97158) (#97503)
# Conflicts:
#	src/core/server/csp/csp_config.test.ts
2021-04-19 16:10:13 -04:00
Mikhail Shustov a15178a1b0
[7.x] ES client : use the new type definitions (#83808) (#95391)
* ES client : use the new type definitions (#83808)

* Use client from branch

* Get type checking working in core

* Fix types in other plugins

* Update client types + remove type errors from core

* migrate Task Manager Elasticsearch typing from legacy library to client library

* use SortOrder instead o string in alerts

* Update client types + fix core type issues

* fix maps ts errors

* Update Lens types

* Convert Search Profiler body from a string to an object to conform to SearchRequest type.

* Fix SOT types

* Fix/mute Security/Spaces plugins type errors.

* Fix bootstrap types

* Fix painless_lab

* corrected es typing in Event Log

* Use new types from client for inferred search responses

* Latest type defs

* Integrate latest type defs for APM/UX

* fix core errors

* fix telemetry errors

* fix canvas errors

* fix data_enhanced errors

* fix event_log errors

* mute lens errors

* fix or mute maps errors

* fix reporting errors

* fix security errors

* mute errors in task_manager

* fix errors in telemetry_collection_xpack

* fix errors in data plugins

* fix errors in alerts

* mute errors in index_management

* fix task_manager errors

* mute or fix lens errors

* fix upgrade_assistant errors

* fix or mute errors in index_lifecycle_management

* fix discover errors

* fix core tests

* ML changes

* fix core type errors

* mute error in kbn-es-archiver

* fix error in data plugin

* fix error in telemetry plugin

* fix error in discover

* fix discover errors

* fix errors in task_manager

* fix security errors

* fix wrong conflict resolution

* address errors with upstream code

* update deps to the last commit

* remove outdated comments

* fix core errors

* fix errors after update

* adding more expect errors to ML

* pull the lastest changes

* fix core errors

* fix errors in infra plugin

* fix errors in uptime plugin

* fix errors in ml

* fix errors in xpack telemetry

* fix or mute errors in transform

* fix errors in upgrade assistant

* fix or mute fleet errors

* start fixing apm errors

* fix errors in osquery

* fix telemetry tests

* core cleanup

* fix asMutableArray imports

* cleanup

* data_enhanced cleanup

* cleanup events_log

* cleaup

* fix error in kbn-es-archiver

* fix errors in kbn-es-archiver

* fix errors in kbn-es-archiver

* fix ES typings for Hit

* fix SO

* fix actions plugin

* fix fleet

* fix maps

* fix stack_alerts

* fix eslint problems

* fix event_log unit tests

* fix failures in data_enhanced tests

* fix test failure in kbn-es-archiver

* fix test failures in index_pattern_management

* fixing ML test

* remove outdated comment in kbn-es-archiver

* fix error type in ml

* fix eslint errors in osquery plugin

* fix runtime error in infra plugin

* revert changes to event_log cluser exist check

* fix eslint error in osquery

* fixing ML endpoint argument types

* fx types

* Update api-extractor docs

* attempt fix for ese test

* Fix lint error

* Fix types for ts refs

* Fix data_enhanced unit test

* fix lens types

* generate docs

* Fix a number of type issues in monitoring and ml

* fix triggers_actions_ui

* Fix ILM functional test

* Put search.d.ts typings back

* fix data plugin

* Update typings in typings/elasticsearch

* Update snapshots

* mute errors in task_manager

* mute fleet errors

* lens. remove unnecessary ts-expect-errors

* fix errors in stack_alerts

* mute errors in osquery

* fix errors in security_solution

* fix errors in lists

* fix errors in cases

* mute errors in search_examples

* use KibanaClient to enforce promise-based API

* fix errors in test/ folder

* update comment

* fix errors in x-pack/test folder

* fix errors in ml plugin

* fix optional fields in ml api_integartoon tests

* fix another casting problem in ml tests

* fix another ml test failure

* fix fleet problem after conflict resolution

* rollback changes in security_solution. trying to fix test

* Update type for discover rows

* uncomment runtime_mappings as its outdated

* address comments from Wylie

* remove eslint error due to any

* mute error due to incompatibility

* Apply suggestions from code review

Co-authored-by: John Schulz <github.com@jfsiii.org>

* fix type error in lens tests

* Update x-pack/plugins/upgrade_assistant/server/lib/reindexing/reindex_service.ts

Co-authored-by: Alison Goryachev <alisonmllr20@gmail.com>

* Update x-pack/plugins/upgrade_assistant/server/lib/reindexing/reindex_service.test.ts

Co-authored-by: Alison Goryachev <alisonmllr20@gmail.com>

* update deps

* fix errors in core types

* fix errors for the new elastic/elasticsearch version

* remove unused type

* remove unnecessary manual type cast and put optional chaining back

* ML: mute Datafeed is missing indices_options

* Apply suggestions from code review

Co-authored-by: Josh Dover <1813008+joshdover@users.noreply.github.com>

* use canary pacakge instead of git commit

Co-authored-by: Josh Dover <me@joshdover.com>
Co-authored-by: Josh Dover <1813008+joshdover@users.noreply.github.com>
Co-authored-by: Gidi Meir Morris <github@gidi.io>
Co-authored-by: Nathan Reese <reese.nathan@gmail.com>
Co-authored-by: Wylie Conlon <wylieconlon@gmail.com>
Co-authored-by: CJ Cenizal <cj@cenizal.com>
Co-authored-by: Aleh Zasypkin <aleh.zasypkin@gmail.com>
Co-authored-by: Dario Gieselaar <dario.gieselaar@elastic.co>
Co-authored-by: restrry <restrry@gmail.com>
Co-authored-by: James Gowdy <jgowdy@elastic.co>
Co-authored-by: John Schulz <github.com@jfsiii.org>
Co-authored-by: Alison Goryachev <alisonmllr20@gmail.com>
# Conflicts:
#	package.json
#	src/core/server/saved_objects/migrationsv2/integration_tests/migration.test.ts
#	src/plugins/data/server/autocomplete/value_suggestions_route.ts
#	src/plugins/discover/public/application/angular/doc_table/create_doc_table_react.tsx
#	x-pack/plugins/apm/server/lib/services/get_service_dependencies/get_destination_map.ts
#	x-pack/plugins/infra/server/lib/alerting/inventory_metric_threshold/evaluate_condition.ts
#	x-pack/plugins/security/server/authentication/api_keys/api_keys.ts
#	yarn.lock

* fix file broken during conflict resolution

* fix lint errors and test failure

Co-authored-by: Tomas Della Vedova <delvedor@users.noreply.github.com>
2021-03-25 10:33:44 -04:00
Kibana Machine f6e6149e66
[kbn/test] add import/export support to KbnClient (#92526) (#92935)
Co-authored-by: Tre' Seymour <wayne.seymour@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: spalger <spalger@users.noreply.github.com>

Co-authored-by: Spencer <email@spalger.com>
Co-authored-by: Tre' Seymour <wayne.seymour@elastic.co>
Co-authored-by: spalger <spalger@users.noreply.github.com>
2021-02-25 20:34:11 -05:00
Alejandro Fernández Haro 6da1e935bd
[7.x] [HTTP] Apply the same behaviour to all 500 errors (except from custom responses) (#85541) (#91892)
* [HTTP] Apply the same behaviour to all 500 errors (except from `custom` responses) (#85541)

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
# Conflicts:
#	x-pack/plugins/security/server/routes/authentication/saml.ts

* Fix deprecated route

* Mock before calling the method
2021-02-18 17:17:02 -05:00
Rudolf Meijering 1fc8122c6d
[7.x] Unrevert "Migrations v2: don't auto-create indices + FTR/esArchiver support (#85778)" (#89992) (#90839)
* Unrevert "Migrations v2: don't auto-create indices + FTR/esArchiver support (#85778)" (#89992)

* Revert "Revert "Migrations v2: don't auto-create indices + FTR/esArchiver support (#85778)""

This reverts commit f97958043f.

* Fix flaky saved objects management test #89953

* If a clone target exists, wait for yellow, not green, index status

* Fix test after master merge

* Fix types

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

* Fix visualize fixture after backport

* Disable monitoring plugin email notifications in functional tests

* Disabling monitoring emails doesnt disable it, configure instead

* Fix monitoring test

* Remove debug logging from FTR config

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-02-16 06:56:59 -05:00
Alejandro Fernández Haro 8aaf168347
[7.x] [Plugins Discovery] Enforce camelCase plugin IDs (#90752) (#91140)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-02-11 16:41:22 +00:00
Spencer 684edffa1d
[7.x] [es] disable wildcards in destructive actions (#88986) (#90804)
Co-authored-by: spalger <spalger@users.noreply.github.com>
2021-02-09 13:15:14 -05:00
Rudolf Meijering 735d9a9993
[7.x] Backport v2 SO migrations, disabled in FTR tests (#89297) (#89903)
* Enable v2 so migrations, disable in FTR tests (#89297)

* Enable v2 so migrations, disable in FTR tests

* Disable v2 migrations for ui_settings integration tests

* Disable v2 migrations for reporting without serucity api integration test
# Conflicts:
#	test/common/config.js

* migrations v2: fix snapshot builds (#89541)

* migrations v2: fix snapshot builds

* Revert "Fix sharing saved objects phase 2 CI (#89056)"

This reverts commit 8263d47d37.

* Fix documentMigrator for snapshot releases (#89936)

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-02-09 09:52:22 +01:00
Tyler Smalley 4ecef99ee0
Use default ES distribution for functional tests (#88737) (#90694)
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
# Conflicts:
#	.ci/packer_cache_for_branch.sh
2021-02-08 22:57:34 -08:00
Brandon Kobel 57af8462e4
[7.x] Elastic License 2.0 (#90192)
* Updating everything except the license headers themselves

* Applying ESLint rules

* Manually replacing the stragglers
2021-02-03 18:39:13 -08:00
Spencer b4de7f47a5
[esArchiver] upgrade to new ES client (#89874) (#90109)
Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-02-02 19:21:29 -07:00
Tyler Smalley baf56d80c4
[7.x] Updating the License (#88343) (#88745)
* Updating the Licenses, except for applying eslint, building

* Applying ESLint rules,building @kbn/pm, regenerating api docs

Co-authored-by: kobelb <brandon.kobel@elastic.co>
2021-01-19 17:54:11 -08:00
Aleh Zasypkin fb29691106
[7.x] Do not embedd credentials into ES URL and enable anonymous tests. (#88005) 2021-01-12 16:09:29 +01:00
Devon Thomson d20bb3d781
[Time to Visualize] Fix Dashboard OnAppLeave (#86193) (#86525)
Added isTransferInProgress to embeddable_state_transfer for apps to determine whether or not to show onAppLeave confirm
2020-12-18 17:21:05 -05:00
Spencer d51aaab791
[7.x] [esArchiver] support kibana and es ssl from cli (#85073) (#85187)
Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-12-07 15:08:47 -07:00
Mikhail Shustov 4efd1d9493
Cleanup tsconfig files (#84396) (#84568)
* remove unused "paths" from tsconfig

* remove unused test utils, import get-url from kbn/test

* dont pollute globals with jest when importing getUrl

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-11-30 23:30:31 +01:00
Robert Oskamp 532a9daab2
Fix advanced settings API integration tests on cloud (#84110) (#84208)
This PR fixes the advanced settings feature controls API integration tests for cloud and moves some deployment helper methods to a separate service.
2020-11-24 16:03:31 +01:00
Spencer 279fbe1172
[7.x] [ci] run server integration tests (#81698) (#82530)
Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-11-03 17:45:40 -07:00
Larry Gregory 0981beb9ab
[7.x] Fix role mappings test for ESS (#80604) (#80722)
Co-authored-by: Joe Portner <5295965+jportner@users.noreply.github.com>

Co-authored-by: Joe Portner <5295965+jportner@users.noreply.github.com>
2020-10-15 20:29:37 -04:00
Lukas Olson d0055f51ee
[Search] Functional tests for async search (#78703) (#79884)
* [Search] [WIP] Add shard delay aggregation

* Add expression functions

* Register function

* Fix test

* Add comment

* [Search] Add async search functional tests

* Add import

* Add additional test

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-10-07 13:59:47 -07:00
Larry Gregory 3029dd24c0
Warn users when security is not configured (#78545) (#79596)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
# Conflicts:
#	.github/CODEOWNERS
#	scripts/functional_tests.js
#	tasks/function_test_groups.js
2020-10-05 21:35:23 -04:00
Robert Oskamp 76f31d505d
Adjust extend_es_archiver to handle additional cases (#79308) (#79335)
This PR enables the extend_es_archiver to recognize additional indices like .kibana_1 as well as a list of indices.
2020-10-02 22:19:09 +02:00
Robert Oskamp 832ebb0999
Functional tests - add supertest for test_user (#77584) (#77723)
This PR adds a supertest instance that runs with test_user permissions to the security service.
2020-09-17 13:22:50 +02:00
Rashmi Kulkarni e6b888b35b
using test_user with minimum privileges for lens functional ui tests (#76673) (#77651)
* lens modified privs

* lens reporting test

* new role added -global_dashboard_all

* remove unwanted file

* added the reverted file

* precommit hook fix

* moved the navigateToApp to the before method

* moving the navigateToApp to before method

* closing the alert window if open in the test_user method

* adding the false param

* addressed review comments

* added common PageObjects

* removed common

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-09-16 12:34:11 -07:00
Larry Gregory 047152f890
[7.x] Hide management sections based on cluster/index privileges (#67791) (#77345)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-09-14 14:33:17 -04:00
Alejandro Fernández Haro b38e32f91a
[7.x] [Newsfeed] Ensure the version format when calling the API (#76381) (#76623)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-09-03 14:44:22 +01:00
Spencer 47897a2780
[7.x] Remove legacy optimizer (#73154) (#74966)
Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-08-13 12:36:25 -07:00
liza-mae c07d47fe48
Remove ca cert path for cloud testing (#73317) (#73355) 2020-07-27 17:12:18 -06:00
Spencer e98ba6c705
[7.x] [kbn/es-archiver] move to a package (#72318) (#72871)
Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-22 11:29:11 -07:00
Mikhail Shustov c521487b30
[7.x] Add functional test for Kibana embedded in iframe (#68544) (#69487)
* Add functional test for Kibana embedded in iframe (#68544)

* convert kbn test config into TS

* add test  for Kibana embedded in iframe

* run embedded tests in functional suite

* ignore tls errors in functional tests by default

* switch test to https

* remove env vars mutation

* allow to pass ssl config to Kibana

* pass ssl config to axios

* adopt KbnClient interfaces

* adopt KibanaServer

* use KbnRequester in security service

* set sameSiteCookies:None in test

* acceptInsecureCerts in chrome

* remove leftovers

* fix type error

* remove unnecessary field

* address comments

* refactor plugin

* refactor test

* make acceptInsecureCerts configurable

* run firefox tests on ci

* up TS version

* fix firefox.sh script

* fix path

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
# Conflicts:
#	test/functional/services/remote/remote.ts
#	test/functional/services/remote/webdriver.ts
#	x-pack/scripts/functional_tests.js

* create browser config. lost during conflict resolution
2020-06-18 15:23:56 +02:00
Mikhail Shustov c9ac203e94
Bump TypeScript to v3.9 (#67666) (#68870)
* add babel support for export type

* bump ts version to 3.9.3

* rebuild kbn-pm

* bump typescript-eslint

* fix error in security plugin UI

* check export as works

* fix app migration type

* use correct test subj attribute

* fix errors from the old PR

* embeddable is already passed in props

* explicitly define type of fetch

* add some types for viz

* fix fetch type p.2

* add null to allow spreading without type errors due to override

* add type guard to fix type error

* cast to any, since cannot assign unknown

* add timestamp to known types

* fix type error in fetch

* fix type error. id is always defined in attibutes

* declare a type

* move ts-ignore to the lines with errors

* declare tuple type explicitly

* mute type error. cannot assign unknown

* fix errors. id is always defined

* fix error type

* fix override errors. id is always defined

* fix error. extends any doesn't work anymore

* fix type error. type is always defined

* env doesn't always contain values

* fix type error

* cast to string

* add: logs is already declared in getNodeLogsUrl

* state is already  passed in props

* fix some errors in timelion

* number of fragments is always defined

* 'absolute' is not just string, but value

* TEMP: option is always defined

* always true if cast to promise manually

* both props are always defined

* explicitly define returned SO type

* workaround type

* bump tslib to be compatible with ts v3.9

* test private property

* rebuild kbn-pm

* Fix ts errors for beats management

* Fix type inference broken by the TS 3.9 upgrade

* Fix ingest manager saved object attributes typings

* Fix TS errors in cross_cluster_replication and index_management.

* Fix TS error in Watcher.

* roll back colorRange wrong type

* fix security plugin types

* TypeScript 3.9 fixes for APM

* Fix ColorRange types.

* fix actions & alerts errors. ByGidi

* fix lists error

* More APM fixes

* Remove paramaterization from `removeEmpty in agent config SettingsPage component (it's only used there and doesn't need to be parameterized.)
* Add option chain for case in registerTransactionDurationAlertType
* Cast `overallValue` in transform_metrics_chart
* Use more specific type for custom link filters
* Add more option chaining for local UI filters buckets response
* Remove unused parameters from routes
* Fix getProjection type parameter
* Use destructuring in serviceNodesLocalFiltersRoute to hide `never` error
* Revert `UnionToIntersection` change in `AggregationResponseMap`

Fixes #67804.

* fix platform type error

* Fix visualizations types.

* Fix data plugin types.

* bump TS version to 3.9.5

* Fix telemetry TS errors

* Fix dashboard code

* Adding Canvas Fixes for TS 3.9

* Fix case and security_solution types

* roll back to the old export syntax. new one might cause problems in api-extractor

* update docs

* Fix timelion code

* Fix meta

* Fix types

* fix type errors om ingest_manager

* bump babel deps

* enable private props & methods syntax

* update kbn-pm dist

* whitelist 0BSD license

* use @babel/plugin-proposal-private-methods in default set as well

* disable new babel plugins

* Revert "disable new babel plugins"

This reverts commit 04d959431d.

* cleanup security_solution types

* Fixes type error for newer TypeScript

* update docs

Co-authored-by: Nicolas Chaulet <nicolas.chaulet@elastic.co>
Co-authored-by: Felix Stürmer <stuermer@weltenwort.de>
Co-authored-by: CJ Cenizal <cj@cenizal.com>
Co-authored-by: Larry Gregory <larry.gregory@elastic.co>
Co-authored-by: Nathan L Smith <smith@nlsmith.com>
Co-authored-by: Walter Rafelsberger <walter@elastic.co>
Co-authored-by: Luke Elmers <luke.elmers@elastic.co>
Co-authored-by: Alejandro Fernández Haro <alejandro.haro@elastic.co>
Co-authored-by: Tim Roes <tim.roes@elastic.co>
Co-authored-by: Clint Andrew Hall <clint.hall@elastic.co>
Co-authored-by: Patryk Kopycinski <contact@patrykkopycinski.com>
Co-authored-by: FrankHassanabad <frank.hassanabad@elastic.co>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>

Co-authored-by: Nicolas Chaulet <nicolas.chaulet@elastic.co>
Co-authored-by: Felix Stürmer <stuermer@weltenwort.de>
Co-authored-by: CJ Cenizal <cj@cenizal.com>
Co-authored-by: Larry Gregory <larry.gregory@elastic.co>
Co-authored-by: Nathan L Smith <smith@nlsmith.com>
Co-authored-by: Walter Rafelsberger <walter@elastic.co>
Co-authored-by: Luke Elmers <luke.elmers@elastic.co>
Co-authored-by: Alejandro Fernández Haro <alejandro.haro@elastic.co>
Co-authored-by: Tim Roes <tim.roes@elastic.co>
Co-authored-by: Clint Andrew Hall <clint.hall@elastic.co>
Co-authored-by: Patryk Kopycinski <contact@patrykkopycinski.com>
Co-authored-by: FrankHassanabad <frank.hassanabad@elastic.co>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-06-11 12:25:28 +02:00
Alexey Antonov e7cd99693c
[New Platform Migration]: Management - Implement NP API (#66781) (#68119)
* [New Platform Migration]: Management - Implement NP API
2020-06-03 13:22:28 -05:00
restrry 2fefd60e90 update code style 2020-05-22 10:35:02 +02:00
Dmitry Lemeshko 15d02d2082
[7.x] FTR: move basic services under common folder (#66563) (#66780)
* FTR: move basic services under common folder (#66563)

* [CODEOWNERS] set kibana-qa to own test/functional/services

* [functional/services] move low-level services to common folder

* update codeowners

* update imports

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
# Conflicts:
#	.github/CODEOWNERS

* remove CODEOWNERS
2020-05-15 21:04:18 +02:00
Alejandro Fernández Haro fa4cd2c152
[7.x] Remove Newsfeed leftovers from the Legacy codebase (#66084) (#66427) 2020-05-13 18:45:02 +01:00
Frank Hassanabad 20d39fecc1
Fixes the client to setup SSL with the CA certificates for testing (#65598) (#65686)
## Summary

Fixes the non-legacy ES test client to work with SSL.

Without this if you try to migrate `siem rules` or `alerting` or `CASE` or anything else that is using SSL based tests you get this error when trying to use the non-legacy:

```ts
// pull in non-legacy service for functional tests
const es = getService('es');
```

```ts
// use it somewhere where your config.ts is utilizing SSL in a functional test
// ...
```

In your console you get this error:

```ts
    ConnectionError: self signed certificate in certificate chain
          at onResponse (node_modules/@elastic/elasticsearch/lib/Transport.js:205:13)
          at ClientRequest.request.on.err (node_modules/@elastic/elasticsearch/lib/Connection.js:98:9)
          at TLSSocket.socketErrorListener (_http_client.js:401:9)
          at emitErrorNT (internal/streams/destroy.js:91:8)
          at emitErrorAndCloseNT (internal/streams/destroy.js:59:3)
          at process._tickCallback (internal/process/next_tick.js:63:19)
```

This fixes that by adding the CA certs from test to the ES test client.

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-05-07 17:02:59 -06:00