[8.7] [Security Solution] Narrow skipped endpoint list and policy tests (#150499) (#152805)

# Backport

This will backport the following commits from `main` to `8.7`:
- [[Security Solution] Narrow skipped endpoint list and policy tests
(#150499)](https://github.com/elastic/kibana/pull/150499)

<!--- Backport version: 8.9.7 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Kevin
Logan","email":"56395104+kevinlog@users.noreply.github.com"},"sourceCommit":{"committedDate":"2023-03-07T12:15:31Z","message":"[Security
Solution] Narrow skipped endpoint list and policy tests (#150499)\n\n##
Summary\r\n\r\nNarrows some skipped tests in Endpoint list and Policy
details as we\r\naddress the flakiness.\r\n\r\nFlaky test
runner:\r\nhttps://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/1989\r\n\r\n\r\n###
Checklist\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"4f5037f985b15c896d4fa2a1ba606f886a7468a0","branchLabelMapping":{"^v8.8.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:Defend
Workflows","v8.7.0","v8.8.0"],"number":150499,"url":"https://github.com/elastic/kibana/pull/150499","mergeCommit":{"message":"[Security
Solution] Narrow skipped endpoint list and policy tests (#150499)\n\n##
Summary\r\n\r\nNarrows some skipped tests in Endpoint list and Policy
details as we\r\naddress the flakiness.\r\n\r\nFlaky test
runner:\r\nhttps://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/1989\r\n\r\n\r\n###
Checklist\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"4f5037f985b15c896d4fa2a1ba606f886a7468a0"}},"sourceBranch":"main","suggestedTargetBranches":["8.7"],"targetPullRequestStates":[{"branch":"8.7","label":"v8.7.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.8.0","labelRegex":"^v8.8.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/150499","number":150499,"mergeCommit":{"message":"[Security
Solution] Narrow skipped endpoint list and policy tests (#150499)\n\n##
Summary\r\n\r\nNarrows some skipped tests in Endpoint list and Policy
details as we\r\naddress the flakiness.\r\n\r\nFlaky test
runner:\r\nhttps://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/1989\r\n\r\n\r\n###
Checklist\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"4f5037f985b15c896d4fa2a1ba606f886a7468a0"}}]}]
BACKPORT-->

Co-authored-by: Kevin Logan <56395104+kevinlog@users.noreply.github.com>
This commit is contained in:
Kibana Machine 2023-03-07 08:11:19 -05:00 committed by GitHub
parent 0e2c874664
commit 541e274d83
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 8 deletions

View file

@ -25,8 +25,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
const policyTestResources = getService('policyTestResources');
const endpointTestResources = getService('endpointTestResources');
// Failing: See https://github.com/elastic/kibana/issues/138776
describe.skip('When on the Endpoint Policy Details Page', function () {
describe('When on the Endpoint Policy Details Page', function () {
let indexedData: IndexedHostsAndAlertsResponse;
before(async () => {
@ -230,7 +229,9 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
policyInfo.agentPolicy.id
);
expect(agentFullPolicyUpdated.inputs[0].policy.linux.advanced).to.eql(undefined);
expect(agentFullPolicyUpdated.inputs[0].policy.linux.advanced).to.eql({
capture_env_vars: 'LD_PRELOAD,LD_LIBRARY_PATH',
});
});
});
@ -290,7 +291,8 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
);
});
it('should show trusted apps card and link should go back to policy', async () => {
// Failing: See https://github.com/elastic/kibana/issues/138776
it.skip('should show trusted apps card and link should go back to policy', async () => {
await testSubjects.existOrFail('trustedApps-fleet-integration-card');
await (await testSubjects.find('trustedApps-link-to-exceptions')).click();
await (await testSubjects.find('confirmModalConfirmButton')).click(); // Fleet show a confirm modal on unsaved changes
@ -298,7 +300,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
await (await testSubjects.find('policyDetailsBackLink')).click();
await testSubjects.existOrFail('endpointIntegrationPolicyForm');
});
it('should show event filters card and link should go back to policy', async () => {
it.skip('should show event filters card and link should go back to policy', async () => {
await testSubjects.existOrFail('eventFilters-fleet-integration-card');
const eventFiltersCard = await testSubjects.find('eventFilters-fleet-integration-card');
await pageObjects.ingestManagerCreatePackagePolicy.scrollToCenterOfWindow(eventFiltersCard);
@ -308,7 +310,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
await (await testSubjects.find('policyDetailsBackLink')).click();
await testSubjects.existOrFail('endpointIntegrationPolicyForm');
});
it('should show blocklists card and link should go back to policy', async () => {
it.skip('should show blocklists card and link should go back to policy', async () => {
await testSubjects.existOrFail('blocklists-fleet-integration-card');
const blocklistsCard = await testSubjects.find('blocklists-fleet-integration-card');
await pageObjects.ingestManagerCreatePackagePolicy.scrollToCenterOfWindow(blocklistsCard);
@ -318,7 +320,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
await (await testSubjects.find('policyDetailsBackLink')).click();
await testSubjects.existOrFail('endpointIntegrationPolicyForm');
});
it('should not show host isolation exceptions card because no entries', async () => {
it.skip('should not show host isolation exceptions card because no entries', async () => {
await testSubjects.missingOrFail('hostIsolationExceptions-fleet-integration-card');
});
});

View file

@ -186,13 +186,21 @@ export function EndpointPolicyTestResourcesProvider({ getService }: FtrProviderC
enabled: true,
inputs: [
{
type: 'endpoint',
type: 'ENDPOINT_INTEGRATION_CONFIG',
enabled: true,
streams: [],
config: {
policy: {
value: policyFactory(),
},
_config: {
value: {
type: 'endpoint',
endpointConfig: {
preset: 'EDRComplete',
},
},
},
},
},
],