Skip to content

Commit

Permalink
test: [M3-9072] - Fix test failures by using Debian 12 for test Linod…
Browse files Browse the repository at this point in the history
…es by default (#11486)

* Use Debian 12 for Linode factories, replace Debian 10 with 12 in tests

* Added changeset: Fix Cypress test failures stemming from Debian 10 Image deprecation

* Fix StackScript test by resizing disk to be slightly larger for Debian 12
  • Loading branch information
jdamore-linode authored Jan 8, 2025
1 parent b47661f commit bab026d
Show file tree
Hide file tree
Showing 14 changed files with 32 additions and 27 deletions.
5 changes: 5 additions & 0 deletions packages/manager/.changeset/pr-11486-tests-1736284627318.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@linode/manager": Tests
---

Fix Cypress test failures stemming from Debian 10 Image deprecation ([#11486](https://github.com/linode/manager/pull/11486))
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ describe('Search Images', () => {
cy.defer(
() =>
createTestLinode(
{ image: 'linode/debian10', region: 'us-east' },
{ image: 'linode/debian12', region: 'us-east' },
{ waitForDisks: true }
),
'create linode'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { randomLabel, randomNumber, randomPhrase } from 'support/util/random';
describe('create image (using mocks)', () => {
it('create image from a linode', () => {
const mockDisks = [
linodeDiskFactory.build({ label: 'Debian 10 Disk', filesystem: 'ext4' }),
linodeDiskFactory.build({ label: 'Debian 12 Disk', filesystem: 'ext4' }),
linodeDiskFactory.build({
label: '512 MB Swap Image',
filesystem: 'swap',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ describe('Create Linode flow to validate code snippet modal', () => {

// Set Linode label, distribution, plan type, password, etc.
linodeCreatePage.setLabel(linodeLabel);
linodeCreatePage.selectImage('Debian 11');
linodeCreatePage.selectImage('Debian 12');
linodeCreatePage.selectRegionById('us-east');
linodeCreatePage.selectPlan('Shared CPU', 'Nanode 1 GB');
linodeCreatePage.setRootPassword(rootPass);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ describe('Create Linode with Add-ons', () => {
cy.visitWithLogin('/linodes/create');

linodeCreatePage.setLabel(mockLinode.label);
linodeCreatePage.selectImage('Debian 11');
linodeCreatePage.selectImage('Debian 12');
linodeCreatePage.selectRegionById(linodeRegion.id);
linodeCreatePage.selectPlan('Shared CPU', 'Nanode 1 GB');
linodeCreatePage.setRootPassword(randomString(32));
Expand Down Expand Up @@ -83,7 +83,7 @@ describe('Create Linode with Add-ons', () => {
cy.visitWithLogin('/linodes/create');

linodeCreatePage.setLabel(mockLinode.label);
linodeCreatePage.selectImage('Debian 11');
linodeCreatePage.selectImage('Debian 12');
linodeCreatePage.selectRegionById(linodeRegion.id);
linodeCreatePage.selectPlan('Shared CPU', 'Nanode 1 GB');
linodeCreatePage.setRootPassword(randomString(32));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ describe('Create Linode with Firewall', () => {
cy.visitWithLogin('/linodes/create');

linodeCreatePage.setLabel(mockLinode.label);
linodeCreatePage.selectImage('Debian 11');
linodeCreatePage.selectImage('Debian 12');
linodeCreatePage.selectRegionById(linodeRegion.id);
linodeCreatePage.selectPlan('Shared CPU', 'Nanode 1 GB');
linodeCreatePage.setRootPassword(randomString(32));
Expand Down Expand Up @@ -111,7 +111,7 @@ describe('Create Linode with Firewall', () => {
cy.visitWithLogin('/linodes/create');

linodeCreatePage.setLabel(mockLinode.label);
linodeCreatePage.selectImage('Debian 11');
linodeCreatePage.selectImage('Debian 12');
linodeCreatePage.selectRegionById(linodeRegion.id);
linodeCreatePage.selectPlan('Shared CPU', 'Nanode 1 GB');
linodeCreatePage.setRootPassword(randomString(32));
Expand Down Expand Up @@ -218,7 +218,7 @@ describe('Create Linode with Firewall', () => {
cy.visitWithLogin('/linodes/create');

linodeCreatePage.setLabel(mockLinode.label);
linodeCreatePage.selectImage('Debian 11');
linodeCreatePage.selectImage('Debian 12');
linodeCreatePage.selectRegionById(linodeRegion.id);
linodeCreatePage.selectPlan('Shared CPU', 'Nanode 1 GB');
linodeCreatePage.setRootPassword(randomString(32));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ describe('Create Linode with SSH Key', () => {
cy.visitWithLogin('/linodes/create');

linodeCreatePage.setLabel(mockLinode.label);
linodeCreatePage.selectImage('Debian 11');
linodeCreatePage.selectImage('Debian 12');
linodeCreatePage.selectRegionById(linodeRegion.id);
linodeCreatePage.selectPlan('Shared CPU', 'Nanode 1 GB');
linodeCreatePage.setRootPassword(randomString(32));
Expand Down Expand Up @@ -107,7 +107,7 @@ describe('Create Linode with SSH Key', () => {
cy.visitWithLogin('/linodes/create');

linodeCreatePage.setLabel(mockLinode.label);
linodeCreatePage.selectImage('Debian 11');
linodeCreatePage.selectImage('Debian 12');
linodeCreatePage.selectRegionById(linodeRegion.id);
linodeCreatePage.selectPlan('Shared CPU', 'Nanode 1 GB');
linodeCreatePage.setRootPassword(randomString(32));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ describe('Create Linode with user data', () => {
// Fill out create form, selecting a region and image that both have
// cloud-init capabilities.
linodeCreatePage.setLabel(mockLinode.label);
linodeCreatePage.selectImage('Debian 11');
linodeCreatePage.selectImage('Debian 12');
linodeCreatePage.selectRegionById(linodeRegion.id);
linodeCreatePage.selectPlan('Shared CPU', 'Nanode 1 GB');
linodeCreatePage.setRootPassword(randomString(32));
Expand Down Expand Up @@ -88,7 +88,7 @@ describe('Create Linode with user data', () => {
cy.visitWithLogin('/linodes/create');

linodeCreatePage.setLabel(mockLinode.label);
linodeCreatePage.selectImage('Debian 11');
linodeCreatePage.selectImage('Debian 12');
linodeCreatePage.selectRegionById(mockLinodeRegion.id);
linodeCreatePage.selectPlan('Shared CPU', 'Nanode 1 GB');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ describe('Create Linode with VLANs', () => {

// Fill out necessary Linode create fields.
linodeCreatePage.selectRegionById(mockLinodeRegion.id);
linodeCreatePage.selectImage('Debian 11');
linodeCreatePage.selectImage('Debian 12');
linodeCreatePage.setLabel(mockLinode.label);
linodeCreatePage.selectPlan('Shared CPU', 'Nanode 1 GB');
linodeCreatePage.setRootPassword(randomString(32));
Expand Down Expand Up @@ -130,7 +130,7 @@ describe('Create Linode with VLANs', () => {

// Fill out necessary Linode create fields.
linodeCreatePage.selectRegionById(mockLinodeRegion.id);
linodeCreatePage.selectImage('Debian 11');
linodeCreatePage.selectImage('Debian 12');
linodeCreatePage.setLabel(mockLinode.label);
linodeCreatePage.selectPlan('Shared CPU', 'Nanode 1 GB');
linodeCreatePage.setRootPassword(randomString(32));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ describe('Create Linode with VPCs', () => {
cy.visitWithLogin('/linodes/create');

linodeCreatePage.setLabel(mockLinode.label);
linodeCreatePage.selectImage('Debian 11');
linodeCreatePage.selectImage('Debian 12');
linodeCreatePage.selectRegionById(linodeRegion.id);
linodeCreatePage.selectPlan('Shared CPU', 'Nanode 1 GB');
linodeCreatePage.setRootPassword(randomString(32));
Expand Down Expand Up @@ -214,7 +214,7 @@ describe('Create Linode with VPCs', () => {
cy.visitWithLogin('/linodes/create');

linodeCreatePage.setLabel(mockLinode.label);
linodeCreatePage.selectImage('Debian 11');
linodeCreatePage.selectImage('Debian 12');
linodeCreatePage.selectRegionById(linodeRegion.id);
linodeCreatePage.selectPlan('Shared CPU', 'Nanode 1 GB');
linodeCreatePage.setRootPassword(randomString(32));
Expand Down
10 changes: 5 additions & 5 deletions packages/manager/cypress/e2e/core/linodes/create-linode.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ describe('Create Linode', () => {

// Set Linode label, OS, plan type, password, etc.
linodeCreatePage.setLabel(linodeLabel);
linodeCreatePage.selectImage('Debian 11');
linodeCreatePage.selectImage('Debian 12');
linodeCreatePage.selectRegionById(linodeRegion.id);
linodeCreatePage.selectPlan(
planConfig.planType,
Expand All @@ -116,7 +116,7 @@ describe('Create Linode', () => {
cy.get('[data-qa-linode-create-summary]')
.scrollIntoView()
.within(() => {
cy.findByText('Debian 11').should('be.visible');
cy.findByText('Debian 12').should('be.visible');
cy.findByText(linodeRegion.label).should('be.visible');
cy.findByText(planConfig.planLabel).should('be.visible');
});
Expand Down Expand Up @@ -230,7 +230,7 @@ describe('Create Linode', () => {

// Set Linode label, OS, plan type, password, etc.
linodeCreatePage.setLabel(linodeLabel);
linodeCreatePage.selectImage('Debian 11');
linodeCreatePage.selectImage('Debian 12');
linodeCreatePage.selectRegionById(linodeRegion.id);
linodeCreatePage.selectPlan('Accelerated', mockAcceleratedType[0].label);
linodeCreatePage.setRootPassword(randomString(32));
Expand All @@ -239,7 +239,7 @@ describe('Create Linode', () => {
cy.get('[data-qa-linode-create-summary]')
.scrollIntoView()
.within(() => {
cy.findByText('Debian 11').should('be.visible');
cy.findByText('Debian 12').should('be.visible');
cy.findByText(`US, ${linodeRegion.label}`).should('be.visible');
cy.findByText(mockAcceleratedType[0].label).should('be.visible');
});
Expand Down Expand Up @@ -462,7 +462,7 @@ describe('Create Linode', () => {

// Set Linode label, OS, plan type, password, etc.
linodeCreatePage.setLabel(linodeLabel);
linodeCreatePage.selectImage('Debian 11');
linodeCreatePage.selectImage('Debian 12');
linodeCreatePage.selectRegionById(linodeRegion.id);
linodeCreatePage.selectPlan('Shared CPU', 'Nanode 1 GB');
linodeCreatePage.setRootPassword(randomString(32));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ describe('linode storage tab', () => {
* - Confirms that Cloud Manager UI automatically updates to reflect resize.
*/
it('resize disk', () => {
const diskName = 'Debian 10 Disk';
const diskName = 'Debian 12 Disk';
cy.defer(() =>
createTestLinode({ image: null }, { securityMethod: 'powered_off' })
).then((linode: Linode) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,9 @@ const fillOutLinodeForm = (label: string, regionName: string) => {
* @returns Promise that resolves to the new Image.
*/
const createLinodeAndImage = async () => {
// 1.5GB
// Shout out to Debian for fitting on a 1.5GB disk.
const resizedDiskSize = 1536;
// 2GB
// Shout out to Debian for fitting on a 2GB disk.
const resizedDiskSize = 2048;
const linode = await createTestLinode(
createLinodeRequestFactory.build({
label: randomLabel(),
Expand Down
4 changes: 2 additions & 2 deletions packages/manager/src/factories/linodes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ export const linodeFactory = Factory.Sync.makeFactory<Linode>({
group: '',
hypervisor: 'kvm',
id: Factory.each((i) => i),
image: 'linode/debian10',
image: 'linode/debian12',
ipv4: ['50.116.6.212', '192.168.203.1'],
ipv6: '2600:3c00::f03c:92ff:fee2:6c40/64',
label: Factory.each((i) => `linode-${i}`),
Expand All @@ -309,7 +309,7 @@ export const linodeFactory = Factory.Sync.makeFactory<Linode>({
export const createLinodeRequestFactory = Factory.Sync.makeFactory<CreateLinodeRequest>(
{
booted: true,
image: 'linode/debian10',
image: 'linode/debian12',
label: Factory.each((i) => `linode-${i}`),
region: 'us-southeast',
root_pass: 'linode-root-password',
Expand Down

0 comments on commit bab026d

Please sign in to comment.