From 53ee6272b625c8984c792b9c6bb6e61416ed5ed6 Mon Sep 17 00:00:00 2001 From: pranitk1905 Date: Fri, 17 Feb 2023 18:14:48 +0530 Subject: [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 [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 --- Changelog.md | 4 ++++ pom.xml | 3 ++- .../onap/dcaegen2/services/sdk/security/ssl/KeyStoreTypesTest.java | 7 +++++-- .../org/onap/dcaegen2/services/sdk/security/ssl/PasswordsTest.java | 5 +++-- version.properties | 2 +- 5 files changed, 15 insertions(+), 6 deletions(-) diff --git a/Changelog.md b/Changelog.md index cde800f8..155c2658 100644 --- a/Changelog.md +++ b/Changelog.md @@ -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 95b1cabd..11a26d2a 100644 --- 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. ${project.reporting.outputDirectory}/jacoco-ut/jacoco.xml - 1.9.1-SNAPSHOT + 1.9.2-SNAPSHOT diff --git a/security/ssl/src/test/java/org/onap/dcaegen2/services/sdk/security/ssl/KeyStoreTypesTest.java b/security/ssl/src/test/java/org/onap/dcaegen2/services/sdk/security/ssl/KeyStoreTypesTest.java index ab2aa773..6c9cd889 100644 --- a/security/ssl/src/test/java/org/onap/dcaegen2/services/sdk/security/ssl/KeyStoreTypesTest.java +++ b/security/ssl/src/test/java/org/onap/dcaegen2/services/sdk/security/ssl/KeyStoreTypesTest.java @@ -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 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 +} diff --git a/security/ssl/src/test/java/org/onap/dcaegen2/services/sdk/security/ssl/PasswordsTest.java b/security/ssl/src/test/java/org/onap/dcaegen2/services/sdk/security/ssl/PasswordsTest.java index 13d7f213..271f2d48 100644 --- a/security/ssl/src/test/java/org/onap/dcaegen2/services/sdk/security/ssl/PasswordsTest.java +++ b/security/ssl/src/test/java/org/onap/dcaegen2/services/sdk/security/ssl/PasswordsTest.java @@ -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 +} diff --git a/version.properties b/version.properties index e31b2def..aede13cb 100644 --- a/version.properties +++ b/version.properties @@ -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 -- cgit 1.2.3-korg