diff options
author | Sushant Jadhav <Sushant.Jadhav@t-systems.com> | 2023-01-12 16:16:10 +0530 |
---|---|---|
committer | sushant53 <Sushant.Jadhav@t-systems.com> | 2023-01-13 18:31:52 +0530 |
commit | b1125ecc1a211121d65b812dc85f028ad4f5fb31 (patch) | |
tree | 507becd31f583fe3dedabeedb2a6e53973407acc | |
parent | e3fce5e4f5e3a52dac07e3516e0627ab0bfdaddd (diff) |
[DCAEGEN2] Enhance a junit AppConfigTest::checkCorrectConsumerConfiguration
Change hardcoded unix-style path in the assertions
to make it OS agnostic
Issue-ID: DCAEGEN2-3324
Change-Id: I418bd9e44304d617c0eb875008f8af5826692cfa
Signed-off-by: Sushant Jadhav <Sushant.Jadhav@t-systems.com>
[DCAEGEN2] Enhance a junit AppConfigTest::checkCorrectConsumerConfiguration
Mentioned year 2023 in copyright section
Issue-ID: DCAEGEN2-3324
Change-Id: I418bd9e44304d617c0eb875008f8af5826692cfa
Signed-off-by: sushant53 <Sushant.Jadhav@t-systems.com>
-rw-r--r-- | datafile-app-server/src/test/java/org/onap/dcaegen2/collectors/datafile/configuration/AppConfigTest.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/datafile-app-server/src/test/java/org/onap/dcaegen2/collectors/datafile/configuration/AppConfigTest.java b/datafile-app-server/src/test/java/org/onap/dcaegen2/collectors/datafile/configuration/AppConfigTest.java index 3c940297..dd592433 100644 --- a/datafile-app-server/src/test/java/org/onap/dcaegen2/collectors/datafile/configuration/AppConfigTest.java +++ b/datafile-app-server/src/test/java/org/onap/dcaegen2/collectors/datafile/configuration/AppConfigTest.java @@ -2,6 +2,7 @@ * ============LICENSE_START====================================================================== * Copyright (C) 2018, 2020-2022 Nokia. All rights reserved. * Copyright (C) 2018-2019 Nordix Foundation. 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 of the License at @@ -39,6 +40,7 @@ import org.onap.dcaegen2.services.sdk.security.ssl.SecurityKeys; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; import reactor.test.StepVerifier; +import java.nio.file.Path; import java.io.ByteArrayInputStream; import java.io.IOException; @@ -291,8 +293,9 @@ class AppConfigTest { assertThat(messageRouterSubscribeRequest.sourceDefinition().topicUrl()) .isEqualTo("http://localhost:2222/events/unauthenticated.VES_NOTIFICATION_OUTPUT"); SecurityKeys securityKeys = consumerConfiguration.getMessageRouterSubscriberConfig().securityKeys(); - assertThat(securityKeys.keyStore().path().toString()).hasToString("src/test/resources/cert.jks"); - assertThat(securityKeys.trustStore().path().toString()).hasToString("src/test/resources/trust.jks"); + assertThat(securityKeys.keyStore().path().toString()).hasToString(Path.of("src", "test","resources","cert.jks").toString()); + assertThat(securityKeys.trustStore().path().toString()).hasToString(Path.of("src", "test","resources","trust.jks").toString()); + assertThat(consumerConfiguration.getMessageRouterSubscriber()).isNotNull(); } |