Code coverage: run more configs with functional tests (#63680)
* run endpoint tests with coverage * add more configs * add plugin_functional config
This commit is contained in:
parent
d0b4ae7e29
commit
50228df498
|
@ -22,7 +22,7 @@ else
|
||||||
|
|
||||||
echo " -> running tests from the clone folder"
|
echo " -> running tests from the clone folder"
|
||||||
#yarn run grunt "run:functionalTests_ciGroup${CI_GROUP}";
|
#yarn run grunt "run:functionalTests_ciGroup${CI_GROUP}";
|
||||||
node scripts/functional_tests --debug --include-tag "ciGroup$CI_GROUP" --config test/functional/config.coverage.js || true;
|
node scripts/functional_tests --debug --include-tag "ciGroup$CI_GROUP" --exclude-tag "skipCoverage" || true;
|
||||||
|
|
||||||
if [[ -d target/kibana-coverage/functional ]]; then
|
if [[ -d target/kibana-coverage/functional ]]; then
|
||||||
echo " -> replacing kibana${CI_GROUP} with kibana in json files"
|
echo " -> replacing kibana${CI_GROUP} with kibana in json files"
|
||||||
|
|
|
@ -39,7 +39,7 @@ else
|
||||||
# build runtime for canvas
|
# build runtime for canvas
|
||||||
echo "NODE_ENV=$NODE_ENV"
|
echo "NODE_ENV=$NODE_ENV"
|
||||||
node ./legacy/plugins/canvas/scripts/shareable_runtime
|
node ./legacy/plugins/canvas/scripts/shareable_runtime
|
||||||
node scripts/jest --ci --verbose --coverage
|
node --max-old-space-size=6144 scripts/jest --ci --verbose --coverage
|
||||||
# rename file in order to be unique one
|
# rename file in order to be unique one
|
||||||
test -f ../target/kibana-coverage/jest/coverage-final.json \
|
test -f ../target/kibana-coverage/jest/coverage-final.json \
|
||||||
&& mv ../target/kibana-coverage/jest/coverage-final.json \
|
&& mv ../target/kibana-coverage/jest/coverage-final.json \
|
||||||
|
|
|
@ -23,7 +23,7 @@ else
|
||||||
cd "kibana${CI_GROUP}/x-pack"
|
cd "kibana${CI_GROUP}/x-pack"
|
||||||
|
|
||||||
echo " -> running tests from the clone folder"
|
echo " -> running tests from the clone folder"
|
||||||
node scripts/functional_tests --debug --include-tag "ciGroup$CI_GROUP" --config test/functional/config.coverage.js || true;
|
node scripts/functional_tests --debug --include-tag "ciGroup$CI_GROUP" --exclude-tag "skipCoverage" || true;
|
||||||
|
|
||||||
if [[ -d ../target/kibana-coverage/functional ]]; then
|
if [[ -d ../target/kibana-coverage/functional ]]; then
|
||||||
echo " -> replacing kibana${CI_GROUP} with kibana in json files"
|
echo " -> replacing kibana${CI_GROUP} with kibana in json files"
|
||||||
|
|
|
@ -4,13 +4,18 @@
|
||||||
* you may not use this file except in compliance with the Elastic License.
|
* you may not use this file except in compliance with the Elastic License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const alwaysImportedTests = [require.resolve('../test/functional/config.js')];
|
const alwaysImportedTests = [
|
||||||
|
require.resolve('../test/functional/config.js'),
|
||||||
|
require.resolve('../test/functional_endpoint_ingest_failure/config.ts'),
|
||||||
|
require.resolve('../test/functional_endpoint/config.ts'),
|
||||||
|
require.resolve('../test/functional_with_es_ssl/config.ts'),
|
||||||
|
require.resolve('../test/functional/config_security_basic.js'),
|
||||||
|
require.resolve('../test/plugin_functional/config.ts'),
|
||||||
|
];
|
||||||
const onlyNotInCoverageTests = [
|
const onlyNotInCoverageTests = [
|
||||||
require.resolve('../test/reporting/configs/chromium_api.js'),
|
require.resolve('../test/reporting/configs/chromium_api.js'),
|
||||||
require.resolve('../test/reporting/configs/chromium_functional.js'),
|
require.resolve('../test/reporting/configs/chromium_functional.js'),
|
||||||
require.resolve('../test/reporting/configs/generate_api.js'),
|
require.resolve('../test/reporting/configs/generate_api.js'),
|
||||||
require.resolve('../test/functional_with_es_ssl/config.ts'),
|
|
||||||
require.resolve('../test/functional/config_security_basic.js'),
|
|
||||||
require.resolve('../test/api_integration/config_security_basic.js'),
|
require.resolve('../test/api_integration/config_security_basic.js'),
|
||||||
require.resolve('../test/api_integration/config.js'),
|
require.resolve('../test/api_integration/config.js'),
|
||||||
require.resolve('../test/alerting_api_integration/basic/config.ts'),
|
require.resolve('../test/alerting_api_integration/basic/config.ts'),
|
||||||
|
@ -18,7 +23,6 @@ const onlyNotInCoverageTests = [
|
||||||
require.resolve('../test/alerting_api_integration/security_and_spaces/config.ts'),
|
require.resolve('../test/alerting_api_integration/security_and_spaces/config.ts'),
|
||||||
require.resolve('../test/detection_engine_api_integration/security_and_spaces/config.ts'),
|
require.resolve('../test/detection_engine_api_integration/security_and_spaces/config.ts'),
|
||||||
require.resolve('../test/plugin_api_integration/config.ts'),
|
require.resolve('../test/plugin_api_integration/config.ts'),
|
||||||
require.resolve('../test/plugin_functional/config.ts'),
|
|
||||||
require.resolve('../test/kerberos_api_integration/config.ts'),
|
require.resolve('../test/kerberos_api_integration/config.ts'),
|
||||||
require.resolve('../test/kerberos_api_integration/anonymous_access.config.ts'),
|
require.resolve('../test/kerberos_api_integration/anonymous_access.config.ts'),
|
||||||
require.resolve('../test/saml_api_integration/config.ts'),
|
require.resolve('../test/saml_api_integration/config.ts'),
|
||||||
|
@ -43,8 +47,6 @@ const onlyNotInCoverageTests = [
|
||||||
require.resolve('../test/licensing_plugin/config.ts'),
|
require.resolve('../test/licensing_plugin/config.ts'),
|
||||||
require.resolve('../test/licensing_plugin/config.public.ts'),
|
require.resolve('../test/licensing_plugin/config.public.ts'),
|
||||||
require.resolve('../test/licensing_plugin/config.legacy.ts'),
|
require.resolve('../test/licensing_plugin/config.legacy.ts'),
|
||||||
require.resolve('../test/functional_endpoint_ingest_failure/config.ts'),
|
|
||||||
require.resolve('../test/functional_endpoint/config.ts'),
|
|
||||||
];
|
];
|
||||||
|
|
||||||
require('@kbn/plugin-helpers').babelRegister();
|
require('@kbn/plugin-helpers').babelRegister();
|
||||||
|
|
Loading…
Reference in a new issue