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

[Plugin Generator] Add integration test #43219

Merged
merged 74 commits into from
Sep 6, 2019

Conversation

wayneseymour
Copy link
Member

@wayneseymour wayneseymour commented Aug 13, 2019

Addresses #17061

Features Covered

  • generating a plugin

Then from within the generated plugin's directory

  • running yarn build
  • running yarn test:browser
  • running yarn test:server
  • running yarn start
  • running yarn preinstall
  • running yarn lint
  • running yarn kbn --help
  • running yarn es --help

@wayneseymour wayneseymour added Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc release_note:skip Skip the PR/issue when compiling release notes labels Aug 13, 2019
@wayneseymour wayneseymour self-assigned this Aug 13, 2019
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-platform

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💔 Build Failed

After the fixups are merged,
  these should fail.
@elasticmachine
Copy link
Contributor

💔 Build Failed

When these fail, that means the broken
commands have been fixed.
@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💔 Build Failed

and bump global timeout for this test.
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

not error.
Add an integration test to verify the change.
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@wayneseymour wayneseymour changed the title [Plugin Generator] Add integration test [WIP] [Plugin Generator] Add integration test Aug 15, 2019
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

refactor the jest cli option, "higher up".
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@wayneseymour wayneseymour changed the title [WIP] [Plugin Generator] Add integration test [Plugin Generator] Add integration test Sep 3, 2019
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@wayneseymour wayneseymour requested a review from jbudz September 4, 2019 20:36
@@ -78,7 +78,7 @@ module.exports = {
},
allowSameFolder: { type: 'boolean' },
},
additionalProperties: false,
additionalProperties: true,
Copy link
Contributor

Choose a reason for hiding this comment

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

We can get rid of this right?

Copy link
Member Author

Choose a reason for hiding this comment

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

That was to make yarn lint succeed, as it was failing. I'll switch it back and see what we get.

const create = spawn(process.execPath, ['scripts/generate_plugin.js', pluginName], {
cwd: ROOT_DIR,
});
create.stdout.on('data', () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Mind tossing a comment here to describe what's happening?

Copy link
Member Author

Choose a reason for hiding this comment

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

You betcha!

Switch the generator to a function declaration,
instead of an arrow fn, for better readability and
add a comment to help as well.
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

While debugging, I noticed the `uiApps` collection
contains the integration test's plugin.
Also, it looks like some logic was adding the plugin's tests, again.
I want this to run in ci to see if the "Test Result : Browser Unit Tests"
report is back around the 500 count mark, with this logic commented out.
@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@wayneseymour wayneseymour requested a review from spalger September 6, 2019 18:49
Copy link
Contributor

@spalger spalger left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@wayneseymour
Copy link
Member Author

@spalger no...thank you! :)

@wayneseymour wayneseymour merged commit ef4a73a into master Sep 6, 2019
@wayneseymour wayneseymour deleted the plugin-generator/integration-test branch September 6, 2019 19:12
@wayneseymour wayneseymour restored the plugin-generator/integration-test branch September 6, 2019 19:12
wayneseymour added a commit to wayneseymour/kibana that referenced this pull request Sep 6, 2019
Addresses elastic#17061

### Features Covered 
 - generating a plugin

#### Then from within the generated plugin's directory
 - running `yarn build`
 - running `yarn test:browser`
 - running `yarn test:server`
 - running `yarn start`
 - running `yarn preinstall`
 - running `yarn lint`
 - running `yarn kbn --help`
 - running `yarn es --help`
wayneseymour added a commit that referenced this pull request Sep 11, 2019
* [Plugin Generator] Add integration test (#43219)

Addresses #17061

### Features Covered 
 - generating a plugin

#### Then from within the generated plugin's directory
 - running `yarn build`
 - running `yarn test:browser`
 - running `yarn test:server`
 - running `yarn start`
 - running `yarn preinstall`
 - running `yarn lint`
 - running `yarn kbn --help`
 - running `yarn es --help`

* Fixup parse error for intl file
@spalger spalger deleted the plugin-generator/integration-test branch December 4, 2019 19:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release_note:skip Skip the PR/issue when compiling release notes Team:Operations Team label for Operations Team v7.5.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants