Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[8.x] [Security Solution][Endpoint] Cypress test improvements to capt…
…ure Agent diagnostics file when test fails (#202965) (#204485) # Backport This will backport the following commits from `main` to `8.x`: - [[Security Solution][Endpoint] Cypress test improvements to capture Agent diagnostics file when test fails (#202965)](#202965) <!--- Backport version: 8.9.8 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Paul Tavares","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-12-12T15:21:23Z","message":"[Security Solution][Endpoint] Cypress test improvements to capture Agent diagnostics file when test fails (#202965)\n\n## Summary\r\n\r\n- the Cypress `parallel` runner was updated to set tooling logging level\r\nfirst from Env. variables before falling back to the value defined in\r\nthe Cypress configuration file\r\n- The env. value to set, if wanting to enable a specific logging level,\r\nis `TOOLING_LOG_LEVEL`. The values supported are the same as those used\r\nwith `ToolingLog`\r\n([here](https://github.com/elastic/kibana/blob/b6287708f687d4e3288851052c0c6ae4ade8ce60/packages/kbn-tooling-log/src/log_levels.ts#L10)):\r\n`silent`, `error`, `warning`, `success`, `info`, `debug`, `verbose`\r\n- This change makes it easier to run Cypress tests locally with (for\r\nexample) a logging level of `verbose` for our tooling without having to\r\nmodify the Cypress configuration file. Example: `export\r\nTOOLING_LOG_LEVEL=verbose && yarn cypress:dw:open`\r\n- Added two new methods to our scripting VM service clients (for Vagrant\r\nand Multipass):\r\n- `download`: allow you to pull files out of the VM and save them\r\nlocally\r\n- `upload`: uploads a local file to the VM. (upload already existed as\r\n`transfer` - which has now been marked as deprecated).\r\n- Added new service function on our Fleet scripting module to enable us\r\nto set the logging level on a Fleet Agent\r\n- Cypress tests were adjusted to automatically set the agent logging to\r\ndebug when running in CI\r\n- A new Cypress task that allows for an Agent Diagnostic file (which\r\nincludes the Endpoint Log) to be retrieved from the host VM and stored\r\nwith the CI job (under the artifacts tab)\r\n - A few tests were updated to include this step for failed test","sha":"2ab8a5ced075da08f3aeb9526a76b60b1a964602","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport missing","v9.0.0","Team:Defend Workflows","backport:prev-minor","v8.18.0"],"number":202965,"url":"https://github.com/elastic/kibana/pull/202965","mergeCommit":{"message":"[Security Solution][Endpoint] Cypress test improvements to capture Agent diagnostics file when test fails (#202965)\n\n## Summary\r\n\r\n- the Cypress `parallel` runner was updated to set tooling logging level\r\nfirst from Env. variables before falling back to the value defined in\r\nthe Cypress configuration file\r\n- The env. value to set, if wanting to enable a specific logging level,\r\nis `TOOLING_LOG_LEVEL`. The values supported are the same as those used\r\nwith `ToolingLog`\r\n([here](https://github.com/elastic/kibana/blob/b6287708f687d4e3288851052c0c6ae4ade8ce60/packages/kbn-tooling-log/src/log_levels.ts#L10)):\r\n`silent`, `error`, `warning`, `success`, `info`, `debug`, `verbose`\r\n- This change makes it easier to run Cypress tests locally with (for\r\nexample) a logging level of `verbose` for our tooling without having to\r\nmodify the Cypress configuration file. Example: `export\r\nTOOLING_LOG_LEVEL=verbose && yarn cypress:dw:open`\r\n- Added two new methods to our scripting VM service clients (for Vagrant\r\nand Multipass):\r\n- `download`: allow you to pull files out of the VM and save them\r\nlocally\r\n- `upload`: uploads a local file to the VM. (upload already existed as\r\n`transfer` - which has now been marked as deprecated).\r\n- Added new service function on our Fleet scripting module to enable us\r\nto set the logging level on a Fleet Agent\r\n- Cypress tests were adjusted to automatically set the agent logging to\r\ndebug when running in CI\r\n- A new Cypress task that allows for an Agent Diagnostic file (which\r\nincludes the Endpoint Log) to be retrieved from the host VM and stored\r\nwith the CI job (under the artifacts tab)\r\n - A few tests were updated to include this step for failed test","sha":"2ab8a5ced075da08f3aeb9526a76b60b1a964602"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","labelRegex":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/202965","number":202965,"mergeCommit":{"message":"[Security Solution][Endpoint] Cypress test improvements to capture Agent diagnostics file when test fails (#202965)\n\n## Summary\r\n\r\n- the Cypress `parallel` runner was updated to set tooling logging level\r\nfirst from Env. variables before falling back to the value defined in\r\nthe Cypress configuration file\r\n- The env. value to set, if wanting to enable a specific logging level,\r\nis `TOOLING_LOG_LEVEL`. The values supported are the same as those used\r\nwith `ToolingLog`\r\n([here](https://github.com/elastic/kibana/blob/b6287708f687d4e3288851052c0c6ae4ade8ce60/packages/kbn-tooling-log/src/log_levels.ts#L10)):\r\n`silent`, `error`, `warning`, `success`, `info`, `debug`, `verbose`\r\n- This change makes it easier to run Cypress tests locally with (for\r\nexample) a logging level of `verbose` for our tooling without having to\r\nmodify the Cypress configuration file. Example: `export\r\nTOOLING_LOG_LEVEL=verbose && yarn cypress:dw:open`\r\n- Added two new methods to our scripting VM service clients (for Vagrant\r\nand Multipass):\r\n- `download`: allow you to pull files out of the VM and save them\r\nlocally\r\n- `upload`: uploads a local file to the VM. (upload already existed as\r\n`transfer` - which has now been marked as deprecated).\r\n- Added new service function on our Fleet scripting module to enable us\r\nto set the logging level on a Fleet Agent\r\n- Cypress tests were adjusted to automatically set the agent logging to\r\ndebug when running in CI\r\n- A new Cypress task that allows for an Agent Diagnostic file (which\r\nincludes the Endpoint Log) to be retrieved from the host VM and stored\r\nwith the CI job (under the artifacts tab)\r\n - A few tests were updated to include this step for failed test","sha":"2ab8a5ced075da08f3aeb9526a76b60b1a964602"}},{"branch":"8.x","label":"v8.18.0","labelRegex":"^v8.18.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT-->
- Loading branch information