Skip to content

Commit e23f23c

Browse files
authored
Disable multi-tenancy in multi-data-source tests (#2479)
Signed-off-by: Craig Perkins <craig5008@gmail.com>
1 parent 73fca82 commit e23f23c

3 files changed

Lines changed: 7 additions & 13 deletions

File tree

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

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ jobs:
4242
config_version: 2
4343
config:
4444
dynamic:
45+
kibana:
46+
multitenancy_enabled: false
4547
http:
4648
anonymous_auth_enabled: false
4749
authc:
@@ -56,6 +58,7 @@ jobs:
5658
authentication_backend:
5759
type: intern
5860
EOT
61+
cp config_custom.yml config_custom_remote.yml
5962
6063
- name: Download security plugin and create setup scripts
6164
uses: ./.github/actions/download-plugin
@@ -72,7 +75,7 @@ jobs:
7275
plugins: "file:$(pwd)/opensearch-security.zip"
7376
security-enabled: true
7477
admin-password: ${{ env.OPENSEARCH_INITIAL_ADMIN_PASSWORD }}
75-
security_config_file: config_custom.yml
78+
security_config_file: config_custom_remote.yml
7679
port: 9202
7780
jdk-version: 21
7881
resource-sharing-enabled: true
@@ -94,8 +97,7 @@ jobs:
9497
opensearch.username: "kibanaserver"
9598
opensearch.password: "kibanaserver"
9699
opensearch.requestHeadersWhitelist: [ authorization,securitytenant ]
97-
opensearch_security.multitenancy.enabled: true
98-
opensearch_security.multitenancy.tenants.preferred: ["Private", "Global"]
100+
opensearch_security.multitenancy.enabled: false
99101
opensearch_security.readonly_mode.roles: ["kibana_read_only"]
100102
opensearch_security.cookie.secure: false
101103
data_source.enabled: true
@@ -106,6 +108,7 @@ jobs:
106108
- name: Run Cypress Tests
107109
uses: ./.github/actions/run-cypress-tests
108110
with:
111+
security_config_file: config_custom.yml
109112
dashboards_config_file: opensearch_dashboards_multidatasources.yml
110113
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"'
111114
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)