Skip to content

Commit

Permalink
Merge branch '2.x' into backport/backport-987-to-2.x
Browse files Browse the repository at this point in the history
  • Loading branch information
Hailong-am authored Jan 26, 2024
2 parents 5e6eaba + b78dea3 commit b2758ca
Show file tree
Hide file tree
Showing 38 changed files with 358 additions and 329 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release-signoff-chrome.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
run: |
cd opensearch-dashboards-${{ env.VERSION }}
bin/opensearch-dashboards serve &
timeout 300 bash -c 'while [[ "$(curl -s localhost:5601/api/status | jq -r '.status.overall.state')" != "green" ]]; do sleep 5; done'
timeout 300 bash -c 'while [[ "$(curl -s -u admin:${{ env.OPENSEARCH_INITIAL_ADMIN_PASSWORD }} localhost:5601/api/status | jq -r '.status.overall.state')" != "green" ]]; do sleep 5; done'
- name: Get Cypress version
id: cypress_version
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-signoff-chromium-ad-only.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
run: |
cd opensearch-dashboards-${{ env.VERSION }}
bin/opensearch-dashboards serve &
timeout 300 bash -c 'while [[ "$(curl -s localhost:5601/api/status | jq -r '.status.overall.state')" != "green" ]]; do sleep 5; done'
timeout 300 bash -c 'while [[ "$(curl -s -u admin:${{ env.OPENSEARCH_INITIAL_ADMIN_PASSWORD }} localhost:5601/api/status | jq -r '.status.overall.state')" != "green" ]]; do sleep 5; done'
- name: Get Cypress version
id: cypress_version
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-signoff-chromium-ism-only.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
run: |
cd opensearch-dashboards-${{ env.VERSION }}
bin/opensearch-dashboards serve &
timeout 300 bash -c 'while [[ "$(curl -s localhost:5601/api/status | jq -r '.status.overall.state')" != "green" ]]; do sleep 5; done'
timeout 300 bash -c 'while [[ "$(curl -s -u admin:${{ env.OPENSEARCH_INITIAL_ADMIN_PASSWORD }} localhost:5601/api/status | jq -r '.status.overall.state')" != "green" ]]; do sleep 5; done'
- name: Get Cypress version
id: cypress_version
run: |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
run: |
cd opensearch-dashboards-${{ env.VERSION }}
bin/opensearch-dashboards serve &
timeout 300 bash -c 'while [[ "$(curl -s localhost:5601/api/status | jq -r '.status.overall.state')" != "green" ]]; do sleep 5; done'
timeout 300 bash -c 'while [[ "$(curl -s -u admin:${{ env.OPENSEARCH_INITIAL_ADMIN_PASSWORD }} localhost:5601/api/status | jq -r '.status.overall.state')" != "green" ]]; do sleep 5; done'
- name: Get Cypress version
id: cypress_version
run: |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
run: |
cd opensearch-dashboards-${{ env.VERSION }}
bin/opensearch-dashboards serve &
timeout 300 bash -c 'while [[ "$(curl -s localhost:5601/api/status | jq -r '.status.overall.state')" != "green" ]]; do sleep 5; done'
timeout 300 bash -c 'while [[ "$(curl -s -u admin:${{ env.OPENSEARCH_INITIAL_ADMIN_PASSWORD }} localhost:5601/api/status | jq -r '.status.overall.state')" != "green" ]]; do sleep 5; done'
- name: Get Cypress version
id: cypress_version
run: |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
run: |
cd opensearch-dashboards-${{ env.VERSION }}
bin/opensearch-dashboards serve &
timeout 300 bash -c 'while [[ "$(curl -s localhost:5601/api/status | jq -r '.status.overall.state')" != "green" ]]; do sleep 5; done'
timeout 300 bash -c 'while [[ "$(curl -s -u admin:${{ env.OPENSEARCH_INITIAL_ADMIN_PASSWORD }} localhost:5601/api/status | jq -r '.status.overall.state')" != "green" ]]; do sleep 5; done'
- name: Get Cypress version
id: cypress_version
run: |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
run: |
cd opensearch-dashboards-${{ env.VERSION }}
bin/opensearch-dashboards serve &
timeout 300 bash -c 'while [[ "$(curl -s localhost:5601/api/status | jq -r '.status.overall.state')" != "green" ]]; do sleep 5; done'
timeout 300 bash -c 'while [[ "$(curl -s -u admin:${{ env.OPENSEARCH_INITIAL_ADMIN_PASSWORD }} localhost:5601/api/status | jq -r '.status.overall.state')" != "green" ]]; do sleep 5; done'
- name: Get Cypress version
id: cypress_version
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-signoff-chromium.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
run: |
cd opensearch-dashboards-${{ env.VERSION }}
bin/opensearch-dashboards serve &
timeout 300 bash -c 'while [[ "$(curl -s localhost:5601/api/status | jq -r '.status.overall.state')" != "green" ]]; do sleep 5; done'
timeout 300 bash -c 'while [[ "$(curl -s -u admin:${{ env.OPENSEARCH_INITIAL_ADMIN_PASSWORD }} localhost:5601/api/status | jq -r '.status.overall.state')" != "green" ]]; do sleep 5; done'
- name: Get Cypress version
id: cypress_version
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-signoff-electron.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
run: |
cd opensearch-dashboards-${{ env.VERSION }}
bin/opensearch-dashboards serve &
timeout 300 bash -c 'while [[ "$(curl -s localhost:5601/api/status | jq -r '.status.overall.state')" != "green" ]]; do sleep 5; done'
timeout 300 bash -c 'while [[ "$(curl -s -u admin:${{ env.OPENSEARCH_INITIAL_ADMIN_PASSWORD }} localhost:5601/api/status | jq -r '.status.overall.state')" != "green" ]]; do sleep 5; done'
- name: Get Cypress version
id: cypress_version
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-signoff-firefox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
run: |
cd opensearch-dashboards-${{ env.VERSION }}
bin/opensearch-dashboards serve &
timeout 300 bash -c 'while [[ "$(curl -s localhost:5601/api/status | jq -r '.status.overall.state')" != "green" ]]; do sleep 5; done'
timeout 300 bash -c 'while [[ "$(curl -s -u admin:${{ env.OPENSEARCH_INITIAL_ADMIN_PASSWORD }} localhost:5601/api/status | jq -r '.status.overall.state')" != "green" ]]; do sleep 5; done'
- name: Get Cypress version
id: cypress_version
run: |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,13 @@
* SPDX-License-Identifier: Apache-2.0
*/

