Skip to content

Commit

Permalink
Use global tenant in vis_type_table and other tests (#1210)
Browse files Browse the repository at this point in the history
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 <[email protected]>
Co-authored-by: Hailong Cui <[email protected]>
  • Loading branch information
ananzh and Hailong-am authored Apr 15, 2024
1 parent 9b3878f commit 7b82031
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cypress/integration/common/dashboard_sample_data_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
CommonUI,
MiscUtils,
} from '@opensearch-dashboards-test/opensearch-dashboards-test-library';
import { CURRENT_TENANT } from '../../utils/commands';

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

describe('dashboard sample data validation', () => {
before(() => {});
before(() => {
CURRENT_TENANT.newTenant = 'global';
});

after(() => {});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import {
TABLE_VIS_APP_PATH,
TABLE_VIS_TYPE,
} from '../../../../../utils/constants';
import { CURRENT_TENANT } from '../../../../../utils/commands';

/**
* Basic test suite description:
Expand All @@ -25,6 +26,7 @@ import {

describe('table visualization basic functions', () => {
before(() => {
CURRENT_TENANT.newTenant = 'global';
cy.deleteIndex(TABLE_INDEX_ID);
cy.deleteIndexPattern(TABLE_INDEX_PATTERN);
cy.bulkUploadDocs(TABLE_PATH_INDEX_DATA);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import {
TABLE_INDEX_END_TIME,
toTestId,
} from '../../../../../utils/constants';
import { CURRENT_TENANT } from '../../../../../utils/commands';

const commonUI = new CommonUI(cy);

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

describe('table visualization data', () => {
before(() => {
CURRENT_TENANT.newTenant = 'global';
cy.deleteIndex(TABLE_INDEX_ID);
cy.deleteIndexPattern(TABLE_INDEX_PATTERN);
cy.bulkUploadDocs(TABLE_PATH_INDEX_DATA);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import {
TABLE_INDEX_END_TIME,
toTestId,
} from '../../../../../utils/constants';
import { CURRENT_TENANT } from '../../../../../utils/commands';

const commonUI = new CommonUI(cy);

Expand Down Expand Up @@ -56,6 +57,7 @@ describe('table visualization in embedded mode', () => {
};

before(() => {
CURRENT_TENANT.newTenant = 'global';
cy.deleteIndex(TABLE_INDEX_ID);
cy.deleteIndexPattern(TABLE_INDEX_PATTERN);
cy.bulkUploadDocs(TABLE_PATH_INDEX_DATA);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,11 @@ import {
TABLE_INDEX_END_TIME,
toTestId,
} from '../../../../../utils/constants';
import { CURRENT_TENANT } from '../../../../../utils/commands';

describe('Table visualization options', () => {
before(() => {
CURRENT_TENANT.newTenant = 'global';
cy.deleteIndex(TABLE_INDEX_ID);
cy.deleteIndexPattern(TABLE_INDEX_PATTERN);
cy.bulkUploadDocs(TABLE_PATH_INDEX_DATA);
Expand Down

0 comments on commit 7b82031

Please sign in to comment.