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

fix flaky CI (installation + block-pool tests) #904

Merged
merged 1 commit into from
Jun 22, 2023
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
24 changes: 4 additions & 20 deletions cypress/support.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,30 +60,14 @@ Cypress.Commands.add('install', () => {
'not.exist'
);

// Safety step, labels are required by NS (for ODF 4.12 onwards).
// In case not present, will add again.
cy.exec(
'oc label --overwrite ns openshift-storage pod-security.kubernetes.io/enforce=privileged pod-security.kubernetes.io/warn=baseline pod-security.kubernetes.io/audit=baseline',
{ failOnNonZeroExit: false }
);

cy.log('Check if storage system was created');
cy.clickNavLink(['Operators', 'Installed Operators']);
cy.byLegacyTestID('item-filter').type('Openshift Data Foundation');
cy.byTestRows('resource-row').get('td').first().click();
cy.byLegacyTestID('horizontal-link-Storage System').click();
cy.byLegacyTestID('item-filter').type(STORAGE_SYSTEM_NAME);
cy.get('td[role="gridcell"]', { timeout: 5 * 60000 }).contains(
'Available'
);

// Verify that ODF SS list page shows the SS.
cy.log('Check if storage system is listed as expected.');
cy.log('Check if storage system was created and is listed as expected.');
cy.clickNavLink(['Storage', 'Data Foundation']);
cy.byLegacyTestID('horizontal-link-Storage Systems').click();
cy.byLegacyTestID('item-filter').type(STORAGE_SYSTEM_NAME);
cy.get('a').contains(STORAGE_SYSTEM_NAME);

cy.get('td[id="status"]', { timeout: 5 * 60000 }).contains('Available', {
timeout: 5 * 60000,
});
// Verify that the OCS SC is in READY state.
cy.exec(OCS_SC_STATE, { timeout: 25 * 60000 });
} else {
Expand Down
4 changes: 3 additions & 1 deletion cypress/views/block-pool.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { POOL_PROGRESS } from '../constants/storage-pool-const';
import { app } from '../support/pages/app';
import { NS } from '../utils/consts';
import { ODFCommon } from '../views/odf-common';

Expand Down Expand Up @@ -92,8 +93,9 @@ export const createBlockPool = () => {
cy.byTestID('item-create').click();
populateBlockPoolForm();
verifyFooterActions('create');
app.waitForLoad();
cy.log('Verify a new block pool creation');
cy.byTestID('status-text').contains('Ready');
cy.byTestID('status-text').should('contain', 'Ready', { timeout: 2 * 60000 });
verifyBlockPoolJSON();
};

Expand Down