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

Updates demo script to execute with bundled jdk #3777

Merged
Show file tree
Hide file tree
Changes from 28 commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
4ed4427
Initial commit to add tests
DarshitChanpura Nov 15, 2023
c7a399c
Added unit tests for Installer class
DarshitChanpura Nov 28, 2023
b0ac474
Adds tests for SecuritySettingsConfigurer class and modifies relevant…
DarshitChanpura Nov 30, 2023
b55b8a6
Adds tests for CertificateGenerator class
DarshitChanpura Nov 30, 2023
2cc8ba4
Adds missing license headers
DarshitChanpura Nov 30, 2023
2c54f63
Adds integration tests to valid demo config script against a remote c…
DarshitChanpura Nov 30, 2023
50c67bb
Upddates line end characters to use System.lineSeparator()
DarshitChanpura Nov 30, 2023
c91394b
Adds a common certificate validity check
DarshitChanpura Nov 30, 2023
1333181
Fixes java path configuration to pick up bundled jdk when java home i…
DarshitChanpura Dec 1, 2023
daad144
Fixes 1 of 2 broken windows tests
DarshitChanpura Dec 1, 2023
92c0de3
Fixes 2 of 2 broken windows tests
DarshitChanpura Dec 1, 2023
7405d91
Updates resetState to reset OS to actual value
DarshitChanpura Dec 1, 2023
3282329
Fixes codehygiene check
DarshitChanpura Dec 1, 2023
3754512
Fixes issue with shell script while using bundled jdk to execute the …
DarshitChanpura Dec 1, 2023
1dcd596
Fixes issue with batch script while using bundled jdk to execute the …
DarshitChanpura Dec 1, 2023
10c866b
Fixes demo certificate validator tests
DarshitChanpura Dec 1, 2023
b1f9975
Fixes broken windows tests
DarshitChanpura Dec 3, 2023
9be4484
Updates setgings writer to use snakeyaml
DarshitChanpura Dec 4, 2023
473b1ea
Rewrite the whole tool to use singleton pattern
DarshitChanpura Dec 4, 2023
064ca1c
Refactors certificate generator to use string join for EOL separator
DarshitChanpura Dec 5, 2023
8381635
Merge branch 'main' into demo-config-java-tool-tests
DarshitChanpura Dec 5, 2023
e66fc26
Script no longer generates password if one is not supplied. Instead t…
DarshitChanpura Dec 6, 2023
e96410c
Fixes correct opensearch version when displaying the log
DarshitChanpura Dec 7, 2023
4e83fe7
Removes tests from this branch to create a separate PR
DarshitChanpura Dec 7, 2023
6c6e80f
Removes 'this' reference to Installer
DarshitChanpura Dec 8, 2023
5c675e5
Uses Options class to build the options supported by tool
DarshitChanpura Dec 11, 2023
5fbfdad
Adds a brief comment to explain addition of jvmArg while testing
DarshitChanpura Dec 12, 2023
76d487c
Adds more comments
DarshitChanpura Dec 12, 2023
a1cfa75
Updates the way keys are looked up in yaml file
DarshitChanpura Dec 12, 2023
b0870a4
Renames a method
DarshitChanpura Dec 12, 2023
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
4 changes: 4 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,8 @@ test {
jvmArgs += "-Xmx3072m"
if (JavaVersion.current() > JavaVersion.VERSION_1_8) {
jvmArgs += "--add-opens=java.base/java.io=ALL-UNNAMED"
// this is needed to reflect access system env map.
jvmArgs += "--add-opens=java.base/java.util=ALL-UNNAMED"
DarshitChanpura marked this conversation as resolved.
Show resolved Hide resolved
}
retry {
failOnPassedAfterRetry = false
Expand Down Expand Up @@ -303,6 +305,8 @@ def setCommonTestConfig(Test task) {
task.jvmArgs += "-Xmx3072m"
if (JavaVersion.current() > JavaVersion.VERSION_1_8) {
task.jvmArgs += "--add-opens=java.base/java.io=ALL-UNNAMED"
// this is needed to reflect access system env map.
task.jvmArgs += "--add-opens=java.base/java.util=ALL-UNNAMED"
}
task.retry {
failOnPassedAfterRetry = false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,20 @@
/**
* This class creates demo certificate files
*/
public class CertificateGenerator extends Installer {
public class CertificateGenerator {

private final Installer installer;

public CertificateGenerator(Installer installer) {
this.installer = installer;
}

/**
* Creates demo super-admin, node and root certificates by iterating through Certificates enum
*/
public void createDemoCertificates() {
for (Certificates cert : Certificates.values()) {
String filePath = OPENSEARCH_CONF_DIR + File.separator + cert.getFileName();
String filePath = this.installer.OPENSEARCH_CONF_DIR + File.separator + cert.getFileName();
writeCertificateToFile(filePath, cert.getContent());
}
}
Expand Down
DarshitChanpura marked this conversation as resolved.
Show resolved Hide resolved

Large diffs are not rendered by default.

Loading
Loading