## Summary * Adds end to end integration tests * Fixes a bug with import where on imports it was forcing all rules that were being imported to be set to be "enabled: false" instead of honoring what the original export has set for its enabled. * Adds a few "to be safe" await block so that the front end does not get a race condition within the bulk deletes and other parts of the code. * Fixes `statusCode` to be `status_code` and removes most of the Hapi Boomer errors * Changes PUT to be PATCH for partial updates * Adds true updates with PUT * Put some TODO blocks around existing bugs found in the API in the e2e tests that we might have time to get to or might not. This will let others maintaining the tests know that once they fix the bug they should update the end to end test to change the behavior. Testing this: Go to the latest CI logs and look for any particular lines from the test executing such as: ```ts should set the response content types to be expected ``` Also run this manually on your machine through this command: ```ts node scripts/functional_tests --config x-pack/test/detection_engine_api_integration/security_and_spaces/config.ts ``` Change a test manually and re-run the above command to watch something fail. Screen shot of what you should see on the CI machine when these are running: <img width="1825" alt="Screen Shot 2020-02-08 at 10 15 21 AM" src="https://user-images.githubusercontent.com/1151048/74089355-ae9a8e80-4a5d-11ea-9050-86e68d7e3bba.png"> ### Checklist Delete any items that are not applicable to this PR. ~~- [ ] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/master/packages/kbn-i18n/README.md)~~ ~~- [ ] [Documentation](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#writing-documentation) was added for features that require explanation or tutorials~~ - [x] [Unit or functional tests](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#cross-browser-compatibility) were updated or added to match the most common scenarios ~~- [ ] This was checked for [keyboard-only and screenreader accessibility](https://developer.mozilla.org/en-US/docs/Learn/Tools_and_testing/Cross_browser_testing/Accessibility#Accessibility_testing_checklist)~~ ~~- [ ] This renders correctly on smaller devices using a responsive layout. (You can test this [in your browser](https://www.browserstack.com/guide/responsive-testing-on-local-server)~~ ~~- [ ] This was checked for cross-browser compatibility, [including a check against IE11](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#cross-browser-compatibility)~~ ### For maintainers - [x] This was checked for breaking API changes and was [labeled appropriately](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#release-notes-process)
50 lines
2.9 KiB
JavaScript
50 lines
2.9 KiB
JavaScript
/*
|
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
* or more contributor license agreements. Licensed under 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 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/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.js'),
|
|
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'),
|
|
require.resolve('../test/token_api_integration/config.js'),
|
|
require.resolve('../test/oidc_api_integration/config.ts'),
|
|
require.resolve('../test/oidc_api_integration/implicit_flow.config.ts'),
|
|
require.resolve('../test/pki_api_integration/config.ts'),
|
|
require.resolve('../test/spaces_api_integration/spaces_only/config.ts'),
|
|
require.resolve('../test/spaces_api_integration/security_and_spaces/config_trial.ts'),
|
|
require.resolve('../test/spaces_api_integration/security_and_spaces/config_basic.ts'),
|
|
require.resolve('../test/saved_object_api_integration/security_and_spaces/config_trial.ts'),
|
|
require.resolve('../test/saved_object_api_integration/security_and_spaces/config_basic.ts'),
|
|
require.resolve('../test/saved_object_api_integration/security_only/config_trial.ts'),
|
|
require.resolve('../test/saved_object_api_integration/security_only/config_basic.ts'),
|
|
require.resolve('../test/saved_object_api_integration/spaces_only/config.ts'),
|
|
require.resolve('../test/ui_capabilities/security_and_spaces/config.ts'),
|
|
require.resolve('../test/ui_capabilities/security_only/config.ts'),
|
|
require.resolve('../test/ui_capabilities/spaces_only/config.ts'),
|
|
require.resolve('../test/upgrade_assistant_integration/config.js'),
|
|
require.resolve('../test/licensing_plugin/config.ts'),
|
|
require.resolve('../test/licensing_plugin/config.public.ts'),
|
|
require.resolve('../test/licensing_plugin/config.legacy.ts'),
|
|
];
|
|
|
|
require('@kbn/plugin-helpers').babelRegister();
|
|
require('@kbn/test').runTestsCli([
|
|
...alwaysImportedTests,
|
|
...(!!process.env.CODE_COVERAGE ? [] : onlyNotInCoverageTests),
|
|
]);
|