Skip to content

Commit

Permalink
[OSSM-6835][OSSM-6843] Fix for cypress flakiness on OCP 4.16
Browse files Browse the repository at this point in the history
  • Loading branch information
mkralik3 committed Aug 15, 2024
1 parent d127a83 commit 4b618a7
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 6 deletions.
6 changes: 5 additions & 1 deletion frontend/cypress/integration/common/hooks.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Before } from '@badeball/cypress-cucumber-preprocessor';
import { Before, After } from '@badeball/cypress-cucumber-preprocessor';

function install_demoapp(demoapp: string) {
var namespaces: string = 'bookinfo';
Expand Down Expand Up @@ -85,3 +85,7 @@ Before({ tags: '@error-rates-app' }, function () {
Before({ tags: '@sleep-app' }, function () {
install_demoapp('sleep');
});

After({ tags: '@sleep-app-scaleup-after' }, function () {
cy.exec('kubectl scale -n sleep --replicas=1 deployment/sleep');
});
3 changes: 2 additions & 1 deletion frontend/cypress/integration/common/overview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ Given('a healthy application in the cluster', function () {
this.targetApp = 'productpage';
});

Given('an idle application in the cluster', function () {
//When you use this, you need to annotate test by @sleep-app-scaleup-after to revert this change after the test
Given('an idle sleep application in the cluster', function () {
this.targetNamespace = 'sleep';
this.targetApp = 'sleep';

Expand Down
3 changes: 2 additions & 1 deletion frontend/cypress/integration/common/workloads.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ Given('a healthy workload in the cluster', function () {
this.targetWorkload = 'productpage-v1';
});

Given('an idle workload in the cluster', function () {
//When you use this, you need to annotate test by @sleep-app-scaleup-after to revert this change after the test
Given('an idle sleep workload in the cluster', function () {
this.targetNamespace = 'sleep';
this.targetWorkload = 'sleep';

Expand Down
3 changes: 2 additions & 1 deletion frontend/cypress/integration/featureFiles/apps.feature
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,9 @@ Feature: Kiali Apps List page

@bookinfo-app
@sleep-app
@sleep-app-scaleup-after
Scenario: The idle status of a logical mesh application is reported in the list of applications
Given an idle application in the cluster
Given an idle sleep application in the cluster
When I fetch the list of applications
And user selects the "sleep" namespace
Then the application should be listed as "idle"
Expand Down
3 changes: 2 additions & 1 deletion frontend/cypress/integration/featureFiles/overview.feature
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,9 @@ Feature: Kiali Overview page
And the "healthy" application indicator should list the application

@error-rates-app
@sleep-app-scaleup-after
Scenario: The idle status of a logical mesh application is reported in the overview of a namespace
Given an idle application in the cluster
Given an idle sleep application in the cluster
When I fetch the overview of the cluster
Then there should be a "idle" application indicator in the namespace
And the "idle" application indicator should list the application
Expand Down
3 changes: 2 additions & 1 deletion frontend/cypress/integration/featureFiles/workloads.feature
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,9 @@ Feature: Kiali Workloads page
Then the workload should be listed as "healthy"

@sleep-app
@sleep-app-scaleup-after
Scenario: The idle status of a workload is reported in the list of workloads
Given an idle workload in the cluster
Given an idle sleep workload in the cluster
When user selects the "sleep" namespace
Then the workload should be listed as "idle"
And the health status of the workload should be "Not Ready"
Expand Down

0 comments on commit 4b618a7

Please sign in to comment.