diff --git a/.ci/teamcity/checks/doc_api_changes.sh b/.ci/teamcity/checks/doc_api_changes.sh index 821647a39441c..43b65d4e188ba 100755 --- a/.ci/teamcity/checks/doc_api_changes.sh +++ b/.ci/teamcity/checks/doc_api_changes.sh @@ -4,4 +4,5 @@ set -euo pipefail source "$(dirname "${0}")/../util.sh" -yarn run grunt run:checkDocApiChanges +checks-reporter-with-killswitch "Check Doc API Changes" \ + node scripts/check_published_api_changes diff --git a/.ci/teamcity/checks/eslint.sh b/.ci/teamcity/checks/eslint.sh new file mode 100755 index 0000000000000..d7282b310f81c --- /dev/null +++ b/.ci/teamcity/checks/eslint.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env bash + +set -euo pipefail + +source "$(dirname "${0}")/../util.sh" + +checks-reporter-with-killswitch "Lint: eslint" \ + node scripts/eslint --no-cache diff --git a/.ci/teamcity/checks/file_casing.sh b/.ci/teamcity/checks/file_casing.sh index 66578a4970fec..5c0815bdd9551 100755 --- a/.ci/teamcity/checks/file_casing.sh +++ b/.ci/teamcity/checks/file_casing.sh @@ -4,4 +4,5 @@ set -euo pipefail source "$(dirname "${0}")/../util.sh" -yarn run grunt run:checkFileCasing +checks-reporter-with-killswitch "Check File Casing" \ + node scripts/check_file_casing --quiet diff --git a/.ci/teamcity/checks/i18n.sh b/.ci/teamcity/checks/i18n.sh index f269816cf6b95..62ea3fbe9b04d 100755 --- a/.ci/teamcity/checks/i18n.sh +++ b/.ci/teamcity/checks/i18n.sh @@ -4,4 +4,5 @@ set -euo pipefail source "$(dirname "${0}")/../util.sh" -yarn run grunt run:i18nCheck +checks-reporter-with-killswitch "Check i18n" \ + node scripts/i18n_check --ignore-missing diff --git a/.ci/teamcity/checks/licenses.sh b/.ci/teamcity/checks/licenses.sh index 2baca87074630..136d281647cc5 100755 --- a/.ci/teamcity/checks/licenses.sh +++ b/.ci/teamcity/checks/licenses.sh @@ -4,4 +4,5 @@ set -euo pipefail source "$(dirname "${0}")/../util.sh" -yarn run grunt run:licenses +checks-reporter-with-killswitch "Check Licenses" \ + node scripts/check_licenses --dev diff --git a/.ci/teamcity/checks/verify_dependency_versions.sh b/.ci/teamcity/checks/sasslint.sh similarity index 51% rename from .ci/teamcity/checks/verify_dependency_versions.sh rename to .ci/teamcity/checks/sasslint.sh index 4c2ddf5ce8612..45b90f6a8034e 100755 --- a/.ci/teamcity/checks/verify_dependency_versions.sh +++ b/.ci/teamcity/checks/sasslint.sh @@ -4,4 +4,5 @@ set -euo pipefail source "$(dirname "${0}")/../util.sh" -yarn run grunt run:verifyDependencyVersions +checks-reporter-with-killswitch "Lint: sasslint" \ + node scripts/sasslint diff --git a/.ci/teamcity/checks/telemetry.sh b/.ci/teamcity/checks/telemetry.sh index 6413584d2057d..034dd6d647ad3 100755 --- a/.ci/teamcity/checks/telemetry.sh +++ b/.ci/teamcity/checks/telemetry.sh @@ -4,4 +4,5 @@ set -euo pipefail source "$(dirname "${0}")/../util.sh" -yarn run grunt run:telemetryCheck +checks-reporter-with-killswitch "Check Telemetry Schema" \ + node scripts/telemetry_check diff --git a/.ci/teamcity/checks/test_hardening.sh b/.ci/teamcity/checks/test_hardening.sh index 21ee68e5ade70..5799a0b44133b 100755 --- a/.ci/teamcity/checks/test_hardening.sh +++ b/.ci/teamcity/checks/test_hardening.sh @@ -4,4 +4,5 @@ set -euo pipefail source "$(dirname "${0}")/../util.sh" -yarn run grunt run:test_hardening +checks-reporter-with-killswitch "Test Hardening" \ + node scripts/test_hardening diff --git a/.ci/teamcity/checks/ts_projects.sh b/.ci/teamcity/checks/ts_projects.sh index 8afc195fee555..9d1c898090def 100755 --- a/.ci/teamcity/checks/ts_projects.sh +++ b/.ci/teamcity/checks/ts_projects.sh @@ -4,4 +4,5 @@ set -euo pipefail source "$(dirname "${0}")/../util.sh" -yarn run grunt run:checkTsProjects +checks-reporter-with-killswitch "Check TypeScript Projects" \ + node scripts/check_ts_projects diff --git a/.ci/teamcity/checks/type_check.sh b/.ci/teamcity/checks/type_check.sh index da8ae3373d976..d465e8f4c52b4 100755 --- a/.ci/teamcity/checks/type_check.sh +++ b/.ci/teamcity/checks/type_check.sh @@ -4,4 +4,5 @@ set -euo pipefail source "$(dirname "${0}")/../util.sh" -yarn run grunt run:typeCheck +checks-reporter-with-killswitch "Check Types" \ + node scripts/type_check diff --git a/.ci/teamcity/checks/verify_notice.sh b/.ci/teamcity/checks/verify_notice.sh index 8571e0bbceb13..636dc35555f67 100755 --- a/.ci/teamcity/checks/verify_notice.sh +++ b/.ci/teamcity/checks/verify_notice.sh @@ -4,4 +4,5 @@ set -euo pipefail source "$(dirname "${0}")/../util.sh" -yarn run grunt run:verifyNotice +checks-reporter-with-killswitch "Verify NOTICE" \ + node scripts/notice --validate diff --git a/.ci/teamcity/default/jest.sh b/.ci/teamcity/default/jest.sh new file mode 100755 index 0000000000000..93ca7f76f3a21 --- /dev/null +++ b/.ci/teamcity/default/jest.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +set -euo pipefail + +source "$(dirname "${0}")/../util.sh" + +export JOB=kibana-default-jest + +cd "$XPACK_DIR" + +checks-reporter-with-killswitch "Jest Unit Tests" \ + node scripts/jest --bail --debug diff --git a/.ci/teamcity/oss/api_integration.sh b/.ci/teamcity/oss/api_integration.sh new file mode 100755 index 0000000000000..37241bdbdc075 --- /dev/null +++ b/.ci/teamcity/oss/api_integration.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +set -euo pipefail + +source "$(dirname "${0}")/../util.sh" + +export JOB=kibana-oss-api-integration + +checks-reporter-with-killswitch "API Integration Tests" \ + node scripts/functional_tests --config test/api_integration/config.js --bail --debug diff --git a/.ci/teamcity/oss/jest.sh b/.ci/teamcity/oss/jest.sh new file mode 100755 index 0000000000000..3ba9ab0c31c57 --- /dev/null +++ b/.ci/teamcity/oss/jest.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +set -euo pipefail + +source "$(dirname "${0}")/../util.sh" + +export JOB=kibana-oss-jest + +checks-reporter-with-killswitch "OSS Jest Unit Tests" \ + node scripts/jest --ci --verbose diff --git a/.ci/teamcity/oss/jest_integration.sh b/.ci/teamcity/oss/jest_integration.sh new file mode 100755 index 0000000000000..1a23c46c8a2c2 --- /dev/null +++ b/.ci/teamcity/oss/jest_integration.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +set -euo pipefail + +source "$(dirname "${0}")/../util.sh" + +export JOB=kibana-oss-jest-integration + +checks-reporter-with-killswitch "OSS Jest Integration Tests" \ + node scripts/jest_integration --verbose diff --git a/.ci/teamcity/oss/plugin_functional.sh b/.ci/teamcity/oss/plugin_functional.sh index 41ff549945c0b..5d1ecbcbd48ee 100755 --- a/.ci/teamcity/oss/plugin_functional.sh +++ b/.ci/teamcity/oss/plugin_functional.sh @@ -13,6 +13,6 @@ if [[ ! -d "target" ]]; then fi cd - -yarn run grunt run:pluginFunctionalTestsRelease --from=source -yarn run grunt run:exampleFunctionalTestsRelease --from=source -yarn run grunt run:interpreterFunctionalTestsRelease +./test/scripts/test/plugin_functional.sh +./test/scripts/test/example_functional.sh +./test/scripts/test/interpreter_functional.sh diff --git a/.ci/teamcity/oss/server_integration.sh b/.ci/teamcity/oss/server_integration.sh new file mode 100755 index 0000000000000..ddeef77907c49 --- /dev/null +++ b/.ci/teamcity/oss/server_integration.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +set -euo pipefail + +source "$(dirname "${0}")/../util.sh" + +export JOB=kibana-oss-server-integration +export KIBANA_INSTALL_DIR="$PARENT_DIR/build/kibana-build-oss" + +checks-reporter-with-killswitch "Server integration tests" \ + node scripts/functional_tests \ + --config test/server_integration/http/ssl/config.js \ + --config test/server_integration/http/ssl_redirect/config.js \ + --config test/server_integration/http/platform/config.ts \ + --config test/server_integration/http/ssl_with_p12/config.js \ + --config test/server_integration/http/ssl_with_p12_intermediate/config.js \ + --bail \ + --debug \ + --kibana-install-dir $KIBANA_INSTALL_DIR diff --git a/.ci/teamcity/tests/mocha.sh b/.ci/teamcity/tests/mocha.sh index ea6c43c39e397..acb088220fa78 100755 --- a/.ci/teamcity/tests/mocha.sh +++ b/.ci/teamcity/tests/mocha.sh @@ -4,4 +4,5 @@ set -euo pipefail source "$(dirname "${0}")/../util.sh" -yarn run grunt run:mocha +checks-reporter-with-killswitch "Mocha Tests" \ + node scripts/mocha diff --git a/.ci/teamcity/tests/test_hardening.sh b/.ci/teamcity/tests/test_hardening.sh deleted file mode 100755 index 21ee68e5ade70..0000000000000 --- a/.ci/teamcity/tests/test_hardening.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env bash - -set -euo pipefail - -source "$(dirname "${0}")/../util.sh" - -yarn run grunt run:test_hardening diff --git a/.ci/teamcity/tests/test_projects.sh b/.ci/teamcity/tests/test_projects.sh index 3feaa821424e1..2553650930392 100755 --- a/.ci/teamcity/tests/test_projects.sh +++ b/.ci/teamcity/tests/test_projects.sh @@ -4,4 +4,5 @@ set -euo pipefail source "$(dirname "${0}")/../util.sh" -yarn run grunt run:test_projects +checks-reporter-with-killswitch "Test Projects" \ + yarn kbn run test --exclude kibana --oss --skip-kibana-plugins diff --git a/.teamcity/src/builds/Lint.kt b/.teamcity/src/builds/Lint.kt index 0b3b3b013b5ec..d02f1c9038aca 100644 --- a/.teamcity/src/builds/Lint.kt +++ b/.teamcity/src/builds/Lint.kt @@ -17,7 +17,7 @@ object Lint : BuildType({ scriptContent = """ #!/bin/bash - yarn run grunt run:sasslint + ./.ci/teamcity/checks/sasslint.sh """.trimIndent() } @@ -26,7 +26,7 @@ object Lint : BuildType({ scriptContent = """ #!/bin/bash - yarn run grunt run:eslint + ./.ci/teamcity/checks/eslint.sh """.trimIndent() } } diff --git a/.teamcity/src/builds/test/ApiServerIntegration.kt b/.teamcity/src/builds/test/ApiServerIntegration.kt index d595840c879e6..ca58b628cbd22 100644 --- a/.teamcity/src/builds/test/ApiServerIntegration.kt +++ b/.teamcity/src/builds/test/ApiServerIntegration.kt @@ -9,8 +9,8 @@ object ApiServerIntegration : BuildType({ description = "Executes API and Server Integration Tests" steps { - runbld("API Integration", "yarn run grunt run:apiIntegrationTests") - runbld("Server Integration", "yarn run grunt run:serverIntegrationTests") + runbld("API Integration", "./.ci/teamcity/oss/api_integration.sh") + runbld("Server Integration", "./.ci/teamcity/oss/server_integration.sh") } addTestSettings() diff --git a/.teamcity/src/builds/test/Jest.kt b/.teamcity/src/builds/test/Jest.kt index 04217a4e99b1c..c33c9c2678ca4 100644 --- a/.teamcity/src/builds/test/Jest.kt +++ b/.teamcity/src/builds/test/Jest.kt @@ -12,7 +12,7 @@ object Jest : BuildType({ kibanaAgent(8) steps { - runbld("Jest Unit", "yarn run grunt run:test_jest") + runbld("Jest Unit", "./.ci/teamcity/oss/jest.sh") } addTestSettings() diff --git a/.teamcity/src/builds/test/JestIntegration.kt b/.teamcity/src/builds/test/JestIntegration.kt index 9ec1360dcb1d7..7d44e41493b2b 100644 --- a/.teamcity/src/builds/test/JestIntegration.kt +++ b/.teamcity/src/builds/test/JestIntegration.kt @@ -9,7 +9,7 @@ object JestIntegration : BuildType({ description = "Executes Jest Integration Tests" steps { - runbld("Jest Integration", "yarn run grunt run:test_jest_integration") + runbld("Jest Integration", "./.ci/teamcity/oss/jest_integration.sh") } addTestSettings() diff --git a/.teamcity/src/builds/test/QuickTests.kt b/.teamcity/src/builds/test/QuickTests.kt index cca10cc3f2aa2..5b1d2541480ad 100644 --- a/.teamcity/src/builds/test/QuickTests.kt +++ b/.teamcity/src/builds/test/QuickTests.kt @@ -12,7 +12,7 @@ object QuickTests : BuildType({ kibanaAgent(2) val testScripts = mapOf( - "Test Hardening" to ".ci/teamcity/tests/test_hardening.sh", + "Test Hardening" to ".ci/teamcity/checkes/test_hardening.sh", "Test Projects" to ".ci/teamcity/tests/test_projects.sh", "Mocha Tests" to ".ci/teamcity/tests/mocha.sh" ) diff --git a/.teamcity/src/builds/test/XPackJest.kt b/.teamcity/src/builds/test/XPackJest.kt index 1958d39183bae..8246b60823ff9 100644 --- a/.teamcity/src/builds/test/XPackJest.kt +++ b/.teamcity/src/builds/test/XPackJest.kt @@ -12,10 +12,7 @@ object XPackJest : BuildType({ kibanaAgent(16) steps { - runbld("X-Pack Jest Unit", """ - cd x-pack - node --max-old-space-size=6144 scripts/jest --ci --verbose --maxWorkers=6 - """.trimIndent()) + runbld("X-Pack Jest Unit", "./.ci/teamcity/default/jest.sh") } addTestSettings() diff --git a/package.json b/package.json index 513d9b907c96c..f2786871fb629 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,6 @@ "test:jest": "node scripts/jest", "test:jest_integration": "node scripts/jest_integration", "test:mocha": "node scripts/mocha", - "test:mocha:coverage": "grunt test:mochaCoverage", "test:ftr": "node scripts/functional_tests", "test:ftr:server": "node scripts/functional_tests_server", "test:ftr:runner": "node scripts/functional_test_runner", @@ -674,7 +673,6 @@ "grunt-contrib-copy": "^1.0.0", "grunt-contrib-watch": "^1.1.0", "grunt-peg": "^2.0.1", - "grunt-run": "0.8.1", "gulp": "4.0.2", "gulp-babel": "^8.0.0", "gulp-sourcemaps": "2.6.5", diff --git a/packages/kbn-spec-to-console/package.json b/packages/kbn-spec-to-console/package.json index f1eefab0f1fd0..b8947d1b3b6d0 100644 --- a/packages/kbn-spec-to-console/package.json +++ b/packages/kbn-spec-to-console/package.json @@ -7,7 +7,6 @@ "lib": "lib" }, "scripts": { - "test": "../../node_modules/.bin/jest", "format": "../../node_modules/.bin/prettier **/*.js --write" }, "author": "", diff --git a/src/core/server/ui_settings/create_or_upgrade_saved_config/create_or_upgrade_saved_config.test.ts b/src/core/server/ui_settings/create_or_upgrade_saved_config/create_or_upgrade_saved_config.test.ts index 10a30db038174..3f61db4292604 100644 --- a/src/core/server/ui_settings/create_or_upgrade_saved_config/create_or_upgrade_saved_config.test.ts +++ b/src/core/server/ui_settings/create_or_upgrade_saved_config/create_or_upgrade_saved_config.test.ts @@ -19,10 +19,10 @@ import Chance from 'chance'; +import { getUpgradeableConfigMock } from './get_upgradeable_config.test.mock'; import { SavedObjectsErrorHelpers } from '../../saved_objects'; import { savedObjectsClientMock } from '../../saved_objects/service/saved_objects_client.mock'; import { loggingSystemMock } from '../../logging/logging_system.mock'; -import { getUpgradeableConfigMock } from './get_upgradeable_config.test.mock'; import { createOrUpgradeSavedConfig } from './create_or_upgrade_saved_config'; diff --git a/src/dev/code_coverage/shell_scripts/extract_archives.sh b/src/dev/code_coverage/shell_scripts/extract_archives.sh index 376467f9f2e55..32b4ccd6abccb 100644 --- a/src/dev/code_coverage/shell_scripts/extract_archives.sh +++ b/src/dev/code_coverage/shell_scripts/extract_archives.sh @@ -6,7 +6,7 @@ EXTRACT_DIR=/tmp/extracted_coverage mkdir -p $EXTRACT_DIR echo "### Extracting downloaded artifacts" -for x in kibana-intake x-pack-intake kibana-oss-tests kibana-xpack-tests; do +for x in kibana-intake kibana-oss-tests kibana-xpack-tests; do #x-pack-intake skipping due to failures tar -xzf $DOWNLOAD_DIR/coverage/${x}/kibana-coverage.tar.gz -C $EXTRACT_DIR || echo "### Error 'tarring': ${x}" done diff --git a/src/dev/code_coverage/shell_scripts/generate_team_assignments_and_ingest_coverage.sh b/src/dev/code_coverage/shell_scripts/generate_team_assignments_and_ingest_coverage.sh index 62b81929ae79b..5d983828394bf 100644 --- a/src/dev/code_coverage/shell_scripts/generate_team_assignments_and_ingest_coverage.sh +++ b/src/dev/code_coverage/shell_scripts/generate_team_assignments_and_ingest_coverage.sh @@ -32,7 +32,7 @@ TEAM_ASSIGN_PATH=$5 # Build team assignments dat file node scripts/generate_team_assignments.js --verbose --src .github/CODEOWNERS --dest $TEAM_ASSIGN_PATH -for x in jest functional; do +for x in functional; do #jest skip due to failures echo "### Ingesting coverage for ${x}" COVERAGE_SUMMARY_FILE=target/kibana-coverage/${x}-combined/coverage-summary.json diff --git a/src/dev/code_coverage/shell_scripts/merge_jest_and_functional.sh b/src/dev/code_coverage/shell_scripts/merge_jest_and_functional.sh index 707c6de3f88a0..a8952f987b419 100644 --- a/src/dev/code_coverage/shell_scripts/merge_jest_and_functional.sh +++ b/src/dev/code_coverage/shell_scripts/merge_jest_and_functional.sh @@ -4,6 +4,6 @@ COVERAGE_TEMP_DIR=/tmp/extracted_coverage/target/kibana-coverage/ export COVERAGE_TEMP_DIR echo "### Merge coverage reports" -for x in jest functional; do +for x in functional; do # jest skip due to failures yarn nyc report --nycrc-path src/dev/code_coverage/nyc_config/nyc.${x}.config.js done diff --git a/src/plugins/dashboard/public/application/listing/__snapshots__/dashboard_listing.test.js.snap b/src/plugins/dashboard/public/application/listing/__snapshots__/dashboard_listing.test.js.snap index d68011d2f7fde..e817e898cca67 100644 --- a/src/plugins/dashboard/public/application/listing/__snapshots__/dashboard_listing.test.js.snap +++ b/src/plugins/dashboard/public/application/listing/__snapshots__/dashboard_listing.test.js.snap @@ -492,6 +492,7 @@ exports[`renders empty page in before initial fetch to avoid flickering 1`] = ` findItems={[Function]} headingId="dashboardListingHeading" initialFilter="" + initialPageSize={10} listingLimit={1000} noItemsFragment={
@@ -82,7 +82,7 @@ describe('markdown vis controller', () => {
+ {i18n.translate('xpack.infra.metrics.nodeDetails.processesHeader', {
+ defaultMessage: 'Top processes',
+ })}{' '}
+
+