From 35ef51fa0cf9227a7d8266e8c15c394ea75000aa Mon Sep 17 00:00:00 2001 From: Frank Hassanabad Date: Fri, 26 Oct 2018 17:36:54 -0600 Subject: [PATCH] =?UTF-8?q?Cut=20down=20on=20all=20tests=20except=20for=20?= =?UTF-8?q?secops=20tests=20and=20one=20example=20of=20infr=E2=80=A6=20(#2?= =?UTF-8?q?4693)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Cut down on all tests except for secops tests and one example of infra integration tests * Commented out code for only this branch * Added comments and "please see issue number" * https://github.com/elastic/ingest-dev/issues/60 --- test/scripts/jenkins_selenium.sh | 3 ++- test/scripts/jenkins_unit.sh | 3 ++- test/scripts/jenkins_xpack.sh | 8 ++++---- x-pack/scripts/functional_tests.js | 23 +++++++++++----------- x-pack/test/api_integration/apis/index.js | 24 ++++++++++++++++------- 5 files changed, 37 insertions(+), 24 deletions(-) diff --git a/test/scripts/jenkins_selenium.sh b/test/scripts/jenkins_selenium.sh index e95be0073fe63..a7003bc26d9bf 100755 --- a/test/scripts/jenkins_selenium.sh +++ b/test/scripts/jenkins_selenium.sh @@ -8,4 +8,5 @@ source "$(dirname $0)/../../src/dev/ci_setup/java_setup.sh" node scripts/build --release --debug --oss; export TEST_ES_FROM=${TEST_ES_FROM:-source} -xvfb-run "$(FORCE_COLOR=0 yarn bin)/grunt" jenkins:selenium --from=source; +# This should not be merged into master as we are only running tests for secops +# xvfb-run "$(FORCE_COLOR=0 yarn bin)/grunt" jenkins:selenium --from=source; diff --git a/test/scripts/jenkins_unit.sh b/test/scripts/jenkins_unit.sh index 4364facc45224..b9952cc5d6969 100755 --- a/test/scripts/jenkins_unit.sh +++ b/test/scripts/jenkins_unit.sh @@ -6,4 +6,5 @@ source "$(dirname $0)/../../src/dev/ci_setup/git_setup.sh" source "$(dirname $0)/../../src/dev/ci_setup/java_setup.sh" export TEST_ES_FROM=${TEST_ES_FROM:-source} -xvfb-run "$(FORCE_COLOR=0 yarn bin)/grunt" jenkins:unit --from=source; +# This should not merge forward into master. This disables unit tests since we are only running them for secops +# xvfb-run "$(FORCE_COLOR=0 yarn bin)/grunt" jenkins:unit --from=source; diff --git a/test/scripts/jenkins_xpack.sh b/test/scripts/jenkins_xpack.sh index 6172db83a5de5..9a46d24a21a5b 100755 --- a/test/scripts/jenkins_xpack.sh +++ b/test/scripts/jenkins_xpack.sh @@ -12,16 +12,16 @@ export XPACK_DIR="$(cd "$(dirname "$0")/../../x-pack"; pwd)" echo "-> XPACK_DIR ${XPACK_DIR}" -echo " -> Running mocha tests" +echo " -> Skipping Running mocha tests (for secops only)" cd "$XPACK_DIR" -xvfb-run yarn test +# xvfb-run yarn test echo "" echo "" -echo " -> Running jest tests" +echo " -> Running jest tests (for secops only)" cd "$XPACK_DIR" -node scripts/jest --ci --no-cache --verbose +node scripts/jest --ci --no-cache --verbose secops echo "" echo "" diff --git a/x-pack/scripts/functional_tests.js b/x-pack/scripts/functional_tests.js index 65fa2787c09af..901a71202561e 100644 --- a/x-pack/scripts/functional_tests.js +++ b/x-pack/scripts/functional_tests.js @@ -6,16 +6,17 @@ require('@kbn/plugin-helpers').babelRegister(); require('@kbn/test').runTestsCli([ - require.resolve('../test/reporting/configs/chromium_api.js'), - require.resolve('../test/reporting/configs/chromium_functional.js'), - require.resolve('../test/reporting/configs/phantom_api.js'), - require.resolve('../test/reporting/configs/phantom_functional.js'), - require.resolve('../test/functional/config.js'), +// These commented out tests are only for within the secops branch and should not be merged into master +// require.resolve('../test/reporting/configs/chromium_api.js'), +// require.resolve('../test/reporting/configs/chromium_functional.js'), +// require.resolve('../test/reporting/configs/phantom_api.js'), +// require.resolve('../test/reporting/configs/phantom_functional.js'), +// require.resolve('../test/functional/config.js'), require.resolve('../test/api_integration/config.js'), - require.resolve('../test/saml_api_integration/config.js'), - require.resolve('../test/spaces_api_integration/spaces_only/config'), - require.resolve('../test/spaces_api_integration/security_and_spaces/config'), - require.resolve('../test/saved_object_api_integration/security_and_spaces/config'), - require.resolve('../test/saved_object_api_integration/security_only/config'), - require.resolve('../test/saved_object_api_integration/spaces_only/config'), +// require.resolve('../test/saml_api_integration/config.js'), +// require.resolve('../test/spaces_api_integration/spaces_only/config'), +// require.resolve('../test/spaces_api_integration/security_and_spaces/config'), +// require.resolve('../test/saved_object_api_integration/security_and_spaces/config'), +// require.resolve('../test/saved_object_api_integration/security_only/config'), +// require.resolve('../test/saved_object_api_integration/spaces_only/config'), ]); diff --git a/x-pack/test/api_integration/apis/index.js b/x-pack/test/api_integration/apis/index.js index aa2273ce64212..3a515429292e7 100644 --- a/x-pack/test/api_integration/apis/index.js +++ b/x-pack/test/api_integration/apis/index.js @@ -6,13 +6,23 @@ export default function ({ loadTestFile }) { describe('apis', () => { - loadTestFile(require.resolve('./es')); - loadTestFile(require.resolve('./security')); - loadTestFile(require.resolve('./monitoring')); - loadTestFile(require.resolve('./xpack_main')); - loadTestFile(require.resolve('./logstash')); - loadTestFile(require.resolve('./kibana')); + // These commented out tests are only for within the secops branch and should not be merged into master + // loadTestFile(require.resolve('./es')); + // loadTestFile(require.resolve('./security')); + // loadTestFile(require.resolve('./monitoring')); + // loadTestFile(require.resolve('./xpack_main')); + // loadTestFile(require.resolve('./logstash')); + // loadTestFile(require.resolve('./kibana')); + // loadTestFile(require.resolve('./infra')); + + // TODO: I am only running infra at the moment + // but in reality I should not be running infra and + // should instead be running secops which still needs + // to be built. I kept this api integration test running for right now + // as an example. -- Frank H. + // See completion of issue: https://github.com/elastic/ingest-dev/issues/56 loadTestFile(require.resolve('./infra')); - loadTestFile(require.resolve('./beats')); + + // loadTestFile(require.resolve('./beats')); }); }