import { CURRENT_TENANT } from '../../../../../utils/commands';

/// <reference types="cypress" />

describe('Before', () => {
before(() => {
CURRENT_TENANT.newTenant = 'global';
cy.deleteAllIndices();
cy.deleteSavedObjectByType('index-pattern');
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import {
TestFixtureHandler,
MiscUtils,
} from '@opensearch-dashboards-test/opensearch-dashboards-test-library';
import { CURRENT_TENANT } from '../../../../../utils/commands';

const testFixtureHandler = new TestFixtureHandler(
cy,
Cypress.env('openSearchUrl')
Expand All @@ -18,6 +20,7 @@ describe('date_nanos', () => {
const fromTime = 'Sep 21, 2019 @ 20:31:44.000';
const toTime = 'Sep 23, 2019 @ 03:31:44.000';
before(() => {
CURRENT_TENANT.newTenant = 'global';
// import date nanos
testFixtureHandler.importJSONMapping(
'cypress/fixtures/dashboard/opensearch_dashboards/data_explorer/date_nanos/mappings.json.txt'
Expand All @@ -29,7 +32,6 @@ describe('date_nanos', () => {
cy.setAdvancedSetting({
defaultIndex: 'date-nanos',
});

miscUtils.visitPage('app/data-explorer/discover#/');
cy.waitForLoader();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
TestFixtureHandler,
MiscUtils,
} from '@opensearch-dashboards-test/opensearch-dashboards-test-library';
import { CURRENT_TENANT } from '../../../../../utils/commands';

const miscUtils = new MiscUtils(cy);
const testFixtureHandler = new TestFixtureHandler(
Expand All @@ -16,6 +17,7 @@ const testFixtureHandler = new TestFixtureHandler(

describe('date_nanos_mixed', () => {
before(() => {
CURRENT_TENANT.newTenant = 'global';
//import date nanos
testFixtureHandler.importJSONMapping(
'cypress/fixtures/dashboard/opensearch_dashboards/data_explorer/date_nanos_mix/mappings.json.txt'
Expand All @@ -27,7 +29,6 @@ describe('date_nanos_mixed', () => {
cy.setAdvancedSetting({
defaultIndex: 'timestamp-*',
});

miscUtils.visitPage('app/data-explorer/discover#/');
cy.waitForLoader();

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

const miscUtils = new MiscUtils(cy);
const testFixtureHandler = new TestFixtureHandler(
Expand All @@ -25,6 +26,7 @@ const indexSet = [

describe('discover app', { scrollBehavior: false }, () => {
before(() => {
CURRENT_TENANT.newTenant = 'global';
// import logstash functional
testFixtureHandler.importJSONDocIfNeeded(
indexSet,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
TestFixtureHandler,
MiscUtils,
} from '@opensearch-dashboards-test/opensearch-dashboards-test-library';
import { CURRENT_TENANT } from '../../../../../utils/commands';

const miscUtils = new MiscUtils(cy);
const testFixtureHandler = new TestFixtureHandler(
Expand All @@ -21,6 +22,7 @@ const indexSet = [

describe('discover histogram', { scrollBehavior: false }, () => {
before(() => {
CURRENT_TENANT.newTenant = 'global';
cy.log('load opensearch-dashboards index with default index pattern');

// import long window logstash index pattern
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
MiscUtils,
TestFixtureHandler,
} from '@opensearch-dashboards-test/opensearch-dashboards-test-library';
import { CURRENT_TENANT } from '../../../../../utils/commands';

const miscUtils = new MiscUtils(cy);
const testFixtureHandler = new TestFixtureHandler(
Expand All @@ -21,6 +22,7 @@ const indexSet = [

describe('doc link in discover', () => {
beforeEach(() => {
CURRENT_TENANT.newTenant = 'global';
// import logstash functional
testFixtureHandler.importJSONDocIfNeeded(
indexSet,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
MiscUtils,
TestFixtureHandler,
} from '@opensearch-dashboards-test/opensearch-dashboards-test-library';
import { CURRENT_TENANT } from '../../../../../utils/commands';

const miscUtils = new MiscUtils(cy);
const testFixtureHandler = new TestFixtureHandler(
Expand All @@ -21,6 +22,7 @@ const indexSet = [

describe('discover doc table', () => {
before(() => {
CURRENT_TENANT.newTenant = 'global';
// import logstash functional
testFixtureHandler.importJSONDocIfNeeded(
indexSet,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {
DE_DEFAULT_END_TIME,
DE_DEFAULT_START_TIME,
} from '../../../../../utils/constants';
import { CURRENT_TENANT } from '../../../../../utils/commands';

const miscUtils = new MiscUtils(cy);
const testFixtureHandler = new TestFixtureHandler(
Expand All @@ -20,6 +21,7 @@ const testFixtureHandler = new TestFixtureHandler(

describe('errors', () => {
before(() => {
CURRENT_TENANT.newTenant = 'global';
// import invalid_scripted_field
testFixtureHandler.importJSONMapping(
'cypress/fixtures/dashboard/opensearch_dashboards/data_explorer/invalid_scripted_field/mappings.json.txt'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
TestFixtureHandler,
MiscUtils,
} from '@opensearch-dashboards-test/opensearch-dashboards-test-library';
import { CURRENT_TENANT } from '../../../../../utils/commands';

const miscUtils = new MiscUtils(cy);
const testFixtureHandler = new TestFixtureHandler(
Expand All @@ -21,6 +22,7 @@ const indexSet = [

describe('discover tab', () => {
before(() => {
CURRENT_TENANT.newTenant = 'global';
// import logstash functional
testFixtureHandler.importJSONDocIfNeeded(
indexSet,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
MiscUtils,
TestFixtureHandler,
} from '@opensearch-dashboards-test/opensearch-dashboards-test-library';
import { CURRENT_TENANT } from '../../../../../utils/commands';

const miscUtils = new MiscUtils(cy);
const testFixtureHandler = new TestFixtureHandler(
Expand All @@ -21,6 +22,7 @@ const indexSet = [

describe('discover field visualize button', () => {
before(() => {
CURRENT_TENANT.newTenant = 'global';
testFixtureHandler.importJSONMapping(
'cypress/fixtures/dashboard/opensearch_dashboards/data_explorer/discover/discover.mappings.json.txt'
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
MiscUtils,
TestFixtureHandler,
} from '@opensearch-dashboards-test/opensearch-dashboards-test-library';
import { CURRENT_TENANT } from '../../../../../utils/commands';

const miscUtils = new MiscUtils(cy);
const testFixtureHandler = new TestFixtureHandler(
Expand All @@ -21,6 +22,7 @@ const indexSet = [

describe('discover filter editor', () => {
before(() => {
CURRENT_TENANT.newTenant = 'global';
testFixtureHandler.importJSONMapping(
'cypress/fixtures/dashboard/opensearch_dashboards/data_explorer/discover/discover.mappings.json.txt'
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {
DE_DEFAULT_END_TIME,
DE_DEFAULT_START_TIME,
} from '../../../../../utils/constants';
import { CURRENT_TENANT } from '../../../../../utils/commands';

const miscUtils = new MiscUtils(cy);
const testFixtureHandler = new TestFixtureHandler(
Expand All @@ -20,6 +21,7 @@ const testFixtureHandler = new TestFixtureHandler(

describe('index pattern with encoded id', () => {
before(() => {
CURRENT_TENANT.newTenant = 'global';
testFixtureHandler.importJSONMapping(
'cypress/fixtures/dashboard/opensearch_dashboards/data_explorer/index_pattern_with_encoded_id/mappings.json.txt'
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
TestFixtureHandler,
MiscUtils,
} from '@opensearch-dashboards-test/opensearch-dashboards-test-library';
import { CURRENT_TENANT } from '../../../../../utils/commands';

const miscUtils = new MiscUtils(cy);
const testFixtureHandler = new TestFixtureHandler(
Expand All @@ -16,6 +17,7 @@ const testFixtureHandler = new TestFixtureHandler(

describe('index pattern without field spec', () => {
before(() => {
CURRENT_TENANT.newTenant = 'global';
testFixtureHandler.importJSONMapping(
'cypress/fixtures/dashboard/opensearch_dashboards/data_explorer/index_pattern_without_timefield/mappings.json.txt'
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {
DE_DEFAULT_END_TIME,
DE_DEFAULT_START_TIME,
} from '../../../../../utils/constants';
import { CURRENT_TENANT } from '../../../../../utils/commands';

const miscUtils = new MiscUtils(cy);
const testFixtureHandler = new TestFixtureHandler(
Expand All @@ -25,6 +26,7 @@ const indexSet = [

describe('inspector', () => {
before(() => {
CURRENT_TENANT.newTenant = 'global';
// import logstash functional
testFixtureHandler.importJSONDocIfNeeded(
indexSet,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
TestFixtureHandler,
MiscUtils,
} from '@opensearch-dashboards-test/opensearch-dashboards-test-library';
import { CURRENT_TENANT } from '../../../../../utils/commands';

const miscUtils = new MiscUtils(cy);
const testFixtureHandler = new TestFixtureHandler(
Expand All @@ -16,6 +17,7 @@ const testFixtureHandler = new TestFixtureHandler(

describe('test large strings', () => {
before(() => {
CURRENT_TENANT.newTenant = 'global';
testFixtureHandler.importJSONMapping(
'cypress/fixtures/dashboard/opensearch_dashboards/data_explorer/empty_opensearch_dashboards/mappings.json.txt'
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {
DE_DEFAULT_END_TIME,
DE_DEFAULT_START_TIME,
} from '../../../../../utils/constants';
import { CURRENT_TENANT } from '../../../../../utils/commands';

const miscUtils = new MiscUtils(cy);
const testFixtureHandler = new TestFixtureHandler(
Expand All @@ -27,6 +28,7 @@ describe('saved queries saved objects', () => {
const fromTime = 'Sep 20, 2015 @ 08:00:00.000';
const toTime = 'Sep 21, 2015 @ 08:00:00.000';
before(() => {
CURRENT_TENANT.newTenant = 'global';
testFixtureHandler.importJSONMapping(
'cypress/fixtures/dashboard/opensearch_dashboards/data_explorer/discover/discover.mappings.json.txt'
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {
DE_DEFAULT_END_TIME,
DE_DEFAULT_START_TIME,
} from '../../../../../utils/constants';
import { CURRENT_TENANT } from '../../../../../utils/commands';

const miscUtils = new MiscUtils(cy);
const testFixtureHandler = new TestFixtureHandler(
Expand All @@ -25,6 +26,7 @@ const indexSet = [

describe('shared links', () => {
before(() => {
CURRENT_TENANT.newTenant = 'global';
testFixtureHandler.importJSONMapping(
'cypress/fixtures/dashboard/opensearch_dashboards/data_explorer/discover/discover.mappings.json.txt'
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
MiscUtils,
TestFixtureHandler,
} from '@opensearch-dashboards-test/opensearch-dashboards-test-library';
import { CURRENT_TENANT } from '../../../../../utils/commands';

const miscUtils = new MiscUtils(cy);
const testFixtureHandler = new TestFixtureHandler(
Expand All @@ -21,6 +22,7 @@ const indexSet = [

describe('discover sidebar', () => {
before(() => {
CURRENT_TENANT.newTenant = 'global';
testFixtureHandler.importJSONMapping(
'cypress/fixtures/dashboard/opensearch_dashboards/data_explorer/discover/discover.mappings.json.txt'
);
Expand Down
Loading

0 comments on commit b2758ca

Please sign in to comment.