Skip to content

Commit

Permalink
[OSD] Sanitize copied share-link before validating (#1209) (#1213)
Browse files Browse the repository at this point in the history
Signed-off-by: Miki <[email protected]>
(cherry picked from commit 9b3878f)

Co-authored-by: Miki <[email protected]>
  • Loading branch information
opensearch-trigger-bot[bot] and AMoo-Miki authored Apr 11, 2024
1 parent 5a59a8b commit 593cf59
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,13 @@ describe('shared links', () => {
cy.getElementByTestId('shareTopNavButton').should('be.visible').click();
cy.getElementByTestId('copyShareUrlButton')
.invoke('attr', 'data-share-url')
.should('eq', url)
// Even though `CURRENT_TENANT.newTenant` is set to global, that could change and hence this test will remove
// either of the tenants it sees.
.should(
'satisfy',
(copied) =>
copied.replace(/\?security_tenant=(global|private)/, '') === url
)
.then((url) => {
cy.log(url);
cy.request(url).its('status').should('eq', 200);
Expand Down

0 comments on commit 593cf59

Please sign in to comment.