Commit graph

337 commits

Author SHA1 Message Date
Spencer
7ab925b625
[kbn/es] capture es debug files (#132355) (#132381)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit 63fd2dd552)

# Conflicts:
#	packages/kbn-test/src/es/test_es_cluster.ts
2022-05-17 18:25:45 -07:00
Spencer
a6c0371b75
[8.2] [ftr] handle unexpected Kibana/ES shutdowns better (#131767) (#131812)
* [ftr] handle unexpected Kibana/ES shutdowns better (#131767)

(cherry picked from commit c6108ba076)

# Conflicts:
#	packages/kbn-test/src/functional_test_runner/functional_test_runner.ts

* fix rxjs usage
2022-05-09 09:41:13 -07:00
Kibana Machine
247cabb687
[CI] Balance/split CI groups and remove docker-specific group (#130181) (#130275)
(cherry picked from commit 1dce1d8d97)

Co-authored-by: Brian Seeders <brian.seeders@elastic.co>
2022-04-14 09:42:00 -07:00
Spencer
40ba9bf53b
[axe-config] extract module to it's own package (#128815) 2022-03-29 15:12:14 -07:00
Yulia Čech
bef90a5866
Jest axe a11y testing (#127185)
* [A11y] Added axe testing to testBed to be used in jest tests (CITs)

* [A11y] Refactored axe helpers to be outside of testBed for better separation of concerns. Also added tests for indices tab in Index Management.

* [A11y] Switched `axe_helpers` to use a Kibana wide axe config and rules that are now in kbn-test package

* [A11y] Switched `axe_helpers` to use a Kibana wide axe config and rules that are now in kbn-test package

* [A11y] Completed a11y tests in Index Management Indices tab. Also refactored http requests helper file.

* Removed import comment

* Reverted yarn.lock change

* Correct yarn.lock changes

* [IM] Updated the branch after merging main

* [IM] Reverted unrelated ResponseError interface changes

* [IM] Fixed eslint issue with kbn/test import
2022-03-29 10:44:11 +02:00
Alejandro Fernández Haro
f5229950bb
Ignore jest.config.js in coverage (#128537) 2022-03-25 21:08:14 +01:00
Spencer
a28b25a9b9
[reporting/upgrade/tests] rewrite waitForJobToFinish to handle errors (#128309) 2022-03-22 14:55:37 -07:00
Lee Drengenberg
e932d83944
[Archive Migration] dashboard/current/kibana (#126293)
* switch from es_archive to kbn_archive

* another test conversion

* add the kbn_archive

* remove unused esArchiver

* kbn_archive to full replace es_archiver/dashboard/current/kibana

* finish this test

* to fix this test we have to unload 2 index patterns

* had to re-make the kbn_archive from 8.0 instead of 7.17

* cleanup saved objects in before method

* remove unused esArchiver

* remove unused dashboard/current/kibana es_archiver files

* refactor clean to cleanStandardList

* a few more tests using the es_archive

* cleanup and uncomment smoketest

* Apply suggestions from code review

Co-authored-by: Spencer <email@spalger.com>

* update for code review

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Spencer <email@spalger.com>
2022-03-09 08:30:19 -06:00
Baturalp Gurdin
2bb237fc4f
Add Playwright Service and New User Journeys for Performance tests (#124259)
add playwright service and single-user journeys for performance tests

-  Modifies @kbn/test package to call Playwright Service without constructor
- Adds Playwright service to performance tests
- Adds following performance user journeys:
  - Ecommerce Dashboard
  - Flights Dashboard & edit visualization
  - Weblogs Dashboard
  - Promotion Tracking Dashboard

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-03-08 19:56:00 +01:00
Spencer
0821c31fa5
[ftr] implement support for accessing ES through CCS (#126547)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-03-07 15:27:41 -07:00
Spencer
eb68e95acd
[ts] enable sourcemaps in summarized types of @kbn/crypto (#126410)
* [ts] enable sourcemaps in summarized types of @kbn/crypto

* update snapshots

* remove unnecessary exports of @kbn/type-summarizer package

* remove tsc from the build process

* use `@kbn/type-summarizer` to summarize its own types

* add tests for interface and function

* switch to export type where necessary

* ignore __tmp__ in global jest preset

* ignore __tmp__ globally

* remove `@kbn/crypto` types path
2022-03-04 08:02:02 -06:00
Spencer
f2150ebaf5
[jest/cli] stop iterating up at the repo_root and error if no config found (#126853) 2022-03-03 16:29:26 -07:00
Robert Oskamp
954e3d3eaa
FTR simulate mocha dry run (#126702)
This PR works around a bug in mocha's dry run execution by collecting the tests without actually running mocha.
2022-03-03 10:15:34 +01:00
Spencer
0bb021199e
[ftr/config] require servers.elasticsearch.port config (#126650) 2022-03-02 09:45:01 -06:00
Spencer
a16c20b7b4
[kbn/es] add support for --ready-timeout (#126217) 2022-02-24 15:44:37 -07:00
Spencer
614139b8e5
[bazel] avoid a little boilerplate in packages (#126309)
* [bazel] avoid a little boilerplate for @types packages

* [bazel/ts] stop building sourcemaps since they're ignored
2022-02-24 12:43:12 -06:00
Matthew Kime
d89249852b
[data view management] Make data views sharable (#123991)
Make data views sharable
2022-02-24 07:31:37 -06:00
Spencer
1a1a191eb7
[jest] add *_node presets (#126192) 2022-02-23 09:36:30 -06:00
Robert Oskamp
b7db60a250
FTR support mocha dry run (#125915)
This PR adds support for the mocha CLI flag `--dry-run` in our functional test execution.
2022-02-23 11:34:04 +01:00
Tyler Smalley
e9d82d104b
Updates to Jest configuration (#125727) 2022-02-15 19:06:13 -07:00
Tyler Smalley
435b772786
[ci] Splits Jest integration tests (#125454) 2022-02-14 17:12:42 +01:00
Pierre Gayvallet
6627bd8b3a
Elasticsearch client: no longer default to using meta: true (#124488)
* Use `Client` interface instead of `KibanaClient`

* get rid of getKibanaEsClient and convertToKibanaClient

* get rid of last KibanaClient usages

* update usages and types in @kbn/securitysolution-es-utils

* fix some violations

* add sugar method around client mock

* update SO repository calls

* adapt more core usages

* export mock types

* batch 1

* batch 2

* batch 3

* batch 4

* batch 5

* batch 6

* batch 7

* batch 8

* batch 9

* security - batch 1

* security - batch 2

* security - batch 3

* last batch of initial violations

* fix resolve_time_pattern

* update generated doc

* fix /internal/index-pattern-management/preview_scripted_field endpoint

* fix monitoring's getLegacyClusterShim

* fix /api/snapshot_restore/privileges route

* fix UptimeESClient

* fix transforms/_nodes endpoint

* lint

* unit test fix - batch 1

* unit test fix - batch 2

* unit test fix - batch 3

* integration test fix - batch 1

* lint

* adapt ML client

* unit test fix - batch 4

* fix uptime test helper

* fix /api/transform/transforms/{transformId}/_update route

* fix ES client FTR test

* fix uptime unit test

* fix type errors on last unit tests

* fix RollupSearchStrategy call

* fix /internal/security/fields/{query} route

* fix GET /api/index_lifecycle_management/policies route

* fix mlClient.getDataFrameAnalytics

* fix APMEventClient

* fix security solution getBootstrapIndexExists

* fix data_enhanced's getSearchStatus

* remove unused @ts-expect-error

* fix unit tests due to latest code changes

* fix more calls in security_solution routes

* fix more calls in ml routes

* fix POST /api/index_management/component_templates route

* fix unit tests due to latest changes

* fix rule_registry's ResourceInstaller.createOrUpdateIndexTemplate

* fix more fleet client calls

* fix UA's GET cloud_backup_status route

* fix createLifecycleExecutorApiTest

* fix hasFleetServers

* fix unit tests due to latest changes

* changes due to last merge

* fix ml modelProvider.getModelsPipelines

* fix security_solution LifecycleQuery.search

* fix new CoreUsageDataService usage

* fix security solution's StatsQuery.search

* improve ml FTR assertions

* fix security_solution's EventsQuery.search

* fix EsClient type as we're keeping transport

* NITs

* clean RepositoryEsClient type

* update generated doc

* review comments

* adapt mlClient.anomalySearch signature

* remove unnecessary .then((body) => body)

* nit

* add unit tests for the client mocking functions

* fix new upgrade assistant /remote_clusters endpoint
2022-02-12 09:19:44 +01:00
Robert Oskamp
8989ead2d6
Functional test runner creates system_indices_superuser (#124008)
This PR fixes the functional test runner for execution against cloud (and other existing deployments) by making sure the system_indices_superuser exists.
2022-02-04 11:23:47 +01:00
Tiago Costa
a5b4b822ce
chore(NA): splits types from code on @kbn/test (#124469)
* chore(NA): splits types from code on @kbn/test

* chore(NA): create new @kbn/test-jest-helpers

* chore(NA): move wrong files into @kbn/test

* chore(NA): remove @kbn/test/jest references

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-02-04 03:27:39 +00:00
Spencer
cc0380a461
[ci-stats] send test results to ci-stats service (#123740)
* [ci-stats] send test results to ci-stats service

* move export to export type
2022-02-03 16:00:38 -08:00
Stacey Gammon
3e320cac8b
Note the author in some packages so "owner" attribute is filled in for ci stats. (#123867) 2022-01-26 16:00:42 -05:00
Tyler Smalley
a80acbb871
Resolves errors preventing ES snapshot promotion (#123649) 2022-01-26 10:11:36 -06:00
Dzmitry Lemechko
0c6edb492b
[code coverage] create pipeline on Buildkite (#120364)
* [code coverage] buildkite pipeline

* [code coverage] move scripts to reporting folder

* [code coverage] increase retry count & request timeout, remove test logic

* use DISABLE_FAILED_TEST_REPORTER to ignore missing test results

* fix

* [ingestion] use legacy http driver

* print index page before upload

* Update packages/kbn-test/src/failed_tests_reporter/run_failed_tests_reporter_cli.ts

Co-authored-by: Brian Seeders <brian.seeders@elastic.co>

* remove step var

* change var to DISABLE_MISSING_TEST_REPORT_ERRORS

Co-authored-by: Brian Seeders <brian.seeders@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-01-25 11:25:49 +01:00
Tyler Smalley
23739f5f4d
Support for superuser not having write access (#123337)
Co-authored-by: Nicolas Chaulet <nicolas.chaulet@elastic.co>
Co-authored-by: Timothy Sullivan <tsullivan@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-01-24 09:39:08 -08:00
Spencer
12e63dd469
[ftr] support filtering tests by es version (#123289)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-01-19 15:46:32 -07:00
Baturalp Gurdin
eeb5efcc62
Performance Tests for Login and Home Pages by using Playwright (#119681)
add performance tests for Login and Home pages

- [x] Rename and reduce the number of environment variables for performance test CI job
  - [x] ITERATION_COUNT_ENV =>  PERF_TEST_COUNT
  - [x] DISABLE_CACHE, TEST_RUNNER, TEST_THROTTLE_NETWORK removed
- [x] Use c2-16 queue for performance tests
- [x] Run performance tests by running ES and Kibana separately
- [x] Add warmup phase to performance tests (Not reported to APM). APM Label: PERF_TEST_PHASE
- [x] Add playwright dependency
- [x] Throttle network speed ( downloadThroughput: 750.000 B/s, uploadThroughput: 750.000 B/s, latency: 100 ms )
- [x] Disable cache by using - page.route (‘**’, ….)
- [x] Login and Home pages performance tests.
2022-01-18 14:00:06 +03:00
Ahmad Bamieh
0ad9abc5ac
use native Awaited instead of manually unwrapping types (#121781) 2021-12-23 14:55:39 +02:00
Tiago Costa
e1a86bac32
chore(NA): splits types from code on @kbn/std (#121815) 2021-12-22 09:45:10 +01:00
Mark Hopkin
a547d4a087
[Fleet] Add installed_kibana_space_id to epm-packages saved objects (#120517) 2021-12-17 17:22:20 +01:00
Sébastien Loix
20ab0ef0c3
[Rollup] Fix component integration tests (#121144) 2021-12-16 23:38:29 +00:00
Spencer
2c440da1d6
[failedTestsReporter] use ci-stats to find existing issues (#120875)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-12-13 13:36:42 -07:00
Brian Seeders
16af3e612d
[TypeScript] Upgrade to 4.5.3 (#120812) 2021-12-13 12:54:17 -05:00
Spencer
3d2c01bf30
[failedTestReporter] don't search for existing issues unless we're writing to GH (#120820) 2021-12-08 13:02:06 -07:00
Spencer
78372d14b8
[failedTestReporter] send github api request counts to ci-stats (#120684) 2021-12-08 00:04:20 -08:00
Tiago Costa
de5dd787b1
chore(NA): splits types from code on @kbn/dev-utils (#120531)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-12-07 20:12:18 +00:00
Rudolf Meijering
48d18464c8
FTR should use the new kibana_system user (#120436)
* FTR should use the new kibana_system user

* Fix security api integration tests

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-12-07 03:05:37 -07:00
Pierre Gayvallet
f89887d921
mock elastic-apm-node in @kbn/test jest preset (#120324)
* mock `elastic-apm-node` in `@kbn/test` jest preset

* adapt kbn-apm-config-loader tests

* use TS for agent mock

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-12-07 08:20:48 +01:00
Tyler Smalley
92a8636f0f
Upgrade Typescript to 4.3.5 (#104470)
Co-authored-by: Mikhail Shustov <restrry@gmail.com>
Co-authored-by: Dario Gieselaar <dario.gieselaar@elastic.co>
Co-authored-by: CJ Cenizal <cj@cenizal.com>
Co-authored-by: Justin Kambic <justin.kambic@elastic.co>
Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
Co-authored-by: Jean-Louis Leysens <jloleysens@gmail.com>
Co-authored-by: Kyle Pollich <kpollich1@gmail.com>
Co-authored-by: Xavier Mouligneau <189600+XavierM@users.noreply.github.com>
Co-authored-by: Kevin Qualters <kevin.qualters@elastic.co>
Co-authored-by: Candace Park <candace.park@elastic.co>
Co-authored-by: Brian Seeders <brian.seeders@elastic.co>
Co-authored-by: spalger <spencer@elastic.co>
2021-12-02 16:27:41 -08:00
Anton Dosov
c7b0aabd06
[FieldFormats] fix example plugin: register examples format on server (#119483) 2021-11-25 13:43:13 +01:00
Tiago Costa
9d662b77be
chore(NA): splits types from code on @kbn/i18n (#119256)
* chore(NA): auto creation of the package.json for the new types pkg rule

* chore(NA): first alpha api extractor working version

* chore(NA): support kbn-analytics

* chore(NA): correctly read tsconfig files and deps from ts_config rule

* chore(NA): layed out pkg_npm_types tree artifact custom rule

* chore(NA): missing todos

* chore(NA): node modules link mapping

* chore(NA): fully working pkg_npm_types rule

* chore(NA): fix changes on new packages using elastic datemath pkgs

* docs(NA): remove todo

* docs(NA): last todo text correction

* chore(NA): removed commented lines

* fix(NA): include missing package version

* chore(NA): include license keys

* chore(NA): change mock types package into private

* chore(NA): disable validator on ts_project rule

* chore(NA): use the wrapper for ts_project

* commit using @elastic.co

* chore(NA): commit using @elastic.co

* chore(NA): split types from code on @kbn/i18n

* chore(NA): update yarn.lock file

* chore(NA): split @kbn/i18n and @kbn/i18n-react

* chore(NA): missing import fix

* chore(NA): fix jest project configs

* chore(NA): change imports on kbn i18n

* chore(NA): change imports on kbn i18n

* chore(NA): correct loader imports

* chore(NA): missnig i18nLoader export key

* chore(NA): fix type exports

* chore(NA): export type only

* chore(NA): export type only

* fix(NA): type exports

* chore(NA): missing @Kbn/i18n/react imports

* chore(NA): missing skip path for kbn-i18n-react

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-11-24 17:18:03 +00:00
Spencer
2c4e795e18
[eslint] prevent using constructor property params in initializers (#119130) 2021-11-19 20:11:22 +01:00
Spencer
dfa856eb4c
[ftr] label global hooks which tie into lifecycle service (#118949) 2021-11-17 15:46:27 -07:00
Spencer
6b25ecadfe
[jest/testbed] add generics to improve type inference (#117941)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-11-11 12:35:32 -05:00
Thomas Watson
788db0dd9d
Remove bluebird dependency (#118097) 2021-11-11 15:17:02 +01:00
Tyler Smalley
ff86a51a01
[jest] Support meta project configs (#118122)
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2021-11-10 21:12:41 -08:00