Skip to content
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

[Security Solution] [Endpoint] Cypress Increase create policy task timeout #170001

Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Q: I'm guessing this is all in milliseconds so equivalent to 5 minutes? Maybe a comment would be nice just in case.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exactly

);
};

export const enableAgentTamperProtectionFeatureFlagInPolicy = (agentPolicyId: string) => {
Expand Down