[8.x] [Security Solution][Endpoint] Cypress test improvements to capture Agent diagnostics file when test fails (#202965)#204485
Merged
paul-tavares merged 2 commits intoelastic:8.xfrom Dec 17, 2024
Conversation
…ent diagnostics file when test fails (elastic#202965) ## Summary - the Cypress `parallel` runner was updated to set tooling logging level first from Env. variables before falling back to the value defined in the Cypress configuration file - The env. value to set, if wanting to enable a specific logging level, is `TOOLING_LOG_LEVEL`. The values supported are the same as those used with `ToolingLog` ([here](https://github.com/elastic/kibana/blob/b6287708f687d4e3288851052c0c6ae4ade8ce60/packages/kbn-tooling-log/src/log_levels.ts#L10)): `silent`, `error`, `warning`, `success`, `info`, `debug`, `verbose` - This change makes it easier to run Cypress tests locally with (for example) a logging level of `verbose` for our tooling without having to modify the Cypress configuration file. Example: `export TOOLING_LOG_LEVEL=verbose && yarn cypress:dw:open` - Added two new methods to our scripting VM service clients (for Vagrant and Multipass): - `download`: allow you to pull files out of the VM and save them locally - `upload`: uploads a local file to the VM. (upload already existed as `transfer` - which has now been marked as deprecated). - Added new service function on our Fleet scripting module to enable us to set the logging level on a Fleet Agent - Cypress tests were adjusted to automatically set the agent logging to debug when running in CI - A new Cypress task that allows for an Agent Diagnostic file (which includes the Endpoint Log) to be retrieved from the host VM and stored with the CI job (under the artifacts tab) - A few tests were updated to include this step for failed test (cherry picked from commit 2ab8a5c) # Conflicts: # x-pack/plugins/security_solution/scripts/endpoint/common/fleet_services.ts
Contributor
💚 Build Succeeded
Metrics [docs]Unknown metric groupsESLint disabled line counts
Total ESLint disabled count
History
|
PhilippeOberti
added a commit
to stephmilovic/kibana
that referenced
this pull request
Dec 17, 2024
tomsonpl
approved these changes
Dec 17, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport
This will backport the following commits from
mainto8.x:Questions ?
Please refer to the Backport tool documentation