-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Defend Workflows][E2E] Isolate command e2e coverage #154465
Merged
szwarckonrad
merged 22 commits into
elastic:main
from
szwarckonrad:endpoint-isolate-e2e-coverage
Apr 24, 2023
Merged
Changes from 17 commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
2f884d5
avatar aria label
szwarckonrad 704886c
isolate command e2e coverage
szwarckonrad feab480
Merge branch 'main' into endpoint-isolate-e2e-coverage
szwarckonrad 5db6e07
typings
szwarckonrad 51b63c3
Merge branch 'main' into endpoint-isolate-e2e-coverage
szwarckonrad 4de9906
typings
szwarckonrad 67eb92c
cleanup
szwarckonrad 12874a1
Merge branch 'main' into endpoint-isolate-e2e-coverage
szwarckonrad fcc702f
use custom document generator
szwarckonrad 25674ff
Merge branch 'main' into endpoint-isolate-e2e-coverage
szwarckonrad 7c9043f
Merge branch 'main' into endpoint-isolate-e2e-coverage
szwarckonrad c54509b
manualy refresh result list
szwarckonrad d2fbb5d
Merge branch 'main' into endpoint-isolate-e2e-coverage
szwarckonrad 9415935
remove artifacts after endpoints.cy.ts test
szwarckonrad ac9e110
Merge branch 'main' into endpoint-isolate-e2e-coverage
szwarckonrad f84233b
Merge branch 'main' into endpoint-isolate-e2e-coverage
szwarckonrad b3a7460
cleanup
szwarckonrad b5b6941
tweaks
szwarckonrad 62fa777
Merge branch 'main' into endpoint-isolate-e2e-coverage
szwarckonrad 27101e2
Merge branch 'main' into endpoint-isolate-e2e-coverage
szwarckonrad 391ed8c
type returns of helper functions
szwarckonrad db17840
Merge remote-tracking branch 'origin/endpoint-isolate-e2e-coverage' i…
szwarckonrad File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,6 +48,7 @@ export type IndexedHostsAndAlertsResponse = IndexedHostsResponse; | |
* @param fleet | ||
* @param options | ||
* @param DocGenerator | ||
* @param withResponseActions | ||
*/ | ||
export async function indexHostsAndAlerts( | ||
client: Client, | ||
|
@@ -62,7 +63,8 @@ export async function indexHostsAndAlerts( | |
alertsPerHost: number, | ||
fleet: boolean, | ||
options: TreeOptions = {}, | ||
DocGenerator: typeof EndpointDocGenerator = EndpointDocGenerator | ||
DocGenerator: typeof EndpointDocGenerator = EndpointDocGenerator, | ||
withResponseActions = true | ||
): Promise<IndexedHostsAndAlertsResponse> { | ||
const random = seedrandom(seed); | ||
const epmEndpointPackage = await getEndpointPackageInfo(kbnClient); | ||
|
@@ -103,7 +105,7 @@ export async function indexHostsAndAlerts( | |
} | ||
|
||
for (let i = 0; i < numHosts; i++) { | ||
const generator = new DocGenerator(random); | ||
const generator = new DocGenerator(random, undefined); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Optional: you don't need |
||
const indexedHosts = await indexEndpointHostDocs({ | ||
numDocs, | ||
client, | ||
|
@@ -114,6 +116,7 @@ export async function indexHostsAndAlerts( | |
policyResponseIndex, | ||
enrollFleet: fleet, | ||
generator, | ||
withResponseActions, | ||
}); | ||
|
||
mergeAndAppendArrays(response, indexedHosts); | ||
|
This file contains 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
This file contains 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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Were these changes intentionally done? or a result of perhaps a merge conflict resolution?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, these were done intentionally. Icon type does not propagate to the component correctly for
lock
variant, thats why I've used thearia
field that works properly. I will create a PR that fixes this in the UI project. One of the tests from TestRail was about making sure the proper icon is being displayed, hence these changes.