-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good, I left some suggestions on naming.
@@ -306,6 +309,32 @@ class ClusterFormationTasks { | |||
} | |||
} | |||
|
|||
/** Adds a task to create keystore */ | |||
static Task configureCreateKeyStoreTask(String name, Project project, Task setup, NodeInfo node) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you make this a no-op when the keystoreSettings
are empty?
@@ -125,6 +125,8 @@ class ClusterConfiguration { | |||
|
|||
Map<String, Object> settings = new HashMap<>() | |||
|
|||
Map<String, String> keyStoreSetting = new HashMap<>() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One more thing: you should use configureExecTask
so this will work correctly on windows.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
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
keyStoreSetting
in build files for settings that need to be placed inthe keystore.