Skip to content

Commit

Permalink
Updates to allow Functional tests to run
Browse files Browse the repository at this point in the history
Fixed named references and switched default ftr run mode to source

Signed-off-by: Bishoy Boktor <[email protected]>
  • Loading branch information
Bishoy Boktor committed Mar 29, 2021
1 parent 18a5105 commit 07f5eeb
Show file tree
Hide file tree
Showing 12 changed files with 17 additions and 16 deletions.
8 changes: 4 additions & 4 deletions packages/osd-opensearch/src/artifact.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ const { createHash } = require('crypto');
const path = require('path');

const asyncPipeline = promisify(pipeline);
const DAILY_SNAPSHOTS_BASE_URL =
'https://storage.googleapis.com/opensearch-dashboards-ci-opensearch-snapshots-daily';
const PERMANENT_SNAPSHOTS_BASE_URL =
'https://storage.googleapis.com/opensearch-dashboards-ci-opensearch-snapshots-permanent';
const DAILY_SNAPSHOTS_BASE_URL = '';
//'https://storage.googleapis.com/opensearch-dashboards-ci-opensearch-snapshots-daily';
const PERMANENT_SNAPSHOTS_BASE_URL = '';
//'https://storage.googleapis.com/opensearch-dashboards-ci-opensearch-snapshots-permanent';

const { cache } = require('./utils');
const { resolveCustomSnapshotUrl } = require('./custom_snapshots');
Expand Down
2 changes: 1 addition & 1 deletion packages/osd-opensearch/src/cli_commands/source.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const { Cluster } = require('../cluster');
exports.description = 'Build and run from source';

exports.help = (defaults = {}) => {
const { license = 'basic', password = 'changeme', 'base-path': basePath } = defaults;
const { license = 'oss', password = 'changeme', 'base-path': basePath } = defaults;

return dedent`
Options:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export async function runOpenSearch({ config, options }) {
: config.get('servers.opensearch.password'),
license,
log,
basePath: resolve(OPENSEARCH_DASHBOARDS_ROOT, '.opensearch'),
basePath: resolve(OPENSEARCH_DASHBOARDS_ROOT, '../OpenSearch'),
opensearchFrom: opensearchFrom || config.get('opensearchTestCluster.from'),
dataArchive: config.get('opensearchTestCluster.dataArchive'),
opensearchArgs,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export function createLegacyOpenSearchTestCluster(options = {}) {
password = 'changeme',
license = 'oss',
log,
basePath = resolve(OPENSEARCH_DASHBOARDS_ROOT, '.opensearch'),
basePath = resolve(OPENSEARCH_DASHBOARDS_ROOT, '../OpenSearch'),
opensearchFrom = opensearchTestConfig.getBuildFrom(),
dataArchive,
opensearchArgs: customOpenSearchArgs = [],
Expand All @@ -58,7 +58,7 @@ export function createLegacyOpenSearchTestCluster(options = {}) {
const config = {
version: opensearchTestConfig.getVersion(),
installPath: resolve(basePath, clusterName),
sourcePath: resolve(OPENSEARCH_DASHBOARDS_ROOT, '../opensearch'),
sourcePath: resolve(OPENSEARCH_DASHBOARDS_ROOT, '../OpenSearch'),
password,
license,
basePath,
Expand All @@ -78,6 +78,7 @@ export function createLegacyOpenSearchTestCluster(options = {}) {
async start() {
let installPath;

console.log('I"M RUNNING WOOO');
if (opensearchFrom === 'source') {
installPath = (await cluster.installSource(config)).installPath;
} else if (opensearchFrom === 'snapshot') {
Expand Down
Empty file removed plugins/.empty
Empty file.
6 changes: 3 additions & 3 deletions scripts/opensearch.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ var osdOpenSearch = require('@osd/opensearch');

osdOpenSearch
.run({
license: 'basic',
license: 'oss',
password: 'changeme',
version: pkg.version,
'source-path': resolve(__dirname, '../../opensearch'),
'base-path': resolve(__dirname, '../.opensearch'),
'source-path': resolve(__dirname, '../../OpenSearch'),
'base-path': resolve(__dirname, '../../OpenSearch'),
ssl: false,
})
.catch(function (e) {
Expand Down
6 changes: 3 additions & 3 deletions test/common/services/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,17 @@

import { DeploymentProvider } from './deployment';
import { LegacyOpenSearchProvider } from './legacy_opensearch';
import { OpenSearchearchProvider } from './opensearch';
import { OpenSearchProvider } from './opensearch';
import { OpenSearchArchiverProvider } from './opensearch_archiver';
import { OpenSearchDashboardsServerProvider } from './opensearch_dasboards_server';
import { OpenSearchDashboardsServerProvider } from './opensearch_dashboards_server';
import { RetryProvider } from './retry';
import { RandomnessProvider } from './randomness';
import { SecurityServiceProvider } from './security';

export const services = {
deployment: DeploymentProvider,
legacyOpenSearch: LegacyOpenSearchProvider,
opensearch: OpenSearchearchProvider,
opensearch: OpenSearchProvider,
opensearchArchiver: OpenSearchArchiverProvider,
opensearchDashboardsServer: OpenSearchDashboardsServerProvider,
retry: RetryProvider,
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion test/common/services/opensearch_archiver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import { OpenSearchArchiver } from '@osd/opensearch-archiver';
import { FtrProviderContext } from '../ftr_provider_context';

// @ts-ignore not TS yet
import * as OpenSearchDashboardsServer from './opensearch_dasboards_server';
import * as OpenSearchDashboardsServer from './opensearch_dashboards_server';

export function OpenSearchArchiverProvider({
getService,
Expand Down
2 changes: 1 addition & 1 deletion test/common/services/opensearch_dashboards_server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@
* under the License.
*/

export { OpenSearchDashboardsServerProvider } from './opensearch_dasboards_server';
export { OpenSearchDashboardsServerProvider } from './opensearch_dashboards_server';
// @ts-ignore
export { extendOpenSearchArchiver } from './extend_opensearch_archiver';
File renamed without changes.

0 comments on commit 07f5eeb

Please sign in to comment.