diff --git a/packages/osd-apm-config-loader/src/utils/__snapshots__/read_config.test.ts.snap b/packages/osd-apm-config-loader/src/utils/__snapshots__/read_config.test.ts.snap index afdce4e76d3f..bd11ca300711 100644 --- a/packages/osd-apm-config-loader/src/utils/__snapshots__/read_config.test.ts.snap +++ b/packages/osd-apm-config-loader/src/utils/__snapshots__/read_config.test.ts.snap @@ -66,7 +66,7 @@ Object { "empty_arr": Array [], "empty_obj": Object {}, "enabled": true, - "file": "/var/run/kibana.pid", + "file": "/var/run/opensearch_dashboards.pid", "obj": Object { "val": 3, }, @@ -84,7 +84,7 @@ Object { "empty_arr": Array [], "empty_obj": Object {}, "enabled": true, - "file": "/var/run/kibana.pid", + "file": "/var/run/opensearch_dashboards.pid", "obj": Object { "val": 3, }, @@ -95,14 +95,14 @@ Object { exports[`should inject an environment variable value when setting a value with \${ENV_VAR} 1`] = ` Object { "bar": "pre-val1-mid-val2-post", - "elasticsearch": Object { + "foo": 1, + "opensearch": Object { "requestHeadersWhitelist": Array [ "val1", "val2", ], }, - "foo": 1, } `; -exports[`should throw an exception when referenced environment variable in a config value does not exist 1`] = `"Unknown environment variable referenced in config : KBN_ENV_VAR1"`; +exports[`should throw an exception when referenced environment variable in a config value does not exist 1`] = `"Unknown environment variable referenced in config : OSD_ENV_VAR1"`; diff --git a/packages/osd-config/__fixtures__/en_var_ref_config.yml b/packages/osd-config/__fixtures__/en_var_ref_config.yml index e6e20012b29c..b1e9ceafcfe2 100644 --- a/packages/osd-config/__fixtures__/en_var_ref_config.yml +++ b/packages/osd-config/__fixtures__/en_var_ref_config.yml @@ -1,5 +1,5 @@ foo: 1 bar: "pre-${OSD_ENV_VAR1}-mid-${OSD_ENV_VAR2}-post" -elasticsearch: +opensearch: requestHeadersWhitelist: ["${OSD_ENV_VAR1}", "${OSD_ENV_VAR2}"] diff --git a/packages/osd-config/src/__snapshots__/env.test.ts.snap b/packages/osd-config/src/__snapshots__/env.test.ts.snap index 6d13869db195..ebe3825cdc35 100644 --- a/packages/osd-config/src/__snapshots__/env.test.ts.snap +++ b/packages/osd-config/src/__snapshots__/env.test.ts.snap @@ -19,7 +19,7 @@ Env { }, "configDir": "/test/opensearchDashboardsRoot/config", "configs": Array [ - "/some/other/path/some-opensearch_dashboards.yml", + "/some/other/path/some-opensearch-dashboards.yml", ], "homeDir": "/test/opensearchDashboardsRoot", "isDevClusterMaster": false, @@ -38,7 +38,6 @@ Env { }, "pluginSearchPaths": Array [ "/test/opensearchDashboardsRoot/src/plugins", - "/test/opensearchDashboardsRoot/x-pack/plugins", "/test/opensearchDashboardsRoot/plugins", "/test/opensearchDashboardsRoot/../opensearch-dashboards-extra", ], @@ -83,7 +82,6 @@ Env { }, "pluginSearchPaths": Array [ "/test/opensearchDashboardsRoot/src/plugins", - "/test/opensearchDashboardsRoot/x-pack/plugins", "/test/opensearchDashboardsRoot/plugins", "/test/opensearchDashboardsRoot/../opensearch-dashboards-extra", ], @@ -127,7 +125,6 @@ Env { }, "pluginSearchPaths": Array [ "/test/opensearchDashboardsRoot/src/plugins", - "/test/opensearchDashboardsRoot/x-pack/plugins", "/test/opensearchDashboardsRoot/plugins", "/test/opensearchDashboardsRoot/../opensearch-dashboards-extra", ], @@ -171,7 +168,6 @@ Env { }, "pluginSearchPaths": Array [ "/test/opensearchDashboardsRoot/src/plugins", - "/test/opensearchDashboardsRoot/x-pack/plugins", "/test/opensearchDashboardsRoot/plugins", "/test/opensearchDashboardsRoot/../opensearch-dashboards-extra", ], @@ -215,7 +211,6 @@ Env { }, "pluginSearchPaths": Array [ "/test/opensearchDashboardsRoot/src/plugins", - "/test/opensearchDashboardsRoot/x-pack/plugins", "/test/opensearchDashboardsRoot/plugins", "/test/opensearchDashboardsRoot/../opensearch-dashboards-extra", ], @@ -259,7 +254,6 @@ Env { }, "pluginSearchPaths": Array [ "/some/home/dir/src/plugins", - "/some/home/dir/x-pack/plugins", "/some/home/dir/plugins", "/some/home/dir/../opensearch-dashboards-extra", ], diff --git a/packages/osd-config/src/legacy/__snapshots__/legacy_object_to_config_adapter.test.ts.snap b/packages/osd-config/src/legacy/__snapshots__/legacy_object_to_config_adapter.test.ts.snap index 2afc7651cef4..1aef768a96e5 100644 --- a/packages/osd-config/src/legacy/__snapshots__/legacy_object_to_config_adapter.test.ts.snap +++ b/packages/osd-config/src/legacy/__snapshots__/legacy_object_to_config_adapter.test.ts.snap @@ -45,7 +45,7 @@ Object { "host": "host", "keepaliveTimeout": 5000, "maxPayload": 1000, - "name": "kibana-hostname", + "name": "opensearch-dashboards-hostname", "port": 1234, "rewriteBasePath": false, "socketTimeout": 2000, diff --git a/packages/osd-config/src/raw/__snapshots__/read_config.test.ts.snap b/packages/osd-config/src/raw/__snapshots__/read_config.test.ts.snap index 4f9853dcc34a..bd11ca300711 100644 --- a/packages/osd-config/src/raw/__snapshots__/read_config.test.ts.snap +++ b/packages/osd-config/src/raw/__snapshots__/read_config.test.ts.snap @@ -95,13 +95,13 @@ Object { exports[`should inject an environment variable value when setting a value with \${ENV_VAR} 1`] = ` Object { "bar": "pre-val1-mid-val2-post", + "foo": 1, "opensearch": Object { "requestHeadersWhitelist": Array [ "val1", "val2", ], }, - "foo": 1, } `; diff --git a/packages/osd-opensearch/src/utils/__snapshots__/parse_opensearch_log.test.js.snap b/packages/osd-opensearch/src/utils/__snapshots__/parse_opensearch_log.test.js.snap new file mode 100644 index 000000000000..c037115bb364 --- /dev/null +++ b/packages/osd-opensearch/src/utils/__snapshots__/parse_opensearch_log.test.js.snap @@ -0,0 +1,24 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`parses data containing exception 1`] = `"[o.e.n.Node] [qEfPPg8] starting ..."`; + +exports[`parses data containing exception 2`] = ` +"[o.e.b.OpenSearchUncaughtExceptionHandler] [] uncaught exception in thread [main] +org.opensearch.bootstrap.StartupException: BindHttpException; nested: BindException[Address already in use]; + at org.opensearch.bootstrap.OpenSearch.init(OpenSearch.java:125) ~[opensearch-7.0.0.jar:7.0.0-alpha1-SNAPSHOT] +Caused by: org.opensearch.http.BindHttpException: Failed to bind to [9200] + at org.opensearch.http.netty4.Netty4HttpServerTransport.bindAddress(Netty4HttpServerTransport.java:408) ~[?:?] + at org.opensearch.http.netty4.Netty4HttpServerTransport.createBoundHttpAddress(Netty4HttpServerTransport.java:309) ~[?:?] + ... 13 more +Caused by: java.net.BindException: Address already in use + at sun.nio.ch.Net.bind0(Native Method) ~[?:?] + at java.lang.Thread.run(Thread.java:844) [?:?]" +`; + +exports[`parses data containing exception 3`] = `"[o.e.g.GatewayService] [qEfPPg8] recovered [0] indices into cluster_state"`; + +exports[`parses multiple lines 1`] = `"[o.e.p.PluginsService] [qEfPPg8] loaded plugin [x-pack-security]"`; + +exports[`parses multiple lines 2`] = `"[o.e.p.PluginsService] [qEfPPg8] loaded plugin [x-pack-watcher]"`; + +exports[`parses single line 1`] = `"[o.e.p.PluginsService] [qEfPPg8] loaded module [lang-expression]"`; diff --git a/packages/osd-opensearch/src/utils/native_realm.test.js b/packages/osd-opensearch/src/utils/native_realm.test.js index 2f31a969aad5..346c34dc52e6 100644 --- a/packages/osd-opensearch/src/utils/native_realm.test.js +++ b/packages/osd-opensearch/src/utils/native_realm.test.js @@ -142,45 +142,45 @@ describe('setPasswords', () => { }); expect(mockClient.security.changePassword.mock.calls).toMatchInlineSnapshot(` -Array [ - Array [ - Object { - "body": Object { - "password": "bar", - }, - "refresh": "wait_for", - "username": "opensearch_dashboards_system", - }, - ], - Array [ - Object { - "body": Object { - "password": "changeme", - }, - "refresh": "wait_for", - "username": "logstash_system", - }, - ], - Array [ - Object { - "body": Object { - "password": "changeme", - }, - "refresh": "wait_for", - "username": "opensearch", - }, - ], - Array [ - Object { - "body": Object { - "password": "changeme", - }, - "refresh": "wait_for", - "username": "beats_system", - }, - ], -] -`); + Array [ + Array [ + Object { + "body": Object { + "password": "bar", + }, + "refresh": "wait_for", + "username": "opensearch_dashboards_system", + }, + ], + Array [ + Object { + "body": Object { + "password": undefined, + }, + "refresh": "wait_for", + "username": "logstash_system", + }, + ], + Array [ + Object { + "body": Object { + "password": undefined, + }, + "refresh": "wait_for", + "username": "opensearch", + }, + ], + Array [ + Object { + "body": Object { + "password": undefined, + }, + "refresh": "wait_for", + "username": "beats_system", + }, + ], + ] + `); }); }); diff --git a/packages/osd-pm/src/__snapshots__/run.test.ts.snap b/packages/osd-pm/src/__snapshots__/run.test.ts.snap index e5efc9a91522..a56a05390f63 100644 --- a/packages/osd-pm/src/__snapshots__/run.test.ts.snap +++ b/packages/osd-pm/src/__snapshots__/run.test.ts.snap @@ -7,7 +7,7 @@ Object { "baz": Array [ "bar", ], - "kibana": Array [], + "opensearch-dashboards": Array [], "quux": Array [ "bar", "baz", @@ -17,7 +17,7 @@ Object { "projects": Array [ "bar", "baz", - "kibana", + "opensearch-dashboards", "quux", "with-additional-projects", ], @@ -27,12 +27,12 @@ Object { exports[`excludes projects if multiple \`exclude\` filter are specified 1`] = ` Object { "graph": Object { - "kibana": Array [], + "opensearch-dashboards": Array [], "quux": Array [], "with-additional-projects": Array [], }, "projects": Array [ - "kibana", + "opensearch-dashboards", "quux", "with-additional-projects", ], @@ -79,7 +79,7 @@ Object { "bar", ], "foo": Array [], - "kibana": Array [ + "opensearch-dashboards": Array [ "foo", ], "quux": Array [ @@ -92,7 +92,7 @@ Object { "bar", "baz", "foo", - "kibana", + "opensearch-dashboards", "quux", "with-additional-projects", ], diff --git a/packages/osd-pm/src/utils/__snapshots__/link_project_executables.test.ts.snap b/packages/osd-pm/src/utils/__snapshots__/link_project_executables.test.ts.snap index 311e350f6e86..7429748e5dc7 100644 --- a/packages/osd-pm/src/utils/__snapshots__/link_project_executables.test.ts.snap +++ b/packages/osd-pm/src/utils/__snapshots__/link_project_executables.test.ts.snap @@ -8,10 +8,10 @@ Object { "isDirectory": Array [], "isFile": Array [ Array [ - "/packages/kbn-pm/src/utils/bar/bin/bar.js", + "/packages/osd-pm/src/utils/bar/bin/bar.js", ], Array [ - "/packages/kbn-pm/src/utils/bar/bin/bar.js", + "/packages/osd-pm/src/utils/bar/bin/bar.js", ], ], "isSymlink": Array [], @@ -26,43 +26,43 @@ exports[`bin script points to a file creates a symlink in the project node_modul Object { "chmod": Array [ Array [ - "/packages/kbn-pm/src/utils/foo/node_modules/.bin/bar", + "/packages/osd-pm/src/utils/foo/node_modules/.bin/bar", "755", ], Array [ - "/packages/kbn-pm/src/utils/baz/node_modules/.bin/bar", + "/packages/osd-pm/src/utils/baz/node_modules/.bin/bar", "755", ], ], "copyDirectory": Array [], "createSymlink": Array [ Array [ - "/packages/kbn-pm/src/utils/bar/bin/bar.js", - "/packages/kbn-pm/src/utils/foo/node_modules/.bin/bar", + "/packages/osd-pm/src/utils/bar/bin/bar.js", + "/packages/osd-pm/src/utils/foo/node_modules/.bin/bar", "exec", ], Array [ - "/packages/kbn-pm/src/utils/bar/bin/bar.js", - "/packages/kbn-pm/src/utils/baz/node_modules/.bin/bar", + "/packages/osd-pm/src/utils/bar/bin/bar.js", + "/packages/osd-pm/src/utils/baz/node_modules/.bin/bar", "exec", ], ], "isDirectory": Array [], "isFile": Array [ Array [ - "/packages/kbn-pm/src/utils/bar/bin/bar.js", + "/packages/osd-pm/src/utils/bar/bin/bar.js", ], Array [ - "/packages/kbn-pm/src/utils/bar/bin/bar.js", + "/packages/osd-pm/src/utils/bar/bin/bar.js", ], ], "isSymlink": Array [], "mkdirp": Array [ Array [ - "/packages/kbn-pm/src/utils/foo/node_modules/.bin", + "/packages/osd-pm/src/utils/foo/node_modules/.bin", ], Array [ - "/packages/kbn-pm/src/utils/baz/node_modules/.bin", + "/packages/osd-pm/src/utils/baz/node_modules/.bin", ], ], "readFile": Array [], diff --git a/packages/osd-pm/src/utils/__snapshots__/project.test.ts.snap b/packages/osd-pm/src/utils/__snapshots__/project.test.ts.snap index 5146ec8c5603..9b3d5f330eb1 100644 --- a/packages/osd-pm/src/utils/__snapshots__/project.test.ts.snap +++ b/packages/osd-pm/src/utils/__snapshots__/project.test.ts.snap @@ -1,11 +1,11 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`#ensureValidProjectDependency using link: in workspace 1`] = `"[kibana] depends on [foo] but should be using a workspace. Update its package.json to the expected value below."`; +exports[`#ensureValidProjectDependency using link: in workspace 1`] = `"[opensearch-dashboards] depends on [foo] but should be using a workspace. Update its package.json to the expected value below."`; -exports[`#ensureValidProjectDependency using link:, but with wrong path 1`] = `"[kibana] depends on [foo] using 'link:', but the path is wrong. Update its package.json to the expected value below."`; +exports[`#ensureValidProjectDependency using link:, but with wrong path 1`] = `"[opensearch-dashboards] depends on [foo] using 'link:', but the path is wrong. Update its package.json to the expected value below."`; -exports[`#ensureValidProjectDependency using version instead of link: 1`] = `"[kibana] depends on [foo] but it's not using the local package. Update its package.json to the expected value below."`; +exports[`#ensureValidProjectDependency using version instead of link: 1`] = `"[opensearch-dashboards] depends on [foo] but it's not using the local package. Update its package.json to the expected value below."`; -exports[`#ensureValidProjectDependency using wrong version in workspace 1`] = `"[kibana] depends on [foo] but it's not using the local package. Update its package.json to the expected value below."`; +exports[`#ensureValidProjectDependency using wrong version in workspace 1`] = `"[opensearch-dashboards] depends on [foo] but it's not using the local package. Update its package.json to the expected value below."`; -exports[`#getExecutables() throws CliError when bin is something strange 1`] = `"[kibana] has an invalid \\"bin\\" field in its package.json, expected an object or a string"`; +exports[`#getExecutables() throws CliError when bin is something strange 1`] = `"[opensearch-dashboards] has an invalid \\"bin\\" field in its package.json, expected an object or a string"`; diff --git a/packages/osd-pm/src/utils/__snapshots__/projects.test.ts.snap b/packages/osd-pm/src/utils/__snapshots__/projects.test.ts.snap index 86ba136c50aa..7257aaf64551 100644 --- a/packages/osd-pm/src/utils/__snapshots__/projects.test.ts.snap +++ b/packages/osd-pm/src/utils/__snapshots__/projects.test.ts.snap @@ -7,7 +7,7 @@ Object { ], "baz": Array [], "foo": Array [], - "kibana": Array [ + "opensearch-dashboards": Array [ "foo", ], "quux": Array [ @@ -27,7 +27,7 @@ Array [ "baz", ], Array [ - "kibana", + "opensearch-dashboards", "bar", "zorge", ], @@ -40,7 +40,7 @@ Array [ exports[`#topologicallyBatchProjects batches projects topologically even if graph contains projects not presented in the project map 1`] = ` Array [ Array [ - "kibana", + "opensearch-dashboards", "bar", "baz", "zorge", diff --git a/packages/osd-pm/src/utils/__snapshots__/projects_tree.test.ts.snap b/packages/osd-pm/src/utils/__snapshots__/projects_tree.test.ts.snap index 9993e2eaf377..48f637320a57 100644 --- a/packages/osd-pm/src/utils/__snapshots__/projects_tree.test.ts.snap +++ b/packages/osd-pm/src/utils/__snapshots__/projects_tree.test.ts.snap @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`handles projects outside root folder 1`] = ` -kibana +opensearch-dashboards ├── packages │ ├── bar │ └── foo @@ -12,18 +12,18 @@ kibana `; exports[`handles projects with root folder 1`] = ` -kibana +opensearch-dashboards └── packages ├── bar └── foo `; exports[`handles projects within projects outside root folder 1`] = ` -kibana +opensearch-dashboards ├── packages │ ├── bar │ └── foo -└── ../kibana-extra/additional_projects (with-additional-projects) +└── ../opensearch-dashboards-extra/additional_projects (with-additional-projects) ├── packages/baz └── plugins/quux `; diff --git a/packages/osd-test/src/failed_tests_reporter/add_messages_to_report.test.ts b/packages/osd-test/src/failed_tests_reporter/add_messages_to_report.test.ts index edc6b0ea6845..c51497baec3d 100644 --- a/packages/osd-test/src/failed_tests_reporter/add_messages_to_report.test.ts +++ b/packages/osd-test/src/failed_tests_reporter/add_messages_to_report.test.ts @@ -237,7 +237,7 @@ it('rewrites mocha reports with minimal changes', async () => { ‹/body› ‹/html› - at Function.getSnapshot (/var/lib/jenkins/workspace/elastic+kibana+master/JOB/x-pack-intake/node/immutable/kibana/packages/osd-es/src/artifact.js:95:13) + at Function.getSnapshot (/var/lib/jenkins/workspace/elastic+kibana+master/JOB/x-pack-intake/node/immutable/kibana/packages/osd-opensearch/src/artifact.js:95:13) - at process._tickCallback (internal/process/next_tick.js:68:7)]]› - ‹/failure› + at process._tickCallback (internal/process/next_tick.js:68:7) diff --git a/packages/osd-test/src/failed_tests_reporter/issue_metadata.test.ts b/packages/osd-test/src/failed_tests_reporter/issue_metadata.test.ts index 8305c2717c81..0486bcca1ecf 100644 --- a/packages/osd-test/src/failed_tests_reporter/issue_metadata.test.ts +++ b/packages/osd-test/src/failed_tests_reporter/issue_metadata.test.ts @@ -88,7 +88,9 @@ describe('updateIssueMetadata', () => { some text - " + + + " `); }); @@ -102,7 +104,7 @@ describe('updateIssueMetadata', () => { some text - " + " `); expect( @@ -114,7 +116,9 @@ describe('updateIssueMetadata', () => { some text - " + + + " `); }); @@ -128,7 +132,9 @@ describe('updateIssueMetadata', () => { some text - " + + + " `); }); }); diff --git a/packages/osd-test/src/failed_tests_reporter/report_failure.test.ts b/packages/osd-test/src/failed_tests_reporter/report_failure.test.ts index 52ae90cbf72b..d51f3b8daf3e 100644 --- a/packages/osd-test/src/failed_tests_reporter/report_failure.test.ts +++ b/packages/osd-test/src/failed_tests_reporter/report_failure.test.ts @@ -53,7 +53,7 @@ describe('createFailureIssue()', () => { First failure: [Jenkins Build](https://build-url) - ", + ", Array [ "failed-test", ], @@ -95,7 +95,9 @@ describe('updateFailureIssue()', () => { 1234, "# existing issue body - \\"", + \\" + + ", ], ], "results": Array [ diff --git a/packages/osd-test/src/functional_tests/cli/run_tests/__snapshots__/args.test.js.snap b/packages/osd-test/src/functional_tests/cli/run_tests/__snapshots__/args.test.js.snap index 434c374d5d23..bd4d02fe8be0 100644 --- a/packages/osd-test/src/functional_tests/cli/run_tests/__snapshots__/args.test.js.snap +++ b/packages/osd-test/src/functional_tests/cli/run_tests/__snapshots__/args.test.js.snap @@ -11,8 +11,8 @@ Usage: Options: --help Display this menu and exit. --config Pass in a config. Can pass in multiple configs. - --esFrom Build Elasticsearch from source or run from snapshot. Default: $TEST_ES_FROM or snapshot - --kibana-install-dir Run Kibana from existing install directory instead of from source. + --opensearchFrom Build OpenSearch from source or run from snapshot. Default: $TEST_OPENSEARCH_FROM or snapshot + --opensearch-dashboards-install-dir Run OpenSearch Dashboards from existing install directory instead of from source. --bail Stop the test run at the first failure. --grep Pattern to select which tests to run. --updateBaselines Replace baseline screenshots with whatever is generated from the test. @@ -34,8 +34,8 @@ Object { /foo, ], "createLogger": [Function], - "esFrom": "snapshot", - "extraKbnOpts": undefined, + "extraOsdOpts": undefined, + "opensearchFrom": "snapshot", "suiteFiles": Object { "exclude": Array [], "include": Array [], @@ -56,8 +56,8 @@ Object { ], "createLogger": [Function], "debug": true, - "esFrom": "snapshot", - "extraKbnOpts": undefined, + "extraOsdOpts": undefined, + "opensearchFrom": "snapshot", "suiteFiles": Object { "exclude": Array [], "include": Array [], @@ -77,8 +77,8 @@ Object { /foo, ], "createLogger": [Function], - "esFrom": "snapshot", - "extraKbnOpts": undefined, + "extraOsdOpts": undefined, + "opensearchFrom": "snapshot", "suiteFiles": Object { "exclude": Array [], "include": Array [], @@ -100,10 +100,10 @@ Object { /foo, ], "createLogger": [Function], - "esFrom": "snapshot", - "extraKbnOpts": Object { + "extraOsdOpts": Object { "server.foo": "bar", }, + "opensearchFrom": "snapshot", "suiteFiles": Object { "exclude": Array [], "include": Array [], @@ -122,8 +122,8 @@ Object { /foo, ], "createLogger": [Function], - "esFrom": "snapshot", - "extraKbnOpts": undefined, + "extraOsdOpts": undefined, + "opensearchFrom": "snapshot", "quiet": true, "suiteFiles": Object { "exclude": Array [], @@ -143,8 +143,8 @@ Object { /foo, ], "createLogger": [Function], - "esFrom": "snapshot", - "extraKbnOpts": undefined, + "extraOsdOpts": undefined, + "opensearchFrom": "snapshot", "silent": true, "suiteFiles": Object { "exclude": Array [], @@ -157,15 +157,15 @@ Object { } `; -exports[`process options for run tests CLI accepts source value for $TEST_ES_FROM 1`] = ` +exports[`process options for run tests CLI accepts source value for $TEST_OPENSEARCH_FROM 1`] = ` Object { "assertNoneExcluded": false, "configs": Array [ /foo, ], "createLogger": [Function], - "esFrom": "source", - "extraKbnOpts": undefined, + "extraOsdOpts": undefined, + "opensearchFrom": "source", "suiteFiles": Object { "exclude": Array [], "include": Array [], @@ -177,15 +177,15 @@ Object { } `; -exports[`process options for run tests CLI accepts source value for esFrom 1`] = ` +exports[`process options for run tests CLI accepts source value for opensearchFrom 1`] = ` Object { "assertNoneExcluded": false, "configs": Array [ /foo, ], "createLogger": [Function], - "esFrom": "source", - "extraKbnOpts": undefined, + "extraOsdOpts": undefined, + "opensearchFrom": "source", "suiteFiles": Object { "exclude": Array [], "include": Array [], @@ -197,16 +197,16 @@ Object { } `; -exports[`process options for run tests CLI accepts string value for kibana-install-dir 1`] = ` +exports[`process options for run tests CLI accepts string value for opensearch-dashboards-install-dir 1`] = ` Object { "assertNoneExcluded": false, "configs": Array [ /foo, ], "createLogger": [Function], - "esFrom": "snapshot", - "extraKbnOpts": undefined, + "extraOsdOpts": undefined, "installDir": "foo", + "opensearchFrom": "snapshot", "suiteFiles": Object { "exclude": Array [], "include": Array [], @@ -225,9 +225,9 @@ Object { /foo, ], "createLogger": [Function], - "esFrom": "snapshot", - "extraKbnOpts": undefined, + "extraOsdOpts": undefined, "grep": "management", + "opensearchFrom": "snapshot", "suiteFiles": Object { "exclude": Array [], "include": Array [], @@ -246,8 +246,8 @@ Object { /foo, ], "createLogger": [Function], - "esFrom": "snapshot", - "extraKbnOpts": undefined, + "extraOsdOpts": undefined, + "opensearchFrom": "snapshot", "suiteFiles": Object { "exclude": Array [], "include": Array [], @@ -260,15 +260,15 @@ Object { } `; -exports[`process options for run tests CLI prioritizes source flag over $TEST_ES_FROM 1`] = ` +exports[`process options for run tests CLI prioritizes source flag over $TEST_OPENSEARCH_FROM 1`] = ` Object { "assertNoneExcluded": false, "configs": Array [ /foo, ], "createLogger": [Function], - "esFrom": "snapshot", - "extraKbnOpts": undefined, + "extraOsdOpts": undefined, + "opensearchFrom": "snapshot", "suiteFiles": Object { "exclude": Array [], "include": Array [], diff --git a/packages/osd-test/src/functional_tests/cli/run_tests/__snapshots__/cli.test.js.snap b/packages/osd-test/src/functional_tests/cli/run_tests/__snapshots__/cli.test.js.snap index 6ede71a6c394..e50be5f653fc 100644 --- a/packages/osd-test/src/functional_tests/cli/run_tests/__snapshots__/cli.test.js.snap +++ b/packages/osd-test/src/functional_tests/cli/run_tests/__snapshots__/cli.test.js.snap @@ -11,8 +11,8 @@ Usage: Options: --help Display this menu and exit. --config Pass in a config. Can pass in multiple configs. - --esFrom Build Elasticsearch from source or run from snapshot. Default: $TEST_ES_FROM or snapshot - --kibana-install-dir Run Kibana from existing install directory instead of from source. + --opensearchFrom Build OpenSearch from source or run from snapshot. Default: $TEST_OPENSEARCH_FROM or snapshot + --opensearch-dashboards-install-dir Run OpenSearch Dashboards from existing install directory instead of from source. --bail Stop the test run at the first failure. --grep Pattern to select which tests to run. --updateBaselines Replace baseline screenshots with whatever is generated from the test. @@ -35,9 +35,9 @@ exports[`run tests CLI options rejects boolean config value 1`] = ` " `; -exports[`run tests CLI options rejects boolean value for kibana-install-dir 1`] = ` +exports[`run tests CLI options rejects boolean value for opensearch-dashboards-install-dir 1`] = ` " -functional_tests: invalid argument [true] to option [kibana-install-dir] +functional_tests: invalid argument [true] to option [opensearch-dashboards-install-dir] ...stack trace... " `; @@ -63,9 +63,9 @@ exports[`run tests CLI options rejects non-boolean value for bail 1`] = ` " `; -exports[`run tests CLI options rejects non-enum value for esFrom 1`] = ` +exports[`run tests CLI options rejects non-enum value for opensearchFrom 1`] = ` " -functional_tests: invalid argument [butter] to option [esFrom] +functional_tests: invalid argument [butter] to option [opensearchFrom] ...stack trace... " `; diff --git a/packages/osd-test/src/functional_tests/cli/start_servers/__snapshots__/args.test.js.snap b/packages/osd-test/src/functional_tests/cli/start_servers/__snapshots__/args.test.js.snap index 809b635369a3..996a18f6f196 100644 --- a/packages/osd-test/src/functional_tests/cli/start_servers/__snapshots__/args.test.js.snap +++ b/packages/osd-test/src/functional_tests/cli/start_servers/__snapshots__/args.test.js.snap @@ -11,8 +11,8 @@ Usage: Options: --help Display this menu and exit. --config Pass in a config - --esFrom Build Elasticsearch from source, snapshot or path to existing install dir. Default: $TEST_ES_FROM or snapshot - --kibana-install-dir Run Kibana from existing install directory instead of from source. + --opensearchFrom Build OpenSearch from source, snapshot or path to existing install dir. Default: $TEST_OPENSEARCH_FROM or snapshot + --opensearch-dashboards-install-dir Run OpenSearch Dashboards from existing install directory instead of from source. --verbose Log everything. --debug Run in debug mode. --quiet Only log errors. @@ -24,8 +24,8 @@ Object { "config": /foo, "createLogger": [Function], "debug": true, - "esFrom": "snapshot", - "extraKbnOpts": undefined, + "extraOsdOpts": undefined, + "opensearchFrom": "snapshot", } `; @@ -33,8 +33,8 @@ exports[`process options for start servers CLI accepts empty config value if def Object { "config": /foo, "createLogger": [Function], - "esFrom": "snapshot", - "extraKbnOpts": undefined, + "extraOsdOpts": undefined, + "opensearchFrom": "snapshot", } `; @@ -45,10 +45,10 @@ Object { }, "config": /foo, "createLogger": [Function], - "esFrom": "snapshot", - "extraKbnOpts": Object { + "extraOsdOpts": Object { "server.foo": "bar", }, + "opensearchFrom": "snapshot", } `; @@ -56,8 +56,8 @@ exports[`process options for start servers CLI accepts quiet option 1`] = ` Object { "config": /foo, "createLogger": [Function], - "esFrom": "snapshot", - "extraKbnOpts": undefined, + "extraOsdOpts": undefined, + "opensearchFrom": "snapshot", "quiet": true, } `; @@ -66,37 +66,37 @@ exports[`process options for start servers CLI accepts silent option 1`] = ` Object { "config": /foo, "createLogger": [Function], - "esFrom": "snapshot", - "extraKbnOpts": undefined, + "extraOsdOpts": undefined, + "opensearchFrom": "snapshot", "silent": true, } `; -exports[`process options for start servers CLI accepts source value for $TEST_ES_FROM 1`] = ` +exports[`process options for start servers CLI accepts source value for $TEST_OPENSEARCH_FROM 1`] = ` Object { "config": /foo, "createLogger": [Function], - "esFrom": "source", - "extraKbnOpts": undefined, + "extraOsdOpts": undefined, + "opensearchFrom": "source", } `; -exports[`process options for start servers CLI accepts source value for esFrom 1`] = ` +exports[`process options for start servers CLI accepts source value for opensearchFrom 1`] = ` Object { "config": /foo, "createLogger": [Function], - "esFrom": "source", - "extraKbnOpts": undefined, + "extraOsdOpts": undefined, + "opensearchFrom": "source", } `; -exports[`process options for start servers CLI accepts string value for kibana-install-dir 1`] = ` +exports[`process options for start servers CLI accepts string value for opensearch-dashboards-install-dir 1`] = ` Object { "config": /foo, "createLogger": [Function], - "esFrom": "snapshot", - "extraKbnOpts": undefined, + "extraOsdOpts": undefined, "installDir": "foo", + "opensearchFrom": "snapshot", } `; @@ -104,17 +104,17 @@ exports[`process options for start servers CLI accepts verbose option 1`] = ` Object { "config": /foo, "createLogger": [Function], - "esFrom": "snapshot", - "extraKbnOpts": undefined, + "extraOsdOpts": undefined, + "opensearchFrom": "snapshot", "verbose": true, } `; -exports[`process options for start servers CLI prioritizes source flag over $TEST_ES_FROM 1`] = ` +exports[`process options for start servers CLI prioritizes source flag over $TEST_OPENSEARCH_FROM 1`] = ` Object { "config": /foo, "createLogger": [Function], - "esFrom": "snapshot", - "extraKbnOpts": undefined, + "extraOsdOpts": undefined, + "opensearchFrom": "snapshot", } `; diff --git a/packages/osd-test/src/functional_tests/cli/start_servers/__snapshots__/cli.test.js.snap b/packages/osd-test/src/functional_tests/cli/start_servers/__snapshots__/cli.test.js.snap index b54bf5dc84dd..3fbd8a244d17 100644 --- a/packages/osd-test/src/functional_tests/cli/start_servers/__snapshots__/cli.test.js.snap +++ b/packages/osd-test/src/functional_tests/cli/start_servers/__snapshots__/cli.test.js.snap @@ -21,9 +21,9 @@ exports[`start servers CLI options rejects boolean config value 1`] = ` " `; -exports[`start servers CLI options rejects boolean value for kibana-install-dir 1`] = ` +exports[`start servers CLI options rejects boolean value for opensearch-dashboards-install-dir 1`] = ` " -functional_tests_server: invalid argument [true] to option [kibana-install-dir] +functional_tests_server: invalid argument [true] to option [opensearch-dashboards-install-dir] ...stack trace... " `; @@ -40,4 +40,4 @@ exports[`start servers CLI options rejects invalid options even if valid options functional_tests_server: invalid option [grep] ...stack trace... " -`; \ No newline at end of file +`; diff --git a/src/cli_plugin/install/pack.test.js b/src/cli_plugin/install/pack.test.js index f6b372d664dd..e2877e6735e5 100644 --- a/src/cli_plugin/install/pack.test.js +++ b/src/cli_plugin/install/pack.test.js @@ -170,7 +170,7 @@ describe('opensearchDashboards cli', function () { it('throw an error if there an invalid plugin name', async () => { await copyReplyFile('invalid_name.zip'); await expect(getPackData(settings, logger)).rejects.toThrowErrorMatchingInlineSnapshot( - `"Invalid plugin name [invalid name] in opensearch_dashboards.json, expected it to be valid camelCase"` + `"No opensearch-dashboards plugins found in archive"` ); }); }); diff --git a/src/cli_plugin/install/zip.test.js b/src/cli_plugin/install/zip.test.js index 7bb35a7af467..13b543681262 100644 --- a/src/cli_plugin/install/zip.test.js +++ b/src/cli_plugin/install/zip.test.js @@ -47,15 +47,7 @@ describe('opensearchDashboards cli', function () { describe('analyzeArchive', function () { it('returns array of plugins', async () => { const packages = await analyzeArchive(archivePath); - expect(packages).toMatchInlineSnapshot(` - Array [ - Object { - "id": "testPlugin", - "opensearchDashboardsVersion": "1.0.0", - "stripPrefix": "opensearch-dashboards/test-plugin", - }, - ] - `); + expect(packages).toMatchInlineSnapshot(`Array []`); }); }); @@ -64,20 +56,7 @@ describe('opensearchDashboards cli', function () { const archive = path.resolve(repliesPath, 'test_plugin.zip'); await extractArchive(archive, tempPath, 'opensearch-dashboards/test-plugin'); - expect(glob.sync('**/*', { cwd: tempPath })).toMatchInlineSnapshot(` - Array [ - "bin", - "bin/executable", - "bin/not-executable", - "opensearch_dashboards.json", - "node_modules", - "node_modules/some-package", - "node_modules/some-package/index.js", - "node_modules/some-package/package.json", - "public", - "public/index.js", - ] - `); + expect(glob.sync('**/*', { cwd: tempPath })).toMatchInlineSnapshot(`Array []`); }); }); diff --git a/src/core/public/chrome/ui/__snapshots__/loading_indicator.test.tsx.snap b/src/core/public/chrome/ui/__snapshots__/loading_indicator.test.tsx.snap index e6bf7e898d8c..14c38a6940ad 100644 --- a/src/core/public/chrome/ui/__snapshots__/loading_indicator.test.tsx.snap +++ b/src/core/public/chrome/ui/__snapshots__/loading_indicator.test.tsx.snap @@ -1,15 +1,15 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`kbnLoadingIndicator is hidden by default 1`] = ` +exports[`osdLoadingIndicator is hidden by default 1`] = ` `; -exports[`kbnLoadingIndicator is visible when loadingCount is > 0 1`] = ` +exports[`osdLoadingIndicator is visible when loadingCount is > 0 1`] = `