From 502bcf78c1ac8d948bf3a6e86d0a53b0e4b0d3a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A1bio=20Silva?= Date: Mon, 18 Nov 2024 23:24:34 +0000 Subject: [PATCH 1/2] EVEREST-1642 | do now allow downgrade on restore (#840) * fix: do now allow downgrade on restore * fix: update UI tests with recent psmdb version --- .../db-wizard/create-db-cluster/create-db-cluster.e2e.ts | 2 +- .../db-wizard/create-db-cluster/steps/basic-information-step.ts | 2 +- .../database-form/database-form-body/steps/first/first-step.tsx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ui/apps/everest/.e2e/pr/db-cluster/db-wizard/create-db-cluster/create-db-cluster.e2e.ts b/ui/apps/everest/.e2e/pr/db-cluster/db-wizard/create-db-cluster/create-db-cluster.e2e.ts index e7e4800ab..0c7e24155 100644 --- a/ui/apps/everest/.e2e/pr/db-cluster/db-wizard/create-db-cluster/create-db-cluster.e2e.ts +++ b/ui/apps/everest/.e2e/pr/db-cluster/db-wizard/create-db-cluster/create-db-cluster.e2e.ts @@ -171,7 +171,7 @@ test.describe('DB Cluster creation', () => { // Test the mechanism for default number of nodes await page.getByTestId('button-edit-preview-basic-information').click(); // Here we test that version wasn't reset to default - await expect(page.getByText('Version: 6.0.4-3')).toBeVisible(); + await expect(page.getByText('Version: 6.0.9-7')).toBeVisible(); // Make sure name doesn't change when we go back to first step expect(await page.getByTestId('text-input-db-name').inputValue()).toBe( diff --git a/ui/apps/everest/.e2e/pr/db-cluster/db-wizard/create-db-cluster/steps/basic-information-step.ts b/ui/apps/everest/.e2e/pr/db-cluster/db-wizard/create-db-cluster/steps/basic-information-step.ts index 63c43e40e..8d71c6bcd 100644 --- a/ui/apps/everest/.e2e/pr/db-cluster/db-wizard/create-db-cluster/steps/basic-information-step.ts +++ b/ui/apps/everest/.e2e/pr/db-cluster/db-wizard/create-db-cluster/steps/basic-information-step.ts @@ -54,7 +54,7 @@ export const basicInformationStepCheck = async ( recommendedEngineVersions.psmdb ); - await page.getByRole('option').filter({ hasText: '6.0.4-3' }).click(); + await page.getByRole('option').filter({ hasText: '6.0.9-7' }).click(); await page.getByTestId('text-input-db-name').fill(clusterName); await page.getByTestId('text-input-storage-class').click(); expect( diff --git a/ui/apps/everest/src/pages/database-form/database-form-body/steps/first/first-step.tsx b/ui/apps/everest/src/pages/database-form/database-form-body/steps/first/first-step.tsx index 0ed72cad7..7f07cfb9d 100644 --- a/ui/apps/everest/src/pages/database-form/database-form-body/steps/first/first-step.tsx +++ b/ui/apps/everest/src/pages/database-form/database-form-body/steps/first/first-step.tsx @@ -106,7 +106,7 @@ export const FirstStep = ({ loadingDefaultsForEdition }: StepProps) => { const setDbEngineDataForEngineType = useCallback(() => { //TODO 1234 - edit of dbVersion field should be refactored const newEngineData = dbEngines.find((engine) => engine.type === dbEngine); - if (newEngineData && mode === 'edit') { + if (newEngineData && mode !== 'new') { const validVersions = filterAvailableDbVersionsForDbEngineEdition( newEngineData, defaultDbVersion From d4a38aeda0a5ee775496df41f21df2d8a77c20f1 Mon Sep 17 00:00:00 2001 From: Diogo Recharte Date: Tue, 19 Nov 2024 09:28:08 +0000 Subject: [PATCH 2/2] EVEREST-1624 fix API tests (#843) * EVEREST-1624 fix API tests * EVEREST-1624 change db type in api-tests to pxc --- api-tests/tests/database-cluster.spec.ts | 16 ++++++++-------- api-tests/tests/database-engines.spec.ts | 6 +++--- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/api-tests/tests/database-cluster.spec.ts b/api-tests/tests/database-cluster.spec.ts index de42a5f42..87bb5b5df 100644 --- a/api-tests/tests/database-cluster.spec.ts +++ b/api-tests/tests/database-cluster.spec.ts @@ -40,7 +40,7 @@ test('create db cluster with monitoring config', async ({ request, page }) => { monitoringConfigName: monitoringConfigName1, }, engine: { - type: 'psmdb', + type: 'pxc', replicas: 1, storage: { size: '4G', @@ -51,7 +51,7 @@ test('create db cluster with monitoring config', async ({ request, page }) => { }, }, proxy: { - type: 'mongos', + type: 'haproxy', replicas: 1, expose: { type: 'internal', @@ -106,7 +106,7 @@ test('update db cluster with a new monitoring config', async ({ request, page }) monitoringConfigName: monitoringConfigName1, }, engine: { - type: 'psmdb', + type: 'pxc', replicas: 1, storage: { size: '4G', @@ -117,7 +117,7 @@ test('update db cluster with a new monitoring config', async ({ request, page }) }, }, proxy: { - type: 'mongos', + type: 'haproxy', replicas: 1, expose: { type: 'internal', @@ -182,7 +182,7 @@ test('update db cluster without monitoring config with a new monitoring config', }, spec: { engine: { - type: 'psmdb', + type: 'pxc', replicas: 1, storage: { size: '4G', @@ -193,7 +193,7 @@ test('update db cluster without monitoring config with a new monitoring config', }, }, proxy: { - type: 'mongos', + type: 'haproxy', replicas: 1, expose: { type: 'internal', @@ -261,7 +261,7 @@ test('update db cluster monitoring config with an empty monitoring config', asyn monitoringConfigName: monitoringConfigName1, }, engine: { - type: 'psmdb', + type: 'pxc', replicas: 1, storage: { size: '4G', @@ -272,7 +272,7 @@ test('update db cluster monitoring config with an empty monitoring config', asyn }, }, proxy: { - type: 'mongos', + type: 'haproxy', replicas: 1, expose: { type: 'internal', diff --git a/api-tests/tests/database-engines.spec.ts b/api-tests/tests/database-engines.spec.ts index 2f648209e..9458e171d 100644 --- a/api-tests/tests/database-engines.spec.ts +++ b/api-tests/tests/database-engines.spec.ts @@ -37,10 +37,10 @@ test('get/edit database engine versions', async ({ request }) => { const engineData: GetDatabaseEngineResponse = await engineResponse.json(); const availableVersions = engineData.status.availableVersions; - expect(availableVersions.engine['7.0.12-7'].imageHash).toBe('7f00e19878bd143119772cd5468f1f0f9857dfcd2ae2f814d52ef3fa7cff6899'); - expect(availableVersions.backup['2.5.0'].status).toBe('recommended'); + expect(availableVersions.engine['7.0.14-8'].imageHash).toBe('ed932d4e7231dcb793bf609f781226a8393aa8958b103339f4a503a8f70ed17e'); + expect(availableVersions.backup['2.7.0'].status).toBe('recommended'); - const allowedVersions = ['6.0.5-4', '6.0.4-3', '5.0.7-6', '7.0.8-5', '7.0.12-7']; + const allowedVersions = ['6.0.5-4', '6.0.4-3', '7.0.8-5', '7.0.12-7', '7.0.14-8']; delete engineData.status; engineData.spec.allowedVersions = allowedVersions;