Skip to content

Commit b6c1d8e

Browse files
committed
Disable multi-tenancy in multi-data-source tests
Signed-off-by: Craig Perkins <craig5008@gmail.com>
1 parent 0fda68d commit b6c1d8e

3 files changed

Lines changed: 4 additions & 12 deletions

File tree

.github/workflows/cypress-test-multidatasources-enabled-e2e.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ jobs:
4242
config_version: 2
4343
config:
4444
dynamic:
45+
multitenancy_enabled: false
4546
http:
4647
anonymous_auth_enabled: false
4748
authc:
@@ -94,8 +95,7 @@ jobs:
9495
opensearch.username: "kibanaserver"
9596
opensearch.password: "kibanaserver"
9697
opensearch.requestHeadersWhitelist: [ authorization,securitytenant ]
97-
opensearch_security.multitenancy.enabled: true
98-
opensearch_security.multitenancy.tenants.preferred: ["Private", "Global"]
98+
opensearch_security.multitenancy.enabled: false
9999
opensearch_security.readonly_mode.roles: ["kibana_read_only"]
100100
opensearch_security.cookie.secure: false
101101
data_source.enabled: true
@@ -106,6 +106,7 @@ jobs:
106106
- name: Run Cypress Tests
107107
uses: ./.github/actions/run-cypress-tests
108108
with:
109+
security_config_file: config_custom.yml
109110
dashboards_config_file: opensearch_dashboards_multidatasources.yml
110111
yarn_command: 'CYPRESS_VERIFY_TIMEOUT=60000 yarn cypress:run --browser chrome --headless --env LOGIN_AS_ADMIN=true --spec "test/cypress/e2e/multi-datasources/multi_datasources_enabled.spec.js"'
111112
resource_sharing_enabled: "true"

test/cypress/e2e/multi-datasources/multi_datasources_enabled.spec.js

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ let localDataSourceUrl;
7171

7272
describe('Multi-datasources enabled', () => {
7373
beforeEach(() => {
74-
localStorage.setItem('opendistro::security::tenant::saved', '""');
7574
localStorage.setItem('home:newThemeModal:show', 'false');
7675
createDataSource().then((resp) => {
7776
if (resp && resp.body) {
@@ -156,14 +155,6 @@ describe('Multi-datasources enabled', () => {
156155
});
157156
});
158157

159-
it('Checks Tenancy Tab', () => {
160-
// Datasource is locked to local cluster for tenancy tab
161-
cy.visit(`http://localhost:5601/app/security-dashboards-plugin${localDataSourceUrl}#/tenants`);
162-
163-
cy.contains('h1', 'Dashboards multi-tenancy');
164-
cy.get('[data-test-subj="dataSourceViewButton"]').should('contain', 'Local cluster');
165-
});
166-
167158
it('Checks Audit Logs Tab', () => {
168159
cy.request({
169160
method: 'POST',

test/jest_integration/security_entity_api.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,7 @@ describe('start OpenSearch Dashboards server multi datasources enabled', () => {
463463
password: OPENSEARCH_DASHBOARDS_SERVER_PASSWORD,
464464
},
465465
opensearch_security: {
466-
multitenancy: { enabled: true, tenants: { preferred: ['Private', 'Global'] } },
466+
multitenancy: { enabled: false },
467467
},
468468
},
469469
{

0 commit comments

Comments
 (0)