Skip to content

Fix ISM e2e tests for OS 2.7: conditional toast dismiss and failOnStatusCode - #2123

Merged
ruanyl merged 1 commit into
opensearch-project:2.7from
aditi-1601:fix-ism-e2e-2.7
Jul 30, 2026
Merged

Fix ISM e2e tests for OS 2.7: conditional toast dismiss and failOnStatusCode#2123
ruanyl merged 1 commit into
opensearch-project:2.7from
aditi-1601:fix-ism-e2e-2.7

Conversation

@aditi-1601

Copy link
Copy Markdown

Description

Fixes index-management-e2e (test_e2e_ism) failures on OS 2.7

  • managed_indices_spec.js: replace unconditional toast dismiss calls with a
    conditional dismiss so the spec doesn't fail when no toast is present
  • commands.js: deleteAllIndices now uses failOnStatusCode: false for robustness
    during cleanup

Issues Resolved

[List any issues this PR will resolve]

Check List

  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

…tusCode

Signed-off-by: Aditi Chaudhry <aditiac@amazon.com>
@github-actions

Copy link
Copy Markdown

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

🧪 No relevant tests
🔒 No security concerns identified
✅ No TODO sections
🔀 No multiple PR themes
⚡ No major issues detected

@github-actions

Copy link
Copy Markdown

PR Code Suggestions ✨

Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Impact
General
Avoid silently ignoring all request errors

Setting failOnStatusCode: false unconditionally will silently swallow all errors,
including real failures (e.g., auth or connection issues), which can mask problems.
Consider narrowing this to acceptable status codes (like 404 when no indices exist)
by checking the response status explicitly, or restore failure on unexpected codes.

cypress/utils/commands.js [101-107]

 cy.request({
     method: 'DELETE',
     url: `${Cypress.env(
       'openSearchUrl'
     )}/index*,sample*,opensearch_dashboards*,test*,cypress*`,
     failOnStatusCode: false,
+  }).then((response) => {
+    if (response.status !== 200 && response.status !== 404) {
+      throw new Error(`Unexpected status deleting indices: ${response.status}`);
+    }
   });
Suggestion importance[1-10]: 5

__

Why: The suggestion raises a valid concern that failOnStatusCode: false can mask real errors, and narrowing acceptable status codes improves test reliability. However, the impact is moderate since this is test cleanup code.

Low

@ruanyl
ruanyl merged commit 67821d8 into opensearch-project:2.7 Jul 30, 2026
19 of 34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants