mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 09:19:04 -04:00
[Security Solution] [Endpoint] Cypress Increase create policy task timeout (#170001)
## Summary Increase policy task timeout to 5 minutes to avoid flaky tests. ### For maintainers - [ ] This was checked for breaking API changes and was [labeled appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) --------- Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
parent
5c44377de1
commit
b86e74106d
3 changed files with 18 additions and 11 deletions
|
@ -21,8 +21,7 @@ import { enableAllPolicyProtections } from '../../../tasks/endpoint_policy';
|
|||
import { createEndpointHost } from '../../../tasks/create_endpoint_host';
|
||||
import { deleteAllLoadedEndpointData } from '../../../tasks/delete_all_endpoint_data';
|
||||
|
||||
// FLAKY: https://github.com/elastic/kibana/issues/170373
|
||||
describe.skip('Response console', { tags: ['@ess', '@serverless'] }, () => {
|
||||
describe('Response console', { tags: ['@ess', '@serverless'] }, () => {
|
||||
beforeEach(() => {
|
||||
login();
|
||||
});
|
||||
|
|
|
@ -9,8 +9,7 @@ import { login } from '../../tasks/login';
|
|||
import { visitPolicyDetailsPage } from '../../screens/policy_details';
|
||||
import type { IndexedFleetEndpointPolicyResponse } from '../../../../../common/endpoint/data_loaders/index_fleet_endpoint_policy';
|
||||
|
||||
// FLAKY: https://github.com/elastic/kibana/issues/170666
|
||||
describe.skip(
|
||||
describe(
|
||||
'When displaying the Policy Details in Security Essentials PLI',
|
||||
{
|
||||
tags: ['@serverless'],
|
||||
|
@ -24,7 +23,11 @@ describe.skip(
|
|||
let loadedPolicyData: IndexedFleetEndpointPolicyResponse;
|
||||
|
||||
before(() => {
|
||||
cy.task('indexFleetEndpointPolicy', { policyName: 'tests-serverless' }).then((response) => {
|
||||
cy.task(
|
||||
'indexFleetEndpointPolicy',
|
||||
{ policyName: 'tests-serverless' },
|
||||
{ timeout: 5 * 60 * 1000 }
|
||||
).then((response) => {
|
||||
loadedPolicyData = response as IndexedFleetEndpointPolicyResponse;
|
||||
});
|
||||
});
|
||||
|
|
|
@ -81,15 +81,20 @@ export const yieldEndpointPolicyRevision = (): Cypress.Chainable<number> =>
|
|||
|
||||
export const createAgentPolicyTask = (
|
||||
version: string,
|
||||
policyPrefix?: string
|
||||
policyPrefix?: string,
|
||||
timeout?: number
|
||||
): Cypress.Chainable<IndexedFleetEndpointPolicyResponse> => {
|
||||
const policyName = `${policyPrefix || 'Reassign'} ${Math.random().toString(36).substring(2, 7)}`;
|
||||
|
||||
return cy.task<IndexedFleetEndpointPolicyResponse>('indexFleetEndpointPolicy', {
|
||||
policyName,
|
||||
endpointPackageVersion: version,
|
||||
agentPolicyName: policyName,
|
||||
});
|
||||
return cy.task<IndexedFleetEndpointPolicyResponse>(
|
||||
'indexFleetEndpointPolicy',
|
||||
{
|
||||
policyName,
|
||||
endpointPackageVersion: version,
|
||||
agentPolicyName: policyName,
|
||||
},
|
||||
{ timeout: timeout ?? 5 * 60 * 1000 }
|
||||
);
|
||||
};
|
||||
|
||||
export const enableAgentTamperProtectionFeatureFlagInPolicy = (agentPolicyId: string) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue