Skip to content

Commit

Permalink
Code coverage: run more configs with functional tests (#63680)
Browse files Browse the repository at this point in the history
* run endpoint tests with coverage

* add more configs

* add plugin_functional config
  • Loading branch information
dmlemeshko authored Apr 16, 2020
1 parent d0b4ae7 commit 50228df
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion test/scripts/jenkins_ci_group.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ else

echo " -> running tests from the clone folder"
#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
echo " -> replacing kibana${CI_GROUP} with kibana in json files"
Expand Down
2 changes: 1 addition & 1 deletion test/scripts/jenkins_xpack.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ else
# build runtime for canvas
echo "NODE_ENV=$NODE_ENV"
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
test -f ../target/kibana-coverage/jest/coverage-final.json \
&& mv ../target/kibana-coverage/jest/coverage-final.json \
Expand Down
2 changes: 1 addition & 1 deletion test/scripts/jenkins_xpack_ci_group.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ else
cd "kibana${CI_GROUP}/x-pack"

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
echo " -> replacing kibana${CI_GROUP} with kibana in json files"
Expand Down
14 changes: 8 additions & 6 deletions x-pack/scripts/functional_tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,25 @@
* 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 = [
require.resolve('../test/reporting/configs/chromium_api.js'),
require.resolve('../test/reporting/configs/chromium_functional.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.js'),
require.resolve('../test/alerting_api_integration/basic/config.ts'),
require.resolve('../test/alerting_api_integration/spaces_only/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/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/anonymous_access.config.ts'),
require.resolve('../test/saml_api_integration/config.ts'),
Expand All @@ -43,8 +47,6 @@ const onlyNotInCoverageTests = [
require.resolve('../test/licensing_plugin/config.ts'),
require.resolve('../test/licensing_plugin/config.public.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();
Expand Down

0 comments on commit 50228df

Please sign in to comment.