Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Tests] ciGroup2 functional test fixes #291

Merged
merged 1 commit into from
Apr 15, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ describe('resolveSavedObjects', () => {
type: 'search',
get: async () => {
return {
applyESResp: async () => {},
applyOpenSearchResp: async () => {},
save: async () => {
throw new SavedObjectNotFound({
savedObjectType: 'index-pattern',
Expand All @@ -113,7 +113,7 @@ describe('resolveSavedObjects', () => {
type: 'dashboard',
get: async () => {
return {
applyESResp: async () => {},
applyOpenSearchResp: async () => {},
save: async () => {
throw new SavedObjectNotFound({
savedObjectType: 'index-pattern',
Expand All @@ -126,7 +126,7 @@ describe('resolveSavedObjects', () => {
type: 'visualization',
get: async () => {
return {
applyESResp: async () => {},
applyOpenSearchResp: async () => {},
save: async () => {
throw new SavedObjectNotFound({
savedObjectType: 'index-pattern',
Expand Down Expand Up @@ -192,7 +192,7 @@ describe('resolveSavedObjects', () => {
type: 'search',
get: async () => {
return {
applyESResp: async () => {},
applyOpenSearchResp: async () => {},
save: async () => {
throw new SavedObjectNotFound({
savedObjectType: 'search',
Expand All @@ -205,7 +205,7 @@ describe('resolveSavedObjects', () => {
type: 'dashboard',
get: async () => {
return {
applyESResp: async () => {},
applyOpenSearchResp: async () => {},
save: async () => {
throw new SavedObjectNotFound({
savedObjectType: 'index-pattern',
Expand All @@ -219,7 +219,7 @@ describe('resolveSavedObjects', () => {
get: async () => {
return {
savedSearchId: '1',
applyESResp: async () => {},
applyOpenSearchResp: async () => {},
save: async () => {
throw new SavedObjectNotFound({
savedObjectType: 'index-pattern',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ async function importIndexPattern(
}

async function importDocument(obj: SavedObject, doc: SavedObjectsRawDoc, overwriteAll: boolean) {
await obj.applyESResp({
await obj.applyOpenSearchResp({
references: doc._references || [],
...cloneDeep(doc),
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export default function ({ getService, getPageObjects }) {

describe('create and add embeddables', () => {
before(async () => {
await opensearchArchiver.load('dashboard/current/opensearch-dashboards');
await opensearchArchiver.load('dashboard/current/opensearch_dashboards');
await opensearchDashboardsServer.uiSettings.replace({
defaultIndex: '0bf35f60-3dc9-11e8-8660-4d65aa086b3c',
});
Expand Down
2 changes: 1 addition & 1 deletion test/functional/apps/dashboard/dashboard_back_button.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {

describe('dashboard back button', () => {
before(async () => {
await opensearchArchiver.loadIfNeeded('dashboard/current/opensearch-dashboards');
await opensearchArchiver.loadIfNeeded('dashboard/current/opensearch_dashboards');
await opensearchDashboardsServer.uiSettings.replace({
defaultIndex: '0bf35f60-3dc9-11e8-8660-4d65aa086b3c',
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
*/
describe('dashboard error handling', () => {
before(async () => {
await opensearchArchiver.loadIfNeeded('dashboard/current/opensearch-dashboards');
await opensearchArchiver.loadIfNeeded('dashboard/current/opensearch_dashboards');
await PageObjects.common.navigateToApp('dashboard');
});

Expand Down
2 changes: 1 addition & 1 deletion test/functional/apps/dashboard/dashboard_filter_bar.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export default function ({ getService, getPageObjects }) {

describe('dashboard filter bar', () => {
before(async () => {
await opensearchArchiver.load('dashboard/current/opensearch-dashboards');
await opensearchArchiver.load('dashboard/current/opensearch_dashboards');
await opensearchDashboardsServer.uiSettings.replace({
defaultIndex: '0bf35f60-3dc9-11e8-8660-4d65aa086b3c',
});
Expand Down
2 changes: 1 addition & 1 deletion test/functional/apps/dashboard/dashboard_filtering.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export default function ({ getService, getPageObjects }) {
this.tags('includeFirefox');

before(async () => {
await opensearchArchiver.load('dashboard/current/opensearch-dashboards');
await opensearchArchiver.load('dashboard/current/opensearch_dashboards');
await security.testUser.setRoles([
'opensearch_dashboards_admin',
'test_logstash_reader',
Expand Down
2 changes: 1 addition & 1 deletion test/functional/apps/dashboard/dashboard_grid.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export default function ({ getService, getPageObjects }) {

describe('dashboard grid', function () {
before(async () => {
await opensearchArchiver.load('dashboard/current/opensearch-dashboards');
await opensearchArchiver.load('dashboard/current/opensearch_dashboards');
await opensearchDashboardsServer.uiSettings.replace({
defaultIndex: '0bf35f60-3dc9-11e8-8660-4d65aa086b3c',
});
Expand Down
2 changes: 1 addition & 1 deletion test/functional/apps/dashboard/dashboard_options.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export default function ({ getService, getPageObjects }) {
let originalTitles = [];

before(async () => {
await opensearchArchiver.load('dashboard/current/opensearch-dashboards');
await opensearchArchiver.load('dashboard/current/opensearch_dashboards');
await opensearchDashboardsServer.uiSettings.replace({
defaultIndex: '0bf35f60-3dc9-11e8-8660-4d65aa086b3c',
});
Expand Down
2 changes: 1 addition & 1 deletion test/functional/apps/dashboard/dashboard_query_bar.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export default function ({ getService, getPageObjects }) {

describe('dashboard query bar', () => {
before(async () => {
await opensearchArchiver.load('dashboard/current/opensearch-dashboards');
await opensearchArchiver.load('dashboard/current/opensearch_dashboards');
await opensearchDashboardsServer.uiSettings.replace({
defaultIndex: '0bf35f60-3dc9-11e8-8660-4d65aa086b3c',
});
Expand Down
2 changes: 1 addition & 1 deletion test/functional/apps/dashboard/dashboard_saved_query.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export default function ({ getService, getPageObjects }) {

describe('dashboard saved queries', function describeIndexTests() {
before(async function () {
await opensearchArchiver.load('dashboard/current/opensearch-dashboards');
await opensearchArchiver.load('dashboard/current/opensearch_dashboards');
await opensearchDashboardsServer.uiSettings.replace({
defaultIndex: '0bf35f60-3dc9-11e8-8660-4d65aa086b3c',
});
Expand Down
2 changes: 1 addition & 1 deletion test/functional/apps/dashboard/dashboard_snapshots.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export default function ({ getService, getPageObjects, updateBaselines }) {

describe('dashboard snapshots', function describeIndexTests() {
before(async function () {
await opensearchArchiver.load('dashboard/current/opensearch-dashboards');
await opensearchArchiver.load('dashboard/current/opensearch_dashboards');
await opensearchDashboardsServer.uiSettings.replace({
defaultIndex: '0bf35f60-3dc9-11e8-8660-4d65aa086b3c',
});
Expand Down
2 changes: 1 addition & 1 deletion test/functional/apps/dashboard/data_shared_attributes.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export default function ({ getService, getPageObjects }) {
let originalPanelTitles;

before(async () => {
await opensearchArchiver.load('dashboard/current/opensearch-dashboards');
await opensearchArchiver.load('dashboard/current/opensearch_dashboards');
await opensearchDashboardsServer.uiSettings.replace({
defaultIndex: '0bf35f60-3dc9-11e8-8660-4d65aa086b3c',
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export default function ({ getService, getPageObjects }) {

describe('edit embeddable redirects', () => {
before(async () => {
await opensearchArchiver.load('dashboard/current/opensearch-dashboards');
await opensearchArchiver.load('dashboard/current/opensearch_dashboards');
await opensearchDashboardsServer.uiSettings.replace({
defaultIndex: '0bf35f60-3dc9-11e8-8660-4d65aa086b3c',
});
Expand Down
2 changes: 1 addition & 1 deletion test/functional/apps/dashboard/edit_visualizations.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export default function ({ getService, getPageObjects }) {

describe('edit visualizations from dashboard', () => {
before(async () => {
await opensearchArchiver.load('dashboard/current/opensearch-dashboards');
await opensearchArchiver.load('dashboard/current/opensearch_dashboards');
await opensearchDashboardsServer.uiSettings.replace({
defaultIndex: '0bf35f60-3dc9-11e8-8660-4d65aa086b3c',
});
Expand Down
2 changes: 1 addition & 1 deletion test/functional/apps/dashboard/embed_mode.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export default function ({ getService, getPageObjects }) {
];

before(async () => {
await opensearchArchiver.load('dashboard/current/opensearch-dashboards');
await opensearchArchiver.load('dashboard/current/opensearch_dashboards');
await opensearchDashboardsServer.uiSettings.replace({
defaultIndex: '0bf35f60-3dc9-11e8-8660-4d65aa086b3c',
});
Expand Down
2 changes: 1 addition & 1 deletion test/functional/apps/dashboard/embeddable_rendering.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ export default function ({ getService, getPageObjects }) {
'animals',
'test_logstash_reader',
]);
await opensearchArchiver.load('dashboard/current/opensearch-dashboards');
await opensearchArchiver.load('dashboard/current/opensearch_dashboards');
await opensearchDashboardsServer.uiSettings.replace({
defaultIndex: '0bf35f60-3dc9-11e8-8660-4d65aa086b3c',
});
Expand Down
2 changes: 1 addition & 1 deletion test/functional/apps/dashboard/empty_dashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export default function ({ getService, getPageObjects }) {

describe('empty dashboard', () => {
before(async () => {
await opensearchArchiver.load('dashboard/current/opensearch-dashboards');
await opensearchArchiver.load('dashboard/current/opensearch_dashboards');
await opensearchDashboardsServer.uiSettings.replace({
defaultIndex: '0bf35f60-3dc9-11e8-8660-4d65aa086b3c',
});
Expand Down
2 changes: 1 addition & 1 deletion test/functional/apps/dashboard/full_screen_mode.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export default function ({ getService, getPageObjects }) {

describe('full screen mode', () => {
before(async () => {
await opensearchArchiver.load('dashboard/current/opensearch-dashboards');
await opensearchArchiver.load('dashboard/current/opensearch_dashboards');
await opensearchDashboardsServer.uiSettings.replace({
defaultIndex: '0bf35f60-3dc9-11e8-8660-4d65aa086b3c',
});
Expand Down
5 changes: 3 additions & 2 deletions test/functional/apps/dashboard/legacy_urls.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
describe('legacy urls', function describeIndexTests() {
before(async function () {
await security.testUser.setRoles(['opensearch_dashboards_admin', 'animals']);
await opensearchArchiver.load('dashboard/current/opensearch-dashboards');
await opensearchArchiver.load('dashboard/current/opensearch_dashboards');
await PageObjects.common.navigateToApp('dashboard');
await PageObjects.dashboard.clickNewDashboard();
await dashboardAddPanel.addVisualization('Rendering-Test:-animal-sounds-pie');
Expand All @@ -67,7 +67,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
await log.debug(`Current url is ${currentUrl}`);
testDashboardId = /#\/view\/(.+)\?/.exec(currentUrl)![1];
opensearchDashboardsLegacyBaseUrl =
currentUrl.substring(0, currentUrl.indexOf('/app/dashboards')) + '/app/kibana';
currentUrl.substring(0, currentUrl.indexOf('/app/dashboards')) +
'/app/opensearch-dashboards';
opensearchDashboardsVisualizeBaseUrl =
currentUrl.substring(0, currentUrl.indexOf('/app/dashboards')) + '/app/visualize';
await log.debug(`id is ${testDashboardId}`);
Expand Down
2 changes: 1 addition & 1 deletion test/functional/apps/dashboard/panel_expand_toggle.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export default function ({ getService, getPageObjects }) {

describe('expanding a panel', () => {
before(async () => {
await opensearchArchiver.load('dashboard/current/opensearch-dashboards');
await opensearchArchiver.load('dashboard/current/opensearch_dashboards');
await opensearchDashboardsServer.uiSettings.replace({
defaultIndex: '0bf35f60-3dc9-11e8-8660-4d65aa086b3c',
});
Expand Down
2 changes: 1 addition & 1 deletion test/functional/apps/dashboard/time_zones.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export default function ({ getService, getPageObjects }) {
this.tags('includeFirefox');

before(async () => {
await opensearchArchiver.load('dashboard/current/opensearch-dashboards');
await opensearchArchiver.load('dashboard/current/opensearch_dashboards');
await opensearchDashboardsServer.uiSettings.replace({
defaultIndex: '0bf35f60-3dc9-11e8-8660-4d65aa086b3c',
});
Expand Down
2 changes: 1 addition & 1 deletion test/functional/apps/dashboard/url_field_formatter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
// FLAKY: https://github.com/elastic/kibana/issues/79463
describe.skip('Changing field formatter to Url', () => {
before(async function () {
await opensearchArchiver.load('dashboard/current/opensearch-dashboards');
await opensearchArchiver.load('dashboard/current/opensearch_dashboards');
await opensearchDashboardsServer.uiSettings.replace({
defaultIndex: '0bf35f60-3dc9-11e8-8660-4d65aa086b3c',
});
Expand Down
2 changes: 1 addition & 1 deletion test/functional/apps/dashboard/view_edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export default function ({ getService, getPageObjects }) {

describe('dashboard view edit mode', function viewEditModeTests() {
before(async () => {
await opensearchArchiver.load('dashboard/current/opensearch-dashboards');
await opensearchArchiver.load('dashboard/current/opensearch_dashboards');
await opensearchDashboardsServer.uiSettings.replace({
defaultIndex: '0bf35f60-3dc9-11e8-8660-4d65aa086b3c',
});
Expand Down