Skip to content

Commit 9fd86d7

Browse files
ananzhgithub-actions[bot]
authored andcommitted
Use global tenant in vis_type_table and other tests (#1210)
Flaky tests due to loading time due to switch tenant. Currently set default tenant to global. * remove tenant fix for MD Partially resolves: opensearch-project/opensearch-build#4433 Signed-off-by: Anan <ananzh@amazon.com> Co-authored-by: Hailong Cui <ihailong@amazon.com> (cherry picked from commit 7b82031)
1 parent 593cf59 commit 9fd86d7

File tree

5 files changed

+12
-1
lines changed

5 files changed

+12
-1
lines changed

cypress/integration/common/dashboard_sample_data_spec.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import {
77
CommonUI,
88
MiscUtils,
99
} from '@opensearch-dashboards-test/opensearch-dashboards-test-library';
10+
import { CURRENT_TENANT } from '../../utils/commands';
1011

1112
/**
1213
* dashboard_sample_data test suite description:
@@ -22,7 +23,9 @@ export function dashboardSanityTests() {
2223
const path = baseURL.pathname.replace(/\/$/, '');
2324

2425
describe('dashboard sample data validation', () => {
25-
before(() => {});
26+
before(() => {
27+
CURRENT_TENANT.newTenant = 'global';
28+
});
2629

2730
after(() => {});
2831

cypress/integration/core-opensearch-dashboards/opensearch-dashboards/apps/vis_type_table/basic.spec.js

+2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import {
1313
TABLE_VIS_APP_PATH,
1414
TABLE_VIS_TYPE,
1515
} from '../../../../../utils/constants';
16+
import { CURRENT_TENANT } from '../../../../../utils/commands';
1617

1718
/**
1819
* Basic test suite description:
@@ -25,6 +26,7 @@ import {
2526

2627
describe('table visualization basic functions', () => {
2728
before(() => {
29+
CURRENT_TENANT.newTenant = 'global';
2830
cy.deleteIndex(TABLE_INDEX_ID);
2931
cy.deleteIndexPattern(TABLE_INDEX_PATTERN);
3032
cy.bulkUploadDocs(TABLE_PATH_INDEX_DATA);

cypress/integration/core-opensearch-dashboards/opensearch-dashboards/apps/vis_type_table/data.spec.js

+2
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import {
1616
TABLE_INDEX_END_TIME,
1717
toTestId,
1818
} from '../../../../../utils/constants';
19+
import { CURRENT_TENANT } from '../../../../../utils/commands';
1920

2021
const commonUI = new CommonUI(cy);
2122

@@ -24,6 +25,7 @@ const commonUI = new CommonUI(cy);
2425

2526
describe('table visualization data', () => {
2627
before(() => {
28+
CURRENT_TENANT.newTenant = 'global';
2729
cy.deleteIndex(TABLE_INDEX_ID);
2830
cy.deleteIndexPattern(TABLE_INDEX_PATTERN);
2931
cy.bulkUploadDocs(TABLE_PATH_INDEX_DATA);

cypress/integration/core-opensearch-dashboards/opensearch-dashboards/apps/vis_type_table/embed.spec.js

+2
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import {
1616
TABLE_INDEX_END_TIME,
1717
toTestId,
1818
} from '../../../../../utils/constants';
19+
import { CURRENT_TENANT } from '../../../../../utils/commands';
1920

2021
const commonUI = new CommonUI(cy);
2122

@@ -49,6 +50,7 @@ describe('table visualization in embedded mode', () => {
4950
];
5051

5152
before(() => {
53+
CURRENT_TENANT.newTenant = 'global';
5254
cy.deleteIndex(TABLE_INDEX_ID);
5355
cy.deleteIndexPattern(TABLE_INDEX_PATTERN);
5456
cy.bulkUploadDocs(TABLE_PATH_INDEX_DATA);

cypress/integration/core-opensearch-dashboards/opensearch-dashboards/apps/vis_type_table/options.spec.js

+2
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,11 @@ import {
1515
TABLE_INDEX_END_TIME,
1616
toTestId,
1717
} from '../../../../../utils/constants';
18+
import { CURRENT_TENANT } from '../../../../../utils/commands';
1819

1920
describe('Table visualization options', () => {
2021
before(() => {
22+
CURRENT_TENANT.newTenant = 'global';
2123
cy.deleteIndex(TABLE_INDEX_ID);
2224
cy.deleteIndexPattern(TABLE_INDEX_PATTERN);
2325
cy.bulkUploadDocs(TABLE_PATH_INDEX_DATA);

0 commit comments

Comments
 (0)