Skip to content

Commit

Permalink
Changed esHome on osPathHome
Browse files Browse the repository at this point in the history
Signed-off-by: Andrey Pleskach <ples@aiven.io>
  • Loading branch information
willyborankin committed Sep 10, 2024
1 parent bab9c81 commit 1522049
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,13 @@ public class OpenSearchSecuritySSLPluginTest extends AbstractSecurityUnitTest {
private SecureTransportSettingsProvider secureTransportSettingsProvider;
private ClusterSettings clusterSettings;

private Path esFolder;
private Path osPathHome;

@Before
public void setUp() {
esFolder = FileHelper.getAbsoluteFilePathFromClassPath("ssl/kirk-keystore.jks").getParent().getParent();
osPathHome = FileHelper.getAbsoluteFilePathFromClassPath("ssl/kirk-keystore.jks").getParent().getParent();
settings = Settings.builder()
.put(Environment.PATH_HOME_SETTING.getKey(), esFolder)
.put(Environment.PATH_HOME_SETTING.getKey(), osPathHome)
.put(
SSLConfigConstants.SECURITY_SSL_TRANSPORT_KEYSTORE_FILEPATH,
FileHelper.getAbsoluteFilePathFromClassPath("ssl/kirk-keystore.jks")
Expand Down Expand Up @@ -118,7 +118,7 @@ public Optional<SSLEngine> buildSecureHttpServerEngine(Settings settings, HttpSe

@Test
public void testRegisterSecureHttpTransport() throws IOException {
try (OpenSearchSecuritySSLPlugin plugin = new OpenSearchSecuritySSLPlugin(settings, esFolder, false)) {
try (OpenSearchSecuritySSLPlugin plugin = new OpenSearchSecuritySSLPlugin(settings, osPathHome, false)) {
final Map<String, Supplier<HttpServerTransport>> transports = plugin.getSecureHttpTransports(
settings,
MOCK_POOL,
Expand All @@ -142,7 +142,7 @@ public void testRegisterSecureHttpTransport() throws IOException {

@Test
public void testRegisterSecureTransport() throws IOException {
try (OpenSearchSecuritySSLPlugin plugin = new OpenSearchSecuritySSLPlugin(settings, esFolder, false)) {
try (OpenSearchSecuritySSLPlugin plugin = new OpenSearchSecuritySSLPlugin(settings, osPathHome, false)) {
final Map<String, Supplier<Transport>> transports = plugin.getSecureTransports(
settings,
MOCK_POOL,
Expand All @@ -167,7 +167,7 @@ public void testRegisterSecureTransportWithDeprecatedSecuirtyPluginSettings() th
.put(SSLConfigConstants.SECURITY_SSL_TRANSPORT_ENFORCE_HOSTNAME_VERIFICATION, false)
.build();

try (OpenSearchSecuritySSLPlugin plugin = new OpenSearchSecuritySSLPlugin(deprecated, esFolder, false)) {
try (OpenSearchSecuritySSLPlugin plugin = new OpenSearchSecuritySSLPlugin(deprecated, osPathHome, false)) {
final Map<String, Supplier<Transport>> transports = plugin.getSecureTransports(
deprecated,
MOCK_POOL,
Expand All @@ -192,7 +192,7 @@ public void testRegisterSecureTransportWithNetworkModuleSettings() throws IOExce
.put(NetworkModule.TRANSPORT_SSL_ENFORCE_HOSTNAME_VERIFICATION_KEY, false)
.build();

try (OpenSearchSecuritySSLPlugin plugin = new OpenSearchSecuritySSLPlugin(migrated, esFolder, false)) {
try (OpenSearchSecuritySSLPlugin plugin = new OpenSearchSecuritySSLPlugin(migrated, osPathHome, false)) {
final Map<String, Supplier<Transport>> transports = plugin.getSecureTransports(
migrated,
MOCK_POOL,
Expand Down Expand Up @@ -231,7 +231,7 @@ public void testRegisterSecureTransportWithDuplicateSettings() throws IOExceptio
.put(NetworkModule.TRANSPORT_SSL_ENFORCE_HOSTNAME_VERIFICATION_KEY, false)
.build();

try (OpenSearchSecuritySSLPlugin plugin = new OpenSearchSecuritySSLPlugin(migrated, esFolder, false)) {
try (OpenSearchSecuritySSLPlugin plugin = new OpenSearchSecuritySSLPlugin(migrated, osPathHome, false)) {
final Map<String, Supplier<Transport>> transports = plugin.getSecureTransports(
migrated,
MOCK_POOL,
Expand Down

0 comments on commit 1522049

Please sign in to comment.