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

test: [M3-9131] - Increase Linode clone timeout to 5 minutes #11529

Merged
Show file tree
Hide file tree
Changes from all commits
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
5 changes: 5 additions & 0 deletions packages/manager/.changeset/pr-11529-tests-1737049089021.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@linode/manager": Tests
---

Increase timeouts when performing Linode clone operations ([#11529](https://github.com/linode/manager/pull/11529))
13 changes: 8 additions & 5 deletions packages/manager/cypress/e2e/core/linodes/clone-linode.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ import { randomLabel } from 'support/util/random';
import { authenticate } from 'support/api/authentication';
import { cleanUp } from 'support/util/cleanup';
import { createTestLinode } from 'support/util/linodes';
import {
LINODE_CLONE_TIMEOUT,
LINODE_CREATE_TIMEOUT,
} from 'support/constants/linodes';
import type { Linode } from '@linode/api-v4';

/**
Expand All @@ -33,9 +37,6 @@ const getLinodeCloneUrl = (linode: Linode): string => {
return `/linodes/create?linodeID=${linode.id}${regionQuery}&type=Clone+Linode${typeQuery}`;
};

/* Timeout after 4 minutes while waiting for clone. */
const CLONE_TIMEOUT = 240_000;

authenticate();
describe('clone linode', () => {
before(() => {
Expand Down Expand Up @@ -69,7 +70,9 @@ describe('clone linode', () => {
cy.visitWithLogin(`/linodes/${linode.id}`);

// Wait for Linode to boot, then initiate clone flow.
cy.findByText('OFFLINE').should('be.visible');
cy.findByText('OFFLINE', { timeout: LINODE_CREATE_TIMEOUT }).should(
'be.visible'
);

ui.actionMenu
.findByTitle(`Action menu for Linode ${linode.label}`)
Expand Down Expand Up @@ -108,7 +111,7 @@ describe('clone linode', () => {
ui.toast.assertMessage(`Your Linode ${newLinodeLabel} is being created.`);
ui.toast.assertMessage(
`Linode ${linode.label} has been cloned to ${newLinodeLabel}.`,
{ timeout: CLONE_TIMEOUT }
{ timeout: LINODE_CLONE_TIMEOUT }
);
});
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { authenticate } from 'support/api/authentication';
import { cleanUp } from 'support/util/cleanup';
import { mockGetVPC, mockGetVPCs } from 'support/intercepts/vpc';
import { dcPricingMockLinodeTypes } from 'support/constants/dc-specific-pricing';
import { LINODE_CLONE_TIMEOUT } from 'support/constants/linodes';
import { chooseRegion, getRegionById } from 'support/util/regions';
import { mockGetVLANs } from 'support/intercepts/vlans';
import {
Expand Down Expand Up @@ -225,7 +226,8 @@ describe('Linode Config management', () => {
.its('response.statusCode')
.should('eq', 200);
ui.toast.assertMessage(
`Configuration ${config.label} successfully updated`
`Configuration ${config.label} successfully updated`,
{ timeout: LINODE_CLONE_TIMEOUT }
);

// Confirm that updated IPAM is automatically listed in config table.
Expand Down
7 changes: 7 additions & 0 deletions packages/manager/cypress/support/constants/linodes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,10 @@
* Equals 5 minutes.
*/
export const LINODE_CREATE_TIMEOUT = 300_000;

/**
* Length of time to wait for a Linode to be cloned.
*
* Equals 5 minutes.
*/
export const LINODE_CLONE_TIMEOUT = 300_000;
Loading