diff options
author | 2023-05-08 18:17:03 +0100 | |
---|---|---|
committer | 2023-06-13 18:56:19 +0100 | |
commit | ac4baf28eab0a4412810f02237b981933c985e95 (patch) | |
tree | c9fc3c3a6c35e5481b261ff2acc912bdf708fa12 /sdc-distribution-client/src/test/java/org/onap/sdc/utils | |
parent | 289c0ceb2b3b0565ae19014a4cfa06a1bf10ccc3 (diff) |
[SDC-DISTRO-CLIENT] SSL config updates
Signed-off-by: efiacor <fiachra.corcoran@est.tech>
Change-Id: Iacaf5072241e56bf72db13acef0f533814ae8989
Issue-ID: SDC-4476
Diffstat (limited to 'sdc-distribution-client/src/test/java/org/onap/sdc/utils')
3 files changed, 19 insertions, 7 deletions
diff --git a/sdc-distribution-client/src/test/java/org/onap/sdc/utils/KafkaCommonConfigTest.java b/sdc-distribution-client/src/test/java/org/onap/sdc/utils/KafkaCommonConfigTest.java index 36730b5..a60a785 100644 --- a/sdc-distribution-client/src/test/java/org/onap/sdc/utils/KafkaCommonConfigTest.java +++ b/sdc-distribution-client/src/test/java/org/onap/sdc/utils/KafkaCommonConfigTest.java @@ -35,8 +35,7 @@ public class KafkaCommonConfigTest { @Test public void testConsumerPropertiesNoSSL(){ - List<String> msgBusAddress = new ArrayList<>(); - msgBusAddress.add("address1"); + String msgBusAddress = "address1"; testConfigNoSSL.setMsgBusAddress(msgBusAddress); KafkaCommonConfig kafkaCommonConfig = new KafkaCommonConfig(testConfigNoSSL); Properties consumerProperties = kafkaCommonConfig.getConsumerProperties(); @@ -45,8 +44,7 @@ public class KafkaCommonConfigTest { @Test public void testProducerPropertiesWithSSL(){ - List<String> msgBusAddress = new ArrayList<>(); - msgBusAddress.add("address1"); + String msgBusAddress = "address1"; testConfigWithSSL.setMsgBusAddress(msgBusAddress); KafkaCommonConfig kafkaCommonConfig = new KafkaCommonConfig(testConfigWithSSL); Properties consumerProperties = kafkaCommonConfig.getProducerProperties(); diff --git a/sdc-distribution-client/src/test/java/org/onap/sdc/utils/SdcKafkaTest.java b/sdc-distribution-client/src/test/java/org/onap/sdc/utils/SdcKafkaTest.java index c0c60a8..a4d348c 100644 --- a/sdc-distribution-client/src/test/java/org/onap/sdc/utils/SdcKafkaTest.java +++ b/sdc-distribution-client/src/test/java/org/onap/sdc/utils/SdcKafkaTest.java @@ -57,7 +57,7 @@ class SdcKafkaTest { startKafkaService(); KafkaTestUtils utils = new KafkaTestUtils(kafkaTestCluster); utils.createTopic(topicName, 1, (short) 1); - configuration.setMsgBusAddress(Collections.singletonList(kafkaTestCluster.getKafkaConnectString())); + configuration.setMsgBusAddress(kafkaTestCluster.getKafkaConnectString()); } @AfterAll diff --git a/sdc-distribution-client/src/test/java/org/onap/sdc/utils/TestConfiguration.java b/sdc-distribution-client/src/test/java/org/onap/sdc/utils/TestConfiguration.java index a132cd0..b75d231 100644 --- a/sdc-distribution-client/src/test/java/org/onap/sdc/utils/TestConfiguration.java +++ b/sdc-distribution-client/src/test/java/org/onap/sdc/utils/TestConfiguration.java @@ -42,6 +42,8 @@ public class TestConfiguration implements IConfiguration { private final int kafkaConsumerSessionTimeout; private String keyStorePath; private String keyStorePassword; + private String trustStorePath; + private String trustStorePassword; private boolean activateServerTLSAuth; private boolean isFilterInEmptyResources; private boolean useHttpsWithSDC; @@ -66,8 +68,10 @@ public class TestConfiguration implements IConfiguration { this.relevantArtifactTypes = new ArrayList<>(); this.relevantArtifactTypes.add(ArtifactTypeEnum.HEAT.name()); this.user = "mso-user"; - this.keyStorePath = "etc/sdc-client.jks"; - this.keyStorePassword = "Aa123456"; + this.keyStorePath = "src/test/resources/etc/sdc-user-keystore.jks"; + this.keyStorePassword = "zreRDCnNLsZ7"; + this.trustStorePath = "src/test/resources/etc/sdc-user-truststore.jks"; + this.trustStorePassword = "changeit"; this.activateServerTLSAuth = true; this.isFilterInEmptyResources = false; this.useHttpsWithSDC = true; @@ -155,6 +159,16 @@ public class TestConfiguration implements IConfiguration { return keyStorePassword; } + @Override + public String getTrustStorePath() { + return trustStorePath; + } + + @Override + public String getTrustStorePassword() { + return trustStorePassword; + } + public String getConsumerID() { return consumerID; } |