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] Fix integration test due to code change in osd-plugin-helper #318

Merged
merged 1 commit into from
Apr 28, 2021
Merged
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 @@ -41,7 +41,7 @@ import del from 'del';
import globby from 'globby';
import loadJsonFile from 'load-json-file';

const OPENSEARCH_DASHBOARDS_VERSION = '7.9.0';
const OPENSEARCH_DASHBOARDS_VERSION = '1.0.0';
const PLUGIN_DIR = Path.resolve(REPO_ROOT, 'plugins/foo_test_plugin');
const PLUGIN_BUILD_DIR = Path.resolve(PLUGIN_DIR, 'build');
const PLUGIN_ARCHIVE = Path.resolve(
Expand Down Expand Up @@ -94,8 +94,7 @@ it('builds a generated plugin into a viable archive', async () => {
);

expect(buildProc.all).toMatchInlineSnapshot(`
" warn These tools might work with 7.9 versions, but there are known workarounds required. See https://github.com/elastic/kibana/issues/82466 for more info
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we sure that we want to remove this warning and link?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In packages/osd-plugin-helpers/src/cli.ts we removed version check so there is no log warning 'These tools might work with 7.9 versions, but there are known workarounds required'. That is the reason this particular functional test failed. Thanks for checking.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be auto updated with yarn run test:jest_integration -u

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. yarn run test:jest_integration -u will generate same result by deleting that warning sentence. Mine also changed version 7.9.0 to 1.0.0, since we will change the versions eventually.

info deleting the build and target directories
" info deleting the build and target directories
info running @osd/optimizer
│ info initialized, 0 bundles cached
│ info starting worker [1 bundle]
Expand All @@ -105,7 +104,7 @@ it('builds a generated plugin into a viable archive', async () => {
info copying assets from \`public/assets\` to build
info copying server source into the build and converting with babel
info running yarn to install dependencies
info compressing plugin into [fooTestPlugin-7.9.0.zip]"
info compressing plugin into [fooTestPlugin-1.0.0.zip]"
`);

await extract(PLUGIN_ARCHIVE, { dir: TMP_DIR }, () => {});
Expand Down Expand Up @@ -140,7 +139,7 @@ it('builds a generated plugin into a viable archive', async () => {
).toMatchInlineSnapshot(`
Object {
"id": "fooTestPlugin",
"opensearchDashboardsVersion": "7.9.0",
"opensearchDashboardsVersion": "1.0.0",
"optionalPlugins": Array [],
"requiredPlugins": Array [
"navigation",
Expand Down