diff options
author | 2021-07-02 09:49:20 +0200 | |
---|---|---|
committer | 2021-07-14 09:16:13 +0200 | |
commit | 2cdaccb63c0f01b42ca1b83749ee42b537620919 (patch) | |
tree | 96588d7c83da6dee722911eaf03df0c5cd586eb3 /certService/src/test/java/org | |
parent | 78b60d22b8779d1fbf3e27287b9774862f71404b (diff) |
[OOM-CERT-SERVICE] Remove CaMode from Cmpv2Server configuration
Issue-ID: OOM-2753
Signed-off-by: Remigiusz Janeczek <remigiusz.janeczek@nokia.com>
Change-Id: I10662551a315a0b38b1213513d07ab2a4ccf5326
Diffstat (limited to 'certService/src/test/java/org')
4 files changed, 4 insertions, 23 deletions
diff --git a/certService/src/test/java/org/onap/oom/certservice/certification/configuration/CmpServersConfigLoaderTest.java b/certService/src/test/java/org/onap/oom/certservice/certification/configuration/CmpServersConfigLoaderTest.java index 98932d0c..1d6d177f 100644 --- a/certService/src/test/java/org/onap/oom/certservice/certification/configuration/CmpServersConfigLoaderTest.java +++ b/certService/src/test/java/org/onap/oom/certservice/certification/configuration/CmpServersConfigLoaderTest.java @@ -1,6 +1,6 @@ /* * ============LICENSE_START======================================================= - * PROJECT + * Cert Service * ================================================================================ * Copyright (C) 2020-2021 Nokia. All rights reserved. * ================================================================================ @@ -45,7 +45,6 @@ class CmpServersConfigLoaderTest { "CA_NAME", "TEST", "URL", "http://127.0.0.1/ejbca/publicweb/cmp/cmp", "ISSUER_DN", "CN=ManagementCA", - "CA_MODE", "CLIENT", "IAK", "xxx", "RV", "yyy" ); @@ -53,7 +52,6 @@ class CmpServersConfigLoaderTest { "CA_NAME", "TEST2", "URL", "http://127.0.0.1/ejbca/publicweb/cmp/cmpRA", "ISSUER_DN", "CN=ManagementCA2", - "CA_MODE", "RA", "IAK", "xxx", "RV", "yyy" ); @@ -111,7 +109,6 @@ class CmpServersConfigLoaderTest { assertThat(cmpv2Server.getCaName()).isEqualTo(expected.get("CA_NAME")); assertThat(cmpv2Server.getUrl()).isEqualTo(expected.get("URL")); assertThat(cmpv2Server.getIssuerDN()).hasToString(expected.get("ISSUER_DN")); - assertThat(cmpv2Server.getCaMode().name()).isEqualTo(expected.get("CA_MODE")); assertThat(cmpv2Server.getAuthentication().getIak()).isEqualTo(expected.get("IAK")); assertThat(cmpv2Server.getAuthentication().getRv()).isEqualTo(expected.get("RV")); } diff --git a/certService/src/test/java/org/onap/oom/certservice/certification/configuration/CmpServersConfigTest.java b/certService/src/test/java/org/onap/oom/certservice/certification/configuration/CmpServersConfigTest.java index e938fdde..fe325241 100644 --- a/certService/src/test/java/org/onap/oom/certservice/certification/configuration/CmpServersConfigTest.java +++ b/certService/src/test/java/org/onap/oom/certservice/certification/configuration/CmpServersConfigTest.java @@ -35,7 +35,6 @@ import org.mockito.Mock; import org.mockito.Mockito; import org.mockito.junit.jupiter.MockitoExtension; import org.onap.oom.certservice.certification.configuration.model.Authentication; -import org.onap.oom.certservice.certification.configuration.model.CaMode; import org.onap.oom.certservice.certification.configuration.model.Cmpv2Server; @ExtendWith(MockitoExtension.class) @@ -218,7 +217,6 @@ class CmpServersConfigTest { testAuthentication1.setIak("testIak"); testAuthentication1.setRv("testRv"); testServer1.setAuthentication(testAuthentication1); - testServer1.setCaMode(CaMode.RA); Cmpv2Server testServer2 = new Cmpv2Server(); testServer2.setCaName("TEST_CA2"); @@ -228,7 +226,6 @@ class CmpServersConfigTest { testAuthentication2.setIak("test2Iak"); testAuthentication2.setRv("test2Rv"); testServer2.setAuthentication(testAuthentication2); - testServer2.setCaMode(CaMode.CLIENT); return List.of(testServer1, testServer2); } diff --git a/certService/src/test/java/org/onap/oom/certservice/certification/configuration/Cmpv2ServerProviderTest.java b/certService/src/test/java/org/onap/oom/certservice/certification/configuration/Cmpv2ServerProviderTest.java index dc6de3ba..9e0982aa 100644 --- a/certService/src/test/java/org/onap/oom/certservice/certification/configuration/Cmpv2ServerProviderTest.java +++ b/certService/src/test/java/org/onap/oom/certservice/certification/configuration/Cmpv2ServerProviderTest.java @@ -27,7 +27,6 @@ import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; import org.onap.oom.certservice.certification.configuration.model.Authentication; -import org.onap.oom.certservice.certification.configuration.model.CaMode; import org.onap.oom.certservice.certification.configuration.model.Cmpv2Server; import org.onap.oom.certservice.certification.exception.Cmpv2ServerNotFoundException; @@ -93,7 +92,6 @@ class Cmpv2ServerProviderTest { testAuthentication.setIak("testIak"); testAuthentication.setRv("testRv"); testServer.setAuthentication(testAuthentication); - testServer.setCaMode(CaMode.RA); return testServer; } diff --git a/certService/src/test/java/org/onap/oom/certservice/certification/configuration/validation/Cmpv2ServersConfigurationValidatorTest.java b/certService/src/test/java/org/onap/oom/certservice/certification/configuration/validation/Cmpv2ServersConfigurationValidatorTest.java index b07c9035..e943d8fe 100644 --- a/certService/src/test/java/org/onap/oom/certservice/certification/configuration/validation/Cmpv2ServersConfigurationValidatorTest.java +++ b/certService/src/test/java/org/onap/oom/certservice/certification/configuration/validation/Cmpv2ServersConfigurationValidatorTest.java @@ -1,8 +1,8 @@ /* * ============LICENSE_START======================================================= - * PROJECT + * Cert Service * ================================================================================ - * Copyright (C) 2020 Nokia. All rights reserved. + * Copyright (C) 2020-2021 Nokia. 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. @@ -27,7 +27,6 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.onap.oom.certservice.CertServiceApplication; import org.onap.oom.certservice.certification.configuration.model.Authentication; -import org.onap.oom.certservice.certification.configuration.model.CaMode; import org.onap.oom.certservice.certification.configuration.model.Cmpv2Server; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; @@ -141,15 +140,6 @@ class Cmpv2ServersConfigurationValidatorTest { } @Test - void shouldThrowExceptionWhenCaModeIsNull() { - // Given - server.setCaMode(null); - - // Then - assertExceptionIsThrown(); - } - - @Test void shouldThrowExceptionWhenUrlIsNull() { // Given server.setUrl(null); @@ -197,7 +187,6 @@ class Cmpv2ServersConfigurationValidatorTest { private void setServerConfiguration() { server = new Cmpv2Server(); - server.setCaMode(CaMode.CLIENT); server.setCaName("TEST"); server.setIssuerDN(new X500Name("CN=ManagementCA")); server.setUrl("http://127.0.0.1/ejbca/publicweb/cmp/cmp"); @@ -210,4 +199,4 @@ class Cmpv2ServersConfigurationValidatorTest { authentication.setIak("testIAK"); } -}
\ No newline at end of file +} |