[DCAEGEN2]Enhance dcaegen2-services-sdk's security module JUnits 10/133310/2
authorpranitk1905 <pranit.kapdule@t-systems.com>
Fri, 17 Feb 2023 12:44:48 +0000 (18:14 +0530)
committerpranitk1905 <pranit.kapdule@t-systems.com>
Fri, 17 Feb 2023 13:13:55 +0000 (18:43 +0530)
Enhance services-sdk's security module junits to have OS agnostic path

Issue-ID: DCAEGEN2-3352
Change-Id: I7f4a1e027af48046f272b9383516a886216e5ffe
Signed-off-by: pranitk1905 <pranit.kapdule@t-systems.com>
[DCAEGEN2]Enhance dcaegen2-services-sdk's security module JUnits

Enhance services-sdk's security module junits to have OS agnostic path

Issue-ID: DCAEGEN2-3352
Change-Id: I7f4a1e027af48046f272b9383516a886216e5ffe
Signed-off-by: pranitk1905 <pranit.kapdule@t-systems.com>
Changelog.md
pom.xml
security/ssl/src/test/java/org/onap/dcaegen2/services/sdk/security/ssl/KeyStoreTypesTest.java
security/ssl/src/test/java/org/onap/dcaegen2/services/sdk/security/ssl/PasswordsTest.java
version.properties

index cde800f..155c265 100644 (file)
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
 The format is based on [Keep a Changelog](http://keepachangelog.com/)
 and this project adheres to [Semantic Versioning](http://semver.org/).
 
+## [1.9.2] - 2023/02/17
+#### Added
+      - [DCAEGEN2-3352] - Enhance services-sdk's security module JUnits to have OS agnostic path
+
 ## [1.9.1] - 2022/09/07
 ### Added
     - [DCAEGEN2-3165] (https://jira.onap.org/browse/DCAEGEN2-3165) - Fix calculation of code coverage
diff --git a/pom.xml b/pom.xml
index 95b1cab..11a26d2 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -3,6 +3,7 @@
 ============LICENSE_START=======================================================
 Copyright (c) 2022 Nokia. All rights reserved.
 Copyright (C) 2022 AT&T Intellectual Property. All rights reserved.
+Copyright (c) 2023 Deutsche Telekom AG. All rights reserved.
 ================================================================================
 Licensed under the Apache License, Version 2.0 (the "License"); you may not
 use this file except in compliance with the License. You may obtain a copy
@@ -96,7 +97,7 @@ language governing permissions and limitations under the License.
         <sonar.coverage.jacoco.xmlReportPaths>
             ${project.reporting.outputDirectory}/jacoco-ut/jacoco.xml
         </sonar.coverage.jacoco.xmlReportPaths>
-        <revision>1.9.1-SNAPSHOT</revision>
+        <revision>1.9.2-SNAPSHOT</revision>
     </properties>
 
     <modules>
index ab2aa77..6c9cd88 100644 (file)
@@ -3,6 +3,7 @@
  * DCAEGEN2-SERVICES-SDK
  * =========================================================
  * Copyright (C) 2019 Nokia. All rights reserved.
+ * Copyright (c) 2023 Deutsche Telekom AG. All rights reserved.
  * =========================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -23,6 +24,8 @@ package org.onap.dcaegen2.services.sdk.security.ssl;
 import static org.assertj.core.api.Assertions.assertThat;
 
 import io.vavr.control.Option;
+
+import java.io.File;
 import java.nio.file.Path;
 import java.nio.file.Paths;
 import org.junit.jupiter.api.Test;
@@ -70,7 +73,7 @@ class KeyStoreTypesTest {
     }
 
     private Option<String> callGuessTypeWithFileName(String fileName) {
-        final Path path = Paths.get("/", "tmp", fileName);
+        final Path path = Paths.get(File.listRoots()[0].toString(), "tmp", fileName);
         return KeyStoreTypes.inferTypeFromExtension(path);
     }
-}
\ No newline at end of file
+}
index 13d7f21..271f2d4 100644 (file)
@@ -3,6 +3,7 @@
  * DCAEGEN2-SERVICES-SDK
  * =========================================================
  * Copyright (C) 2019 Nokia. All rights reserved.
+ * Copyright (c) 2023 Deutsche Telekom AG. All rights reserved.
  * =========================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -102,7 +103,7 @@ class PasswordsTest {
     @Test
     void fromPath_shouldFail_whenNotFound() {
         // given
-        final Path path = Paths.get("/", UUID.randomUUID().toString());
+        final Path path = Paths.get(File.listRoots()[0].toString(), UUID.randomUUID().toString());
 
         // when
         Assertions.assertThrows(ReadingPasswordFromFileException.class, () -> {
@@ -126,4 +127,4 @@ class PasswordsTest {
     private String extractPassword(Password pass) {
         return pass.use(String::new);
     }
-}
\ No newline at end of file
+}
index e31b2de..aede13c 100644 (file)
@@ -1,6 +1,6 @@
 major=1
 minor=9
-patch=1
+patch=2
 base_version=${major}.${minor}.${patch}
 release_version=${base_version}
 snapshot_version=${base_version}-SNAPSHOT