diff --git a/cypress/integration/core-opensearch-dashboards/opensearch-dashboards/apps/data_explorer/discover.spec.js b/cypress/integration/core-opensearch-dashboards/opensearch-dashboards/apps/data_explorer/discover.spec.js index 760ad48b3..c8fdb7b83 100644 --- a/cypress/integration/core-opensearch-dashboards/opensearch-dashboards/apps/data_explorer/discover.spec.js +++ b/cypress/integration/core-opensearch-dashboards/opensearch-dashboards/apps/data_explorer/discover.spec.js @@ -26,6 +26,17 @@ const indexSet = [ describe('discover app', { scrollBehavior: false }, () => { before(() => { + if (Cypress.env('SECURITY_ENABLED')) { + /** + * Security plugin is using private tenant as default. + * So here we'd need to set global tenant as default manually. + */ + cy.changeDefaultTenant({ + multitenancy_enabled: true, + private_tenant_enabled: true, + default_tenant: 'Global', + }); + } CURRENT_TENANT.newTenant = 'global'; // import logstash functional testFixtureHandler.importJSONDocIfNeeded(