[QA] Drop dead code (#136639)

* [QA][Code Coverage] Drop dead code

I'm hoping these jenkins related code coverage
scripts are no longer needed and can be removed.

* Dropping more after chatting with Spencer:
https://elastic.slack.com/archives/C5UDAFZQU/p1658234270426099
This commit is contained in:
Tre 2022-07-20 16:18:25 +01:00 committed by GitHub
parent 44cf61577f
commit 7a54e0c675
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 0 additions and 117 deletions

View file

@ -1,10 +0,0 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
require('../src/setup_node_env');
require('../src/dev/ensure_all_tests_in_ci_group').runEnsureAllTestsInCiGroupsCli();

View file

@ -1,53 +0,0 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
import Path from 'path';
import Fs from 'fs/promises';
import execa from 'execa';
import { safeLoad } from 'js-yaml';
import { run } from '@kbn/dev-cli-runner';
import { REPO_ROOT } from '@kbn/utils';
import { schema } from '@kbn/config-schema';
const RELATIVE_JOBS_YAML_PATH = '.ci/ci_groups.yml';
const JOBS_YAML_PATH = Path.resolve(REPO_ROOT, RELATIVE_JOBS_YAML_PATH);
const SCHEMA = schema.object({
root: schema.arrayOf(schema.string()),
xpack: schema.arrayOf(schema.string()),
});
export function runEnsureAllTestsInCiGroupsCli() {
run(async ({ log }) => {
const { root, xpack } = SCHEMA.validate(safeLoad(await Fs.readFile(JOBS_YAML_PATH, 'utf-8')));
log.info(
'validating root tests directory contains all "root" ciGroups from',
RELATIVE_JOBS_YAML_PATH
);
await execa(process.execPath, [
'scripts/functional_tests',
...root.map((tag) => `--include-tag=${tag}`),
'--include-tag=runOutsideOfCiGroups',
'--assert-none-excluded',
]);
log.info(
'validating x-pack/tests directory contains all "xpack" ciGroups from',
RELATIVE_JOBS_YAML_PATH
);
await execa(process.execPath, [
'x-pack/scripts/functional_tests',
...xpack.map((tag) => `--include-tag=${tag}`),
'--assert-none-excluded',
]);
log.success('all tests are in a valid ciGroup');
});
}

View file

@ -10,9 +10,6 @@ fi
# doesn't persist, also set in kibanaPipeline.groovy
export KBN_NP_PLUGINS_BUILT=true
echo " -> Ensuring all functional tests are in a ciGroup"
node scripts/ensure_all_tests_in_ci_group
# Do not build kibana for code coverage run
if [[ -z "$CODE_COVERAGE" ]] ; then
echo " -> building and extracting default Kibana distributable for use in functional tests"

View file

@ -1,14 +0,0 @@
#!/usr/bin/env bash
cd "$KIBANA_DIR"
source src/dev/ci_setup/setup_env.sh
if [[ ! "$TASK_QUEUE_PROCESS_ID" ]]; then
./test/scripts/jenkins_build_plugins.sh
fi
# doesn't persist, also set in kibanaPipeline.groovy
export KBN_NP_PLUGINS_BUILT=true
echo " -> Ensuring all functional tests are in a ciGroup"
node scripts/ensure_all_tests_in_ci_group

View file

@ -1,37 +0,0 @@
#!/usr/bin/env bash
source test/scripts/jenkins_test_setup.sh
if [[ -z "$CODE_COVERAGE" ]] ; then
# Lint
./test/scripts/lint/eslint.sh
./test/scripts/lint/stylelint.sh
# Test
./test/scripts/test/jest_integration.sh
./test/scripts/test/jest_unit.sh
./test/scripts/test/api_integration.sh
# Check
./test/scripts/checks/telemetry.sh
./test/scripts/checks/ts_projects.sh
./test/scripts/checks/jest_configs.sh
./test/scripts/checks/type_check.sh
./test/scripts/checks/bundle_limits.sh
./test/scripts/checks/i18n.sh
./test/scripts/checks/file_casing.sh
./test/scripts/checks/licenses.sh
./test/scripts/checks/plugins_with_circular_deps.sh
./test/scripts/checks/verify_notice.sh
./test/scripts/checks/test_projects.sh
./test/scripts/checks/test_hardening.sh
else
echo " -> Running jest tests with coverage"
node scripts/jest --ci --maxWorkers=8 --coverage || true;
echo " -> Running jest integration tests with coverage"
node scripts/jest_integration --ci --coverage || true;
echo " -> Combine code coverage in a single report"
yarn nyc report --nycrc-path src/dev/code_coverage/nyc_config/nyc.jest.config.js
fi