kibana/x-pack/test
Frank Hassanabad e5944a3646
[Security Solutions][Detection Engine] Fixes timestamp bugs within source indexes when the formats are not ISO8601 format (#101349)
## Summary

We have a few bugs where when the source index for detections is not `"strict_date_optional_time"` it is possible that we will misinterpret the format to be epoch milliseconds when it could be epoch seconds or another ambiguous format or blow up when trying to write out the signals index. This fixes it to where we query for the source index format as an ISO8601 and when we copy the date time format we copy it back out as ISO8601 and insert it into the signal index as ISO8601.

See this [gist](https://gist.github.com/FrankHassanabad/f614ec9762d59cd1129b3269f5bae41c) for more details of how this was accidentally introduced when we added support for runtime fields and the general idea of the fix.

* Removes `docvalue_field` and we now only use `fields` in detection engine search requests
* Splits out the timestamp e2e tests into their own file for `timestamps` file
* Adds more tests to ensure we copy what we expect and we are converting to ISO8601 in the signals
* Removes `ts-expect-error` in a lot of areas including tests and then I fix the types and issues once it is removed. 

### Checklist

- [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios
2021-06-04 16:19:59 -06:00
..
accessibility Unskip advanced settings a11y test (#100558) 2021-06-02 12:03:19 -04:00
alerting_api_integration [fix] import from the root of @kbn/expect (#101321) 2021-06-03 18:13:11 -04:00
api_integration [Maps] embeddable migrations (#101070) 2021-06-04 08:00:41 -06:00
api_integration_basic [kbn/test] move types/ftr into src (#99555) 2021-05-17 09:51:53 -07:00
apm_api_integration Open/Closed filter for observability alerts page (#99217) 2021-05-25 12:40:14 -05:00
banners_functional [kbn/test] move types/ftr into src (#99555) 2021-05-17 09:51:53 -07:00
case_api_integration [kbn/test] move types/ftr into src (#99555) 2021-05-17 09:51:53 -07:00
common [kbn/test] move types/ftr into src (#99555) 2021-05-17 09:51:53 -07:00
detection_engine_api_integration [Security Solutions][Detection Engine] Fixes timestamp bugs within source indexes when the formats are not ISO8601 format (#101349) 2021-06-04 16:19:59 -06:00
encrypted_saved_objects_api_integration [kbn/test] move types/ftr into src (#99555) 2021-05-17 09:51:53 -07:00
endpoint_api_integration_no_ingest [kbn/test] move types/ftr into src (#99555) 2021-05-17 09:51:53 -07:00
examples [kbn/test] move types/ftr into src (#99555) 2021-05-17 09:51:53 -07:00
fleet_api_integration [fix] import from the root of @kbn/expect (#101321) 2021-06-03 18:13:11 -04:00
fleet_functional [kbn/test] move types/ftr into src (#99555) 2021-05-17 09:51:53 -07:00
functional [Security Solutions][Detection Engine] Fixes timestamp bugs within source indexes when the formats are not ISO8601 format (#101349) 2021-06-04 16:19:59 -06:00
functional_basic [ML] Fixing management app race condition (#100785) 2021-05-28 21:23:10 +01:00
functional_cors [kbn/test] move types/ftr into src (#99555) 2021-05-17 09:51:53 -07:00
functional_embedded [kbn/test] move types/ftr into src (#99555) 2021-05-17 09:51:53 -07:00
functional_enterprise_search [kbn/test] move types/ftr into src (#99555) 2021-05-17 09:51:53 -07:00
functional_vis_wizard [kbn/test] move types/ftr into src (#99555) 2021-05-17 09:51:53 -07:00
functional_with_es_ssl [Alerting] Split alerting feature privilege between rules and alerts and handle subfeature privilege specification (#100127) 2021-05-27 14:59:02 -04:00
licensing_plugin [kbn/test] move types/ftr into src (#99555) 2021-05-17 09:51:53 -07:00
lists_api_integration [Security Solution][Endpoint] Add event filters summary card to the fleet endpoint tab (#100668) 2021-05-28 18:07:54 +02:00
load [kbn/test] move types/ftr into src (#99555) 2021-05-17 09:51:53 -07:00
observability_api_integration [kbn/test] move types/ftr into src (#99555) 2021-05-17 09:51:53 -07:00
plugin_api_integration [fix] import from the root of @kbn/expect (#101321) 2021-06-03 18:13:11 -04:00
plugin_api_perf [kbn/test] move types/ftr into src (#99555) 2021-05-17 09:51:53 -07:00
plugin_functional [kbn/test] move types/ftr into src (#99555) 2021-05-17 09:51:53 -07:00
reporting_api_integration [kbn/test] move types/ftr into src (#99555) 2021-05-17 09:51:53 -07:00
reporting_functional [kbn/test] move types/ftr into src (#99555) 2021-05-17 09:51:53 -07:00
saved_object_api_integration [fix] import from the root of @kbn/expect (#101321) 2021-06-03 18:13:11 -04:00
saved_object_tagging [kbn/test] move types/ftr into src (#99555) 2021-05-17 09:51:53 -07:00
saved_objects_field_count [kbn/test] move types/ftr into src (#99555) 2021-05-17 09:51:53 -07:00
search_sessions_integration [kbn/test] move types/ftr into src (#99555) 2021-05-17 09:51:53 -07:00
security_api_integration [fix] import from the root of @kbn/expect (#101321) 2021-06-03 18:13:11 -04:00
security_functional [kbn/test] move types/ftr into src (#99555) 2021-05-17 09:51:53 -07:00
security_solution_cypress [kbn/test] move types/ftr into src (#99555) 2021-05-17 09:51:53 -07:00
security_solution_endpoint Removes event filters feature flag and exposes this feature by default (#100389) 2021-05-25 15:19:42 +02:00
security_solution_endpoint_api_int [fix] import from the root of @kbn/expect (#101321) 2021-06-03 18:13:11 -04:00
security_solution_ftr/page_objects/detections Add a11y test coverage to Rule Creation Flow for Detections tab (#94377) 2021-03-25 15:05:23 -04:00
spaces_api_integration [kbn/test] move types/ftr into src (#99555) 2021-05-17 09:51:53 -07:00
stack_functional_integration [QA] Bind the retry to fixup error in it repo tests (#100948) 2021-06-02 12:28:59 -06:00
ui_capabilities [kbn/test] move types/ftr into src (#99555) 2021-05-17 09:51:53 -07:00
upgrade Upgrade functional test fixes (#100306) 2021-05-19 13:08:41 -06:00
upgrade_assistant_integration Elastic License 2.0 (#90099) 2021-02-03 18:12:39 -08:00
usage_collection [kbn/test] move types/ftr into src (#99555) 2021-05-17 09:51:53 -07:00
visual_regression [kbn/test] move types/ftr into src (#99555) 2021-05-17 09:51:53 -07:00
tsconfig.json [Fleet] Remove beats management plugin (#99789) 2021-05-27 11:30:15 +02:00