Skip to content

Commit

Permalink
[Security Solution] Narrow skipped endpoint list and policy tests (#1…
Browse files Browse the repository at this point in the history
…50499)

## Summary

Narrows some skipped tests in Endpoint list and Policy details as we
address the flakiness.

Flaky test runner:
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/1989
✅

### 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

---------

Co-authored-by: kibanamachine <[email protected]>
  • Loading branch information
kevinlog and kibanamachine authored Mar 7, 2023
1 parent e97f488 commit 4f5037f
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 () => {
Expand Down Expand Up @@ -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',
});
});
});

Expand Down Expand Up @@ -290,15 +291,16 @@ 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
await testSubjects.existOrFail('policyDetailsPage');
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);
Expand All @@ -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);
Expand All @@ -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');
});
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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',
},
},
},
},
},
],
Expand Down

0 comments on commit 4f5037f

Please sign in to comment.