Skip to content

Test docs for plugins #18337

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

Merged
merged 1 commit into from
Jun 14, 2016
Merged

Test docs for plugins #18337

merged 1 commit into from
Jun 14, 2016

Conversation

nik9000
Copy link
Member

@nik9000 nik9000 commented May 13, 2016

We weren't doing it before because we weren't starting the plugins.
Now we are.

The hardest part of this was handling the files the tests expect
to be on the filesystem. extraConfigFiles was broken.

@nik9000 nik9000 added >docs General docs changes >test Issues or PRs that are addressing/adding tests review v5.0.0-alpha3 labels May 13, 2016
@@ -290,20 +290,20 @@ class ClusterFormationTasks {
Copy copyConfig = project.tasks.create(name: name, type: Copy, dependsOn: setup)
File configDir = new File(node.homeDir, 'config')
copyConfig.into(configDir) // copy must always have a general dest dir, even though we don't use it
for (Map.Entry<String,Object> extraConfigFile : node.config.extraConfigFiles.entrySet()) {
Copy link
Member

Choose a reason for hiding this comment

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

In the other groovy files for buildSrc, I've been trying to use as little groovy stuff as possible. Can we keep the simple for loop here? It seems the changes to this file are just cosmetic.

Copy link
Member Author

Choose a reason for hiding this comment

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

It isn't cosmetic! Without it every config file gets the contents of the last config file. I have no clue why. I did a ton of playing with it and eventually tried out this and it works. I have no idea how this is better than the old way but it works.

I wouldn't have made the change if it were simply cosmetic.

Copy link
Member Author

Choose a reason for hiding this comment

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

I did mean to leave a note about this but I got distracted.

Copy link
Member

Choose a reason for hiding this comment

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

Ok, #18865 should fix this.

Copy link
Member Author

Choose a reason for hiding this comment

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

I'll rebase this and remove the change.

@nik9000
Copy link
Member Author

nik9000 commented May 16, 2016

@rjernst I pushed an update. I'd love to work through the ClusterFormationTask thing in another way if you've got any ideas. That took most of the time I spent on this, sadly.

@nik9000 nik9000 force-pushed the doc_tests_for_js branch 2 times, most recently from 97267d6 to 546352b Compare May 19, 2016 14:48
@nik9000
Copy link
Member Author

nik9000 commented May 19, 2016

@rjernst could you have another look? I haven't removed the groovy-ism that was required for an unknown reason.

@nik9000
Copy link
Member Author

nik9000 commented May 31, 2016

@rjernst could you have a look at this at some point? I'd love to get these under the test umbrella one day.

1 similar comment
@nik9000
Copy link
Member Author

nik9000 commented Jun 13, 2016

@rjernst could you have a look at this at some point? I'd love to get these under the test umbrella one day.

@rjernst
Copy link
Member

rjernst commented Jun 14, 2016

I looked again, and fixed the gradle integ test issue with extra config files. My concern is still about requiring every doc test to add a "wait for the cluster to be ready". This should just be part of the setup.

@nik9000
Copy link
Member Author

nik9000 commented Jun 14, 2016

My concern is still about requiring every doc test to add a "wait for the cluster to be ready". This should just be part of the setup.

  • This is already how the rest of the doc tests work.
  • We already wait for yellow between setup sections and other sections. This should just be adding it to places where we create the index and use it in the same snippet.
  • We're fixing the need for it in WIP: Index creation waits for write consistency shards #18759.
  • Without the wait for yellow you can't actually copy and paste the snippets from the browser. They fail to run.

@nik9000 nik9000 force-pushed the doc_tests_for_js branch from 546352b to 8d2c27c Compare June 14, 2016 18:13
@rjernst
Copy link
Member

rjernst commented Jun 14, 2016

This is already how the rest of the doc tests work

I did not know that. LGTM then for now. Looking forward to #18759

@nik9000
Copy link
Member Author

nik9000 commented Jun 14, 2016

Looking forward to #18759

amen

We weren't doing it before because we weren't starting the plugins.
Now we are.

The hardest part of this was handling the files the tests expect
to be on the filesystem. extraConfigFiles was broken.
@nik9000 nik9000 force-pushed the doc_tests_for_js branch from a4c4cf0 to 9c85569 Compare June 14, 2016 18:32
@nik9000 nik9000 merged commit 9c85569 into elastic:master Jun 14, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>docs General docs changes >test Issues or PRs that are addressing/adding tests v5.0.0-alpha4
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants