Setup keystore during integration tests#22966
Conversation
|
this LGTM in general but I'd like to see a test using it even if it's just for the f*** of it. |
rjernst
left a comment
There was a problem hiding this comment.
This looks good, I left some suggestions on naming.
| } | ||
|
|
||
| /** Adds a task to create keystore */ | ||
| static Task configureCreateKeyStoreTask(String name, Project project, Task setup, NodeInfo node) { |
There was a problem hiding this comment.
Can you make this a no-op when the keystoreSettings are empty?
|
|
||
| Map<String, Object> settings = new HashMap<>() | ||
|
|
||
| Map<String, String> keyStoreSetting = new HashMap<>() |
There was a problem hiding this comment.
plural please? Also, just for consistency with the code in ES, can we use all lower case for keystore, so keystoreSettings?
| } | ||
| } | ||
|
|
||
| /** Adds tasks to add to keystore */ |
There was a problem hiding this comment.
"to add settings to the keystore"
| } | ||
|
|
||
| /** Adds tasks to add to keystore */ | ||
| static Task configureAddKeyStoreTasks(Task parent, Project project, Task setup, NodeInfo node) { |
There was a problem hiding this comment.
Maybe call this configureAddKeystoreSettingTasks
| /** Adds a task to create keystore */ | ||
| static Task configureCreateKeyStoreTask(String name, Project project, Task setup, NodeInfo node) { | ||
| File esKeyStoreUtil = Paths.get(node.homeDir.toString(), "bin/" + "elasticsearch-keystore").toFile() | ||
| Task createKeyStore = project.tasks.create(name: name, type: LoggedExec, dependsOn: setup) { |
There was a problem hiding this comment.
One more thing: you should use configureExecTask so this will work correctly on windows.
|
Thanks. I had been waiting for CI to be up and to test it again. And it just passed, so I am merging this. |
* master: Fix typo in allocation explain API docs Add unit tests for ReverseNestedAggregator (elastic#23651) Revert "Revert "Build: Upgrade min gradle to 3.3 (elastic#23544)"" Revert "Build: Upgrade min gradle to 3.3 (elastic#23544)" Build: Upgrade min gradle to 3.3 (elastic#23544) Fix took assertion in response filter test Search took time should use a relative clock Adds toString() to snapshot operations in progress Docs: fix a typo in transport client's put-mapping.asciidoc (elastic#23607) Use include-tagged macro for high level client docs (elastic#23438) Update fill-column in .dir-locals.el to 100 characters Setup keystore during integration tests (elastic#22966) Fix typo 'Elastisearch' -> 'Elasticsearch' (elastic#23633) Comment and blank line cleanups (elastic#23647) docs: guidelines for students and teachers (elastic#23648) Fix MapperService StackOverflowError (elastic#23605)
This commit creates a keystore and adds settings to it during the cluster formation for integration tests. Users can define a `keyStoreSetting` in build files for settings that need to be placed in the keystore.
This commit creates a keystore and adds settings to it during the
cluster formation for integration tests. Users can define a
keyStoreSettingin build files for settings that need to be placed inthe keystore.