Skip to content

Commit

Permalink
Updates to allow Functional tests to run (opensearch-project#236)
Browse files Browse the repository at this point in the history
* Update README with instructions for running with OpenSearch

updated README with download and setup instructions for both OpenSearch
and Dashboards.

Closes opensearch-project#223

Signed-off-by: Bishoy Boktor <[email protected]>

* Updates to allow Functional tests to run

Fixed named references and switched default ftr run mode to source

Signed-off-by: Bishoy Boktor <[email protected]>

* Address PR comments

Signed-off-by: Bishoy Boktor <[email protected]>

* Address PR comments

Signed-off-by: Bishoy Boktor <[email protected]>

* Remove OPENSEARCH_TMPDIR check and security check from ftr run

Removed the check for the self-created extraction directory and removed
the no-longer existing security check arg

Signed-off-by: Bishoy Boktor <[email protected]>

* Update artifact unit tests

Test Suites: 23 skipped, 1412 passed, 1412 of 1435 total
Tests:       256 skipped, 9 todo, 10342 passed, 10607 total
Snapshots:   2363 passed, 2363 total
Time:        42.427 s, estimated 43 s

Signed-off-by: Bishoy Boktor <[email protected]>

* Address PR comments

Signed-off-by: Bishoy Boktor <[email protected]>
  • Loading branch information
boktorbb authored Apr 5, 2021
1 parent 984e174 commit 6d11738
Show file tree
Hide file tree
Showing 15 changed files with 17 additions and 21 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,4 @@ As we've been working, we've come up with a bunch of questions that we wanted to

### Questions? Feedback?

Let us know in the [forums](https://discuss.opendistrocommunity.dev/). w00t!!!
Let us know in the [forums](https://discuss.opendistrocommunity.dev/). w00t!!!
6 changes: 2 additions & 4 deletions packages/osd-opensearch/src/artifact.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,8 @@ 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 = '';
const PERMANENT_SNAPSHOTS_BASE_URL = '';

const { cache } = require('./utils');
const { resolveCustomSnapshotUrl } = require('./custom_snapshots');
Expand Down
6 changes: 2 additions & 4 deletions packages/osd-opensearch/src/artifact.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,8 @@ const MOCK_VERSION = 'test-version';
const MOCK_URL = 'http://127.0.0.1:12345';
const MOCK_FILENAME = 'test-filename';

const DAILY_SNAPSHOT_BASE_URL =
'https://storage.googleapis.com/opensearch-dashboards-ci-opensearch-snapshots-daily';
const PERMANENT_SNAPSHOT_BASE_URL =
'https://storage.googleapis.com/opensearch-dashboards-ci-opensearch-snapshots-permanent';
const DAILY_SNAPSHOT_BASE_URL = '';
const PERMANENT_SNAPSHOT_BASE_URL = '';

const createArchive = (params = {}) => {
const license = params.license || 'default';
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
6 changes: 3 additions & 3 deletions packages/osd-opensearch/src/cluster.js
Original file line number Diff line number Diff line change
Expand Up @@ -291,9 +291,9 @@ exports.Cluster = class Cluster {
this._process = execa(OPENSEARCH_BIN, args, {
cwd: installPath,
env: {
...(installPath
? { OPENSEARCH_TMPDIR: path.resolve(installPath, 'OPENSEARCH_TMPDIR') }
: {}),
//...(installPath
//? { OPENSEARCH_TMPDIR: path.resolve(installPath, 'OPENSEARCH_TMPDIR') }
//: {}),
...process.env,
...(options.bundledJDK ? { JAVA_HOME: '' } : {}),
...(options.opensearchEnvVars || {}),
Expand Down
Empty file removed plugins/.empty
Empty file.
2 changes: 1 addition & 1 deletion scripts/opensearch.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ var osdOpenSearch = require('@osd/opensearch');

osdOpenSearch
.run({
license: 'basic',
license: 'oss',
password: 'changeme',
version: pkg.version,
'source-path': resolve(__dirname, '../../opensearch'),
Expand Down
2 changes: 1 addition & 1 deletion test/common/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export default function () {
`--home.disableWelcomeScreen=true`,
// Needed for async search functional tests to introduce a delay
`--data.search.aggs.shardDelay.enabled=true`,
`--security.showInsecureClusterWarning=false`,
//`--security.showInsecureClusterWarning=false`,
// '--telemetry.banner=false',
// '--telemetry.optIn=false',
// These are *very* important to have them pointing to staging
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.
2 changes: 1 addition & 1 deletion test/security_functional/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) {
...functionalConfig
.get('osdTestServer.serverArgs')
.filter((arg: string) => !arg.startsWith('--security.showInsecureClusterWarning')),
'--security.showInsecureClusterWarning=true',
// '--security.showInsecureClusterWarning=true',
// Required to load new platform plugins via `--plugin-path` flag.
'--env.name=development',
],
Expand Down

0 comments on commit 6d11738

Please sign in to comment.