diff options
Diffstat (limited to 'certService/src/test')
-rw-r--r-- | certService/src/test/java/org/onap/aaf/certservice/cmpv2client/external/RdnTest.java | 96 | ||||
-rw-r--r-- | certService/src/test/java/org/onap/oom/certservice/CertServiceApplicationTests.java (renamed from certService/src/test/java/org/onap/aaf/certservice/CertServiceApplicationTests.java) | 2 | ||||
-rw-r--r-- | certService/src/test/java/org/onap/oom/certservice/api/CertificationControllerTest.java (renamed from certService/src/test/java/org/onap/aaf/certservice/api/CertificationControllerTest.java) | 18 | ||||
-rw-r--r-- | certService/src/test/java/org/onap/oom/certservice/api/ReadinessControllerTest.java (renamed from certService/src/test/java/org/onap/aaf/certservice/api/ReadinessControllerTest.java) | 4 | ||||
-rw-r--r-- | certService/src/test/java/org/onap/oom/certservice/api/ReloadConfigControllerTest.java (renamed from certService/src/test/java/org/onap/aaf/certservice/api/ReloadConfigControllerTest.java) | 6 | ||||
-rw-r--r-- | certService/src/test/java/org/onap/oom/certservice/api/advice/CertificationExceptionAdviceTest.java (renamed from certService/src/test/java/org/onap/aaf/certservice/api/advice/CertificationExceptionAdviceTest.java) | 14 | ||||
-rw-r--r-- | certService/src/test/java/org/onap/oom/certservice/api/advice/ReloadConfigExceptionAdviceTest.java (renamed from certService/src/test/java/org/onap/aaf/certservice/api/advice/ReloadConfigExceptionAdviceTest.java) | 4 | ||||
-rw-r--r-- | certService/src/test/java/org/onap/oom/certservice/certification/CertificationModelFactoryTest.java (renamed from certService/src/test/java/org/onap/aaf/certservice/certification/CertificationModelFactoryTest.java) | 36 | ||||
-rw-r--r-- | certService/src/test/java/org/onap/oom/certservice/certification/CertificationProviderTest.java (renamed from certService/src/test/java/org/onap/aaf/certservice/certification/CertificationProviderTest.java) | 16 | ||||
-rw-r--r-- | certService/src/test/java/org/onap/oom/certservice/certification/CsrModelFactoryTest.java (renamed from certService/src/test/java/org/onap/aaf/certservice/certification/CsrModelFactoryTest.java) | 20 | ||||
-rw-r--r-- | certService/src/test/java/org/onap/oom/certservice/certification/PemObjectFactoryTest.java (renamed from certService/src/test/java/org/onap/aaf/certservice/certification/PemObjectFactoryTest.java) | 10 | ||||
-rw-r--r-- | certService/src/test/java/org/onap/oom/certservice/certification/RsaContentSignerBuilderTest.java (renamed from certService/src/test/java/org/onap/aaf/certservice/certification/RsaContentSignerBuilderTest.java) | 10 | ||||
-rw-r--r-- | certService/src/test/java/org/onap/oom/certservice/certification/TestData.java (renamed from certService/src/test/java/org/onap/aaf/certservice/certification/TestData.java) | 2 | ||||
-rw-r--r-- | certService/src/test/java/org/onap/oom/certservice/certification/TestUtils.java (renamed from certService/src/test/java/org/onap/aaf/certservice/certification/TestUtils.java) | 12 | ||||
-rw-r--r-- | certService/src/test/java/org/onap/oom/certservice/certification/X509CertificateBuilderTest.java (renamed from certService/src/test/java/org/onap/aaf/certservice/certification/X509CertificateBuilderTest.java) | 8 | ||||
-rw-r--r-- | certService/src/test/java/org/onap/oom/certservice/certification/configuration/CmpServersConfigLoaderTest.java (renamed from certService/src/test/java/org/onap/aaf/certservice/certification/configuration/CmpServersConfigLoaderTest.java) | 6 | ||||
-rw-r--r-- | certService/src/test/java/org/onap/oom/certservice/certification/configuration/CmpServersConfigTest.java (renamed from certService/src/test/java/org/onap/aaf/certservice/certification/configuration/CmpServersConfigTest.java) | 8 | ||||
-rw-r--r-- | certService/src/test/java/org/onap/oom/certservice/certification/configuration/Cmpv2ServerProviderTest.java (renamed from certService/src/test/java/org/onap/aaf/certservice/certification/configuration/Cmpv2ServerProviderTest.java) | 10 | ||||
-rw-r--r-- | certService/src/test/java/org/onap/oom/certservice/certification/configuration/validation/Cmpv2ServersConfigurationValidatorTest.java (renamed from certService/src/test/java/org/onap/aaf/certservice/certification/configuration/validation/Cmpv2ServersConfigurationValidatorTest.java) | 10 | ||||
-rw-r--r-- | certService/src/test/java/org/onap/oom/certservice/certification/configuration/validation/constraints/Cmpv2UrlValidatorTest.java (renamed from certService/src/test/java/org/onap/aaf/certservice/certification/configuration/validation/constraints/Cmpv2UrlValidatorTest.java) | 2 | ||||
-rw-r--r-- | certService/src/test/java/org/onap/oom/certservice/certification/configuration/validation/constraints/violations/PortNumberViolationTest.java (renamed from certService/src/test/java/org/onap/aaf/certservice/certification/configuration/validation/constraints/violations/PortNumberViolationTest.java) | 2 | ||||
-rw-r--r-- | certService/src/test/java/org/onap/oom/certservice/certification/configuration/validation/constraints/violations/RequestTypeViolationTest.java (renamed from certService/src/test/java/org/onap/aaf/certservice/certification/configuration/validation/constraints/violations/RequestTypeViolationTest.java) | 2 | ||||
-rw-r--r-- | certService/src/test/java/org/onap/oom/certservice/certification/model/CsrModelTest.java (renamed from certService/src/test/java/org/onap/aaf/certservice/certification/model/CsrModelTest.java) | 18 | ||||
-rw-r--r-- | certService/src/test/java/org/onap/oom/certservice/cmpv2client/Cmpv2ClientTest.java (renamed from certService/src/test/java/org/onap/aaf/certservice/cmpv2client/Cmpv2ClientTest.java) | 14 | ||||
-rw-r--r-- | certService/src/test/java/org/onap/oom/certservice/cmpv2client/impl/CmpResponseHelperTest.java (renamed from certService/src/test/java/org/onap/aaf/certservice/cmpv2client/impl/CmpResponseHelperTest.java) | 6 | ||||
-rw-r--r-- | certService/src/test/resources/application.properties | 6 |
26 files changed, 123 insertions, 219 deletions
diff --git a/certService/src/test/java/org/onap/aaf/certservice/cmpv2client/external/RdnTest.java b/certService/src/test/java/org/onap/aaf/certservice/cmpv2client/external/RdnTest.java deleted file mode 100644 index 6e42afe8..00000000 --- a/certService/src/test/java/org/onap/aaf/certservice/cmpv2client/external/RdnTest.java +++ /dev/null @@ -1,96 +0,0 @@ -/* - * ============LICENSE_START======================================================= - * PROJECT - * ================================================================================ - * Copyright (C) 2020 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.onap.aaf.certservice.cmpv2client.external; - -import org.bouncycastle.asn1.ASN1ObjectIdentifier; -import org.bouncycastle.asn1.x500.style.BCStyle; -import org.bouncycastle.cert.CertException; -import org.junit.jupiter.api.Test; - -import java.util.Arrays; -import java.util.List; - -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertThrows; - -class RdnTest { - - @Test - void shouldCreateCorrectRdn() throws CertException { - // given - final String expectedValue = "ManagmentCA"; - final ASN1ObjectIdentifier expectedAoi = BCStyle.CN; - - //when - Rdn rdn1 = new Rdn("CN=ManagmentCA"); - Rdn rdn2 = new Rdn("CN = ManagmentCA "); - Rdn rdn3 = new Rdn("CN", "ManagmentCA"); - - //then - assertEquals(expectedValue, rdn1.getValue()); - assertEquals(expectedValue, rdn2.getValue()); - assertEquals(expectedValue, rdn3.getValue()); - assertEquals(expectedAoi, rdn1.getAoi()); - assertEquals(expectedAoi, rdn2.getAoi()); - assertEquals(expectedAoi, rdn3.getAoi()); - } - - @Test - void shouldCorrectlySplitAndTrimString() { - //given - String value1 = " T = Test"; - List<String> expected1 = Arrays.asList("T", "Test"); - - String value2 = "This 123 is 99 tested 12345 string"; - List<String> expected2 = Arrays.asList("This", "is 99 tested", "string"); - - //when - List<String> actual1 = Rdn.parseRdn("=", value1); - List<String> actual2 = Rdn.parseRdn("[0-9]{3,}", value2); - - //then - assertEquals(expected1, actual1); - assertEquals(expected2, actual2); - } - - @Test - void shouldConvertAoiStringToEnum() throws CertException { - Rdn rdn = new Rdn("CN", "ManagmentCA"); - - assertEquals(BCStyle.CN, rdn.getAoi("CN")); - assertEquals(BCStyle.C, rdn.getAoi("C")); - assertEquals(BCStyle.ST, rdn.getAoi("ST")); - assertEquals(BCStyle.L, rdn.getAoi("L")); - assertEquals(BCStyle.O, rdn.getAoi("O")); - assertEquals(BCStyle.OU, rdn.getAoi("OU")); - assertEquals(BCStyle.DC, rdn.getAoi("DC")); - assertEquals(BCStyle.GIVENNAME, rdn.getAoi("GN")); - assertEquals(BCStyle.SN, rdn.getAoi("SN")); - assertEquals(BCStyle.E, rdn.getAoi("E")); - assertEquals(BCStyle.E, rdn.getAoi("EMAIL")); - assertEquals(BCStyle.E, rdn.getAoi("EMAILADDRESS")); - assertEquals(BCStyle.INITIALS, rdn.getAoi("INITIALS")); - assertEquals(BCStyle.PSEUDONYM, rdn.getAoi("PSEUDONYM")); - assertEquals(BCStyle.GENERATION, rdn.getAoi("GENERATIONQUALIFIER")); - assertEquals(BCStyle.SERIALNUMBER, rdn.getAoi("SERIALNUMBER")); - assertThrows(CertException.class, () -> rdn.getAoi("INVALIDTAG")); - } -} diff --git a/certService/src/test/java/org/onap/aaf/certservice/CertServiceApplicationTests.java b/certService/src/test/java/org/onap/oom/certservice/CertServiceApplicationTests.java index 0dc60aa5..abbcc3fa 100644 --- a/certService/src/test/java/org/onap/aaf/certservice/CertServiceApplicationTests.java +++ b/certService/src/test/java/org/onap/oom/certservice/CertServiceApplicationTests.java @@ -18,7 +18,7 @@ * ============LICENSE_END========================================================= */ -package org.onap.aaf.certservice; +package org.onap.oom.certservice; import org.junit.jupiter.api.Test; import org.springframework.boot.test.context.SpringBootTest; diff --git a/certService/src/test/java/org/onap/aaf/certservice/api/CertificationControllerTest.java b/certService/src/test/java/org/onap/oom/certservice/api/CertificationControllerTest.java index 449670c3..abd950e8 100644 --- a/certService/src/test/java/org/onap/aaf/certservice/api/CertificationControllerTest.java +++ b/certService/src/test/java/org/onap/oom/certservice/api/CertificationControllerTest.java @@ -18,7 +18,7 @@ * ============LICENSE_END========================================================= */ -package org.onap.aaf.certservice.api; +package org.onap.oom.certservice.api; import static org.assertj.core.api.Assertions.assertThat; import static org.junit.jupiter.api.Assertions.assertEquals; @@ -32,14 +32,14 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; -import org.onap.aaf.certservice.certification.CertificationModelFactory; -import org.onap.aaf.certservice.certification.exception.Cmpv2ClientAdapterException; -import org.onap.aaf.certservice.certification.exception.Cmpv2ServerNotFoundException; -import org.onap.aaf.certservice.certification.exception.CsrDecryptionException; -import org.onap.aaf.certservice.certification.exception.DecryptionException; -import org.onap.aaf.certservice.certification.exception.KeyDecryptionException; -import org.onap.aaf.certservice.certification.model.CertificationModel; -import org.onap.aaf.certservice.cmpv2client.exceptions.CmpClientException; +import org.onap.oom.certservice.certification.CertificationModelFactory; +import org.onap.oom.certservice.certification.exception.Cmpv2ClientAdapterException; +import org.onap.oom.certservice.certification.exception.Cmpv2ServerNotFoundException; +import org.onap.oom.certservice.certification.exception.CsrDecryptionException; +import org.onap.oom.certservice.certification.exception.DecryptionException; +import org.onap.oom.certservice.certification.exception.KeyDecryptionException; +import org.onap.oom.certservice.certification.model.CertificationModel; +import org.onap.oom.certservice.cmpv2client.exceptions.CmpClientException; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; diff --git a/certService/src/test/java/org/onap/aaf/certservice/api/ReadinessControllerTest.java b/certService/src/test/java/org/onap/oom/certservice/api/ReadinessControllerTest.java index d3ed7301..267a281b 100644 --- a/certService/src/test/java/org/onap/aaf/certservice/api/ReadinessControllerTest.java +++ b/certService/src/test/java/org/onap/oom/certservice/api/ReadinessControllerTest.java @@ -18,7 +18,7 @@ * ============LICENSE_END========================================================= */ -package org.onap.aaf.certservice.api; +package org.onap.oom.certservice.api; import static org.assertj.core.api.Assertions.assertThat; @@ -27,7 +27,7 @@ import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; import org.mockito.Mockito; import org.mockito.junit.jupiter.MockitoExtension; -import org.onap.aaf.certservice.certification.configuration.CmpServersConfig; +import org.onap.oom.certservice.certification.configuration.CmpServersConfig; import org.springframework.http.HttpStatus; @ExtendWith(MockitoExtension.class) diff --git a/certService/src/test/java/org/onap/aaf/certservice/api/ReloadConfigControllerTest.java b/certService/src/test/java/org/onap/oom/certservice/api/ReloadConfigControllerTest.java index 92c18e16..8b367e1a 100644 --- a/certService/src/test/java/org/onap/aaf/certservice/api/ReloadConfigControllerTest.java +++ b/certService/src/test/java/org/onap/oom/certservice/api/ReloadConfigControllerTest.java @@ -18,7 +18,7 @@ * ============LICENSE_END========================================================= */ -package org.onap.aaf.certservice.api; +package org.onap.oom.certservice.api; import static org.assertj.core.api.AssertionsForInterfaceTypes.assertThat; import static org.junit.jupiter.api.Assertions.assertThrows; @@ -30,8 +30,8 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; -import org.onap.aaf.certservice.certification.configuration.CmpServersConfig; -import org.onap.aaf.certservice.certification.configuration.CmpServersConfigLoadingException; +import org.onap.oom.certservice.certification.configuration.CmpServersConfig; +import org.onap.oom.certservice.certification.configuration.CmpServersConfigLoadingException; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; diff --git a/certService/src/test/java/org/onap/aaf/certservice/api/advice/CertificationExceptionAdviceTest.java b/certService/src/test/java/org/onap/oom/certservice/api/advice/CertificationExceptionAdviceTest.java index f3c4ec7f..081a01a0 100644 --- a/certService/src/test/java/org/onap/aaf/certservice/api/advice/CertificationExceptionAdviceTest.java +++ b/certService/src/test/java/org/onap/oom/certservice/api/advice/CertificationExceptionAdviceTest.java @@ -18,17 +18,17 @@ * ============LICENSE_END========================================================= */ -package org.onap.aaf.certservice.api.advice; +package org.onap.oom.certservice.api.advice; import com.google.gson.Gson; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; -import org.onap.aaf.certservice.certification.exception.Cmpv2ClientAdapterException; -import org.onap.aaf.certservice.certification.exception.Cmpv2ServerNotFoundException; -import org.onap.aaf.certservice.certification.exception.CsrDecryptionException; -import org.onap.aaf.certservice.certification.exception.ErrorResponseModel; -import org.onap.aaf.certservice.certification.exception.KeyDecryptionException; -import org.onap.aaf.certservice.cmpv2client.exceptions.CmpClientException; +import org.onap.oom.certservice.certification.exception.Cmpv2ClientAdapterException; +import org.onap.oom.certservice.certification.exception.Cmpv2ServerNotFoundException; +import org.onap.oom.certservice.certification.exception.CsrDecryptionException; +import org.onap.oom.certservice.certification.exception.ErrorResponseModel; +import org.onap.oom.certservice.certification.exception.KeyDecryptionException; +import org.onap.oom.certservice.cmpv2client.exceptions.CmpClientException; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; diff --git a/certService/src/test/java/org/onap/aaf/certservice/api/advice/ReloadConfigExceptionAdviceTest.java b/certService/src/test/java/org/onap/oom/certservice/api/advice/ReloadConfigExceptionAdviceTest.java index 9abecec9..0a339879 100644 --- a/certService/src/test/java/org/onap/aaf/certservice/api/advice/ReloadConfigExceptionAdviceTest.java +++ b/certService/src/test/java/org/onap/oom/certservice/api/advice/ReloadConfigExceptionAdviceTest.java @@ -18,11 +18,11 @@ * ============LICENSE_END========================================================= */ -package org.onap.aaf.certservice.api.advice; +package org.onap.oom.certservice.api.advice; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; -import org.onap.aaf.certservice.certification.configuration.CmpServersConfigLoadingException; +import org.onap.oom.certservice.certification.configuration.CmpServersConfigLoadingException; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; diff --git a/certService/src/test/java/org/onap/aaf/certservice/certification/CertificationModelFactoryTest.java b/certService/src/test/java/org/onap/oom/certservice/certification/CertificationModelFactoryTest.java index a63c8e0e..8d28148b 100644 --- a/certService/src/test/java/org/onap/aaf/certservice/certification/CertificationModelFactoryTest.java +++ b/certService/src/test/java/org/onap/oom/certservice/certification/CertificationModelFactoryTest.java @@ -18,22 +18,22 @@ * ============LICENSE_END========================================================= */ -package org.onap.aaf.certservice.certification; +package org.onap.oom.certservice.certification; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; -import org.onap.aaf.certservice.certification.configuration.Cmpv2ServerProvider; -import org.onap.aaf.certservice.certification.configuration.model.Cmpv2Server; -import org.onap.aaf.certservice.certification.exception.Cmpv2ClientAdapterException; -import org.onap.aaf.certservice.certification.exception.Cmpv2ServerNotFoundException; -import org.onap.aaf.certservice.certification.exception.CsrDecryptionException; -import org.onap.aaf.certservice.certification.exception.DecryptionException; -import org.onap.aaf.certservice.certification.model.CertificationModel; -import org.onap.aaf.certservice.certification.model.CsrModel; -import org.onap.aaf.certservice.cmpv2client.exceptions.CmpClientException; +import org.onap.oom.certservice.certification.configuration.Cmpv2ServerProvider; +import org.onap.oom.certservice.certification.configuration.model.Cmpv2Server; +import org.onap.oom.certservice.certification.exception.Cmpv2ClientAdapterException; +import org.onap.oom.certservice.certification.exception.Cmpv2ServerNotFoundException; +import org.onap.oom.certservice.certification.exception.CsrDecryptionException; +import org.onap.oom.certservice.certification.exception.DecryptionException; +import org.onap.oom.certservice.certification.model.CertificationModel; +import org.onap.oom.certservice.certification.model.CsrModel; +import org.onap.oom.certservice.cmpv2client.exceptions.CmpClientException; import java.util.Arrays; import java.util.Base64; @@ -46,14 +46,14 @@ import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; -import static org.onap.aaf.certservice.certification.CertificationData.CA_CERT; -import static org.onap.aaf.certservice.certification.CertificationData.ENTITY_CERT; -import static org.onap.aaf.certservice.certification.CertificationData.INTERMEDIATE_CERT; -import static org.onap.aaf.certservice.certification.CertificationData.EXTRA_CA_CERT; -import static org.onap.aaf.certservice.certification.TestData.TEST_CSR; -import static org.onap.aaf.certservice.certification.TestData.TEST_PK; -import static org.onap.aaf.certservice.certification.TestData.TEST_WRONG_CSR; -import static org.onap.aaf.certservice.certification.TestData.TEST_WRONG_PEM; +import static org.onap.oom.certservice.certification.CertificationData.CA_CERT; +import static org.onap.oom.certservice.certification.CertificationData.ENTITY_CERT; +import static org.onap.oom.certservice.certification.CertificationData.INTERMEDIATE_CERT; +import static org.onap.oom.certservice.certification.CertificationData.EXTRA_CA_CERT; +import static org.onap.oom.certservice.certification.TestData.TEST_CSR; +import static org.onap.oom.certservice.certification.TestData.TEST_PK; +import static org.onap.oom.certservice.certification.TestData.TEST_WRONG_CSR; +import static org.onap.oom.certservice.certification.TestData.TEST_WRONG_PEM; @ExtendWith(MockitoExtension.class) class CertificationModelFactoryTest { diff --git a/certService/src/test/java/org/onap/aaf/certservice/certification/CertificationProviderTest.java b/certService/src/test/java/org/onap/oom/certservice/certification/CertificationProviderTest.java index a590c5ea..54744ba0 100644 --- a/certService/src/test/java/org/onap/aaf/certservice/certification/CertificationProviderTest.java +++ b/certService/src/test/java/org/onap/oom/certservice/certification/CertificationProviderTest.java @@ -1,6 +1,6 @@ /* * ============LICENSE_START======================================================= - * AAF Certification Service + * OOM Certification Service * ================================================================================ * Copyright (C) 2020 Nokia. All rights reserved. * ================================================================================ @@ -18,7 +18,7 @@ * ============LICENSE_END========================================================= */ -package org.onap.aaf.certservice.certification; +package org.onap.oom.certservice.certification; import org.apache.commons.io.IOUtils; import org.junit.jupiter.api.BeforeEach; @@ -26,12 +26,12 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; -import org.onap.aaf.certservice.certification.configuration.model.Cmpv2Server; -import org.onap.aaf.certservice.certification.model.CertificationModel; -import org.onap.aaf.certservice.certification.model.CsrModel; -import org.onap.aaf.certservice.cmpv2client.api.CmpClient; -import org.onap.aaf.certservice.cmpv2client.exceptions.CmpClientException; -import org.onap.aaf.certservice.cmpv2client.model.Cmpv2CertificationModel; +import org.onap.oom.certservice.certification.configuration.model.Cmpv2Server; +import org.onap.oom.certservice.certification.model.CertificationModel; +import org.onap.oom.certservice.certification.model.CsrModel; +import org.onap.oom.certservice.cmpv2client.api.CmpClient; +import org.onap.oom.certservice.cmpv2client.exceptions.CmpClientException; +import org.onap.oom.certservice.cmpv2client.model.Cmpv2CertificationModel; import java.io.IOException; import java.io.InputStream; diff --git a/certService/src/test/java/org/onap/aaf/certservice/certification/CsrModelFactoryTest.java b/certService/src/test/java/org/onap/oom/certservice/certification/CsrModelFactoryTest.java index d2c3c54c..75a6e81c 100644 --- a/certService/src/test/java/org/onap/aaf/certservice/certification/CsrModelFactoryTest.java +++ b/certService/src/test/java/org/onap/oom/certservice/certification/CsrModelFactoryTest.java @@ -18,23 +18,23 @@ * ============LICENSE_END========================================================= */ -package org.onap.aaf.certservice.certification; +package org.onap.oom.certservice.certification; import org.bouncycastle.util.encoders.Base64; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; -import org.onap.aaf.certservice.certification.CsrModelFactory.StringBase64; -import org.onap.aaf.certservice.certification.exception.CsrDecryptionException; -import org.onap.aaf.certservice.certification.exception.DecryptionException; -import org.onap.aaf.certservice.certification.exception.KeyDecryptionException; -import org.onap.aaf.certservice.certification.model.CsrModel; +import org.onap.oom.certservice.certification.CsrModelFactory.StringBase64; +import org.onap.oom.certservice.certification.exception.CsrDecryptionException; +import org.onap.oom.certservice.certification.exception.DecryptionException; +import org.onap.oom.certservice.certification.exception.KeyDecryptionException; +import org.onap.oom.certservice.certification.model.CsrModel; import static org.junit.jupiter.api.Assertions.assertThrows; import static org.junit.jupiter.api.Assertions.assertTrue; -import static org.onap.aaf.certservice.certification.TestData.TEST_CSR; -import static org.onap.aaf.certservice.certification.TestData.TEST_PK; -import static org.onap.aaf.certservice.certification.TestData.TEST_WRONG_CSR; -import static org.onap.aaf.certservice.certification.TestData.TEST_WRONG_PEM; +import static org.onap.oom.certservice.certification.TestData.TEST_CSR; +import static org.onap.oom.certservice.certification.TestData.TEST_PK; +import static org.onap.oom.certservice.certification.TestData.TEST_WRONG_CSR; +import static org.onap.oom.certservice.certification.TestData.TEST_WRONG_PEM; class CsrModelFactoryTest { diff --git a/certService/src/test/java/org/onap/aaf/certservice/certification/PemObjectFactoryTest.java b/certService/src/test/java/org/onap/oom/certservice/certification/PemObjectFactoryTest.java index 90151b6d..68cfa1a1 100644 --- a/certService/src/test/java/org/onap/aaf/certservice/certification/PemObjectFactoryTest.java +++ b/certService/src/test/java/org/onap/oom/certservice/certification/PemObjectFactoryTest.java @@ -18,19 +18,19 @@ * ============LICENSE_END========================================================= */ -package org.onap.aaf.certservice.certification; +package org.onap.oom.certservice.certification; import org.bouncycastle.util.io.pem.PemObject; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; -import org.onap.aaf.certservice.certification.exception.DecryptionException; +import org.onap.oom.certservice.certification.exception.DecryptionException; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertThrows; import static org.junit.jupiter.api.Assertions.assertTrue; -import static org.onap.aaf.certservice.certification.TestData.TEST_PEM; -import static org.onap.aaf.certservice.certification.TestData.TEST_WRONG_PEM; -import static org.onap.aaf.certservice.certification.TestUtils.pemObjectToString; +import static org.onap.oom.certservice.certification.TestData.TEST_PEM; +import static org.onap.oom.certservice.certification.TestData.TEST_WRONG_PEM; +import static org.onap.oom.certservice.certification.TestUtils.pemObjectToString; class PemObjectFactoryTest { diff --git a/certService/src/test/java/org/onap/aaf/certservice/certification/RsaContentSignerBuilderTest.java b/certService/src/test/java/org/onap/oom/certservice/certification/RsaContentSignerBuilderTest.java index 0083968d..eebe1815 100644 --- a/certService/src/test/java/org/onap/aaf/certservice/certification/RsaContentSignerBuilderTest.java +++ b/certService/src/test/java/org/onap/oom/certservice/certification/RsaContentSignerBuilderTest.java @@ -18,22 +18,22 @@ * ============LICENSE_END========================================================= */ -package org.onap.aaf.certservice.certification; +package org.onap.oom.certservice.certification; import org.bouncycastle.operator.ContentSigner; import org.bouncycastle.operator.OperatorCreationException; import org.bouncycastle.pkcs.PKCS10CertificationRequest; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; -import org.onap.aaf.certservice.certification.RsaContentSignerBuilder; -import org.onap.aaf.certservice.certification.exception.DecryptionException; -import org.onap.aaf.certservice.certification.model.CsrModel; +import org.onap.oom.certservice.certification.RsaContentSignerBuilder; +import org.onap.oom.certservice.certification.exception.DecryptionException; +import org.onap.oom.certservice.certification.model.CsrModel; import java.io.IOException; import java.security.PrivateKey; import static org.assertj.core.api.Assertions.assertThat; -import static org.onap.aaf.certservice.certification.TestUtils.createCsrModel; +import static org.onap.oom.certservice.certification.TestUtils.createCsrModel; class RsaContentSignerBuilderTest { diff --git a/certService/src/test/java/org/onap/aaf/certservice/certification/TestData.java b/certService/src/test/java/org/onap/oom/certservice/certification/TestData.java index 6fea5b5a..81c16128 100644 --- a/certService/src/test/java/org/onap/aaf/certservice/certification/TestData.java +++ b/certService/src/test/java/org/onap/oom/certservice/certification/TestData.java @@ -18,7 +18,7 @@ * ============LICENSE_END========================================================= */ -package org.onap.aaf.certservice.certification; +package org.onap.oom.certservice.certification; public final class TestData { diff --git a/certService/src/test/java/org/onap/aaf/certservice/certification/TestUtils.java b/certService/src/test/java/org/onap/oom/certservice/certification/TestUtils.java index a6e55c57..7c69bd52 100644 --- a/certService/src/test/java/org/onap/aaf/certservice/certification/TestUtils.java +++ b/certService/src/test/java/org/onap/oom/certservice/certification/TestUtils.java @@ -18,20 +18,20 @@ * ============LICENSE_END========================================================= */ -package org.onap.aaf.certservice.certification; +package org.onap.oom.certservice.certification; import org.bouncycastle.util.encoders.Base64; import org.bouncycastle.util.io.pem.PemObject; import org.bouncycastle.util.io.pem.PemWriter; -import org.onap.aaf.certservice.certification.exception.DecryptionException; -import org.onap.aaf.certservice.certification.exception.KeyDecryptionException; -import org.onap.aaf.certservice.certification.model.CsrModel; +import org.onap.oom.certservice.certification.exception.DecryptionException; +import org.onap.oom.certservice.certification.exception.KeyDecryptionException; +import org.onap.oom.certservice.certification.model.CsrModel; import java.io.IOException; import java.io.StringWriter; -import static org.onap.aaf.certservice.certification.TestData.TEST_CSR; -import static org.onap.aaf.certservice.certification.TestData.TEST_PK; +import static org.onap.oom.certservice.certification.TestData.TEST_CSR; +import static org.onap.oom.certservice.certification.TestData.TEST_PK; public final class TestUtils { diff --git a/certService/src/test/java/org/onap/aaf/certservice/certification/X509CertificateBuilderTest.java b/certService/src/test/java/org/onap/oom/certservice/certification/X509CertificateBuilderTest.java index 067f2f5f..e980aa2c 100644 --- a/certService/src/test/java/org/onap/aaf/certservice/certification/X509CertificateBuilderTest.java +++ b/certService/src/test/java/org/onap/oom/certservice/certification/X509CertificateBuilderTest.java @@ -18,7 +18,7 @@ * ============LICENSE_END========================================================= */ -package org.onap.aaf.certservice.certification; +package org.onap.oom.certservice.certification; import org.bouncycastle.cert.X509CertificateHolder; import org.bouncycastle.cert.X509v3CertificateBuilder; @@ -27,14 +27,14 @@ import org.bouncycastle.operator.OperatorCreationException; import org.bouncycastle.pkcs.PKCS10CertificationRequest; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; -import org.onap.aaf.certservice.certification.exception.DecryptionException; -import org.onap.aaf.certservice.certification.model.CsrModel; +import org.onap.oom.certservice.certification.exception.DecryptionException; +import org.onap.oom.certservice.certification.model.CsrModel; import java.io.IOException; import java.security.PrivateKey; import static org.assertj.core.api.Assertions.assertThat; -import static org.onap.aaf.certservice.certification.TestUtils.createCsrModel; +import static org.onap.oom.certservice.certification.TestUtils.createCsrModel; public class X509CertificateBuilderTest { diff --git a/certService/src/test/java/org/onap/aaf/certservice/certification/configuration/CmpServersConfigLoaderTest.java b/certService/src/test/java/org/onap/oom/certservice/certification/configuration/CmpServersConfigLoaderTest.java index 87964295..b755b977 100644 --- a/certService/src/test/java/org/onap/aaf/certservice/certification/configuration/CmpServersConfigLoaderTest.java +++ b/certService/src/test/java/org/onap/oom/certservice/certification/configuration/CmpServersConfigLoaderTest.java @@ -18,7 +18,7 @@ * ============LICENSE_END========================================================= */ -package org.onap.aaf.certservice.certification.configuration; +package org.onap.oom.certservice.certification.configuration; import static org.assertj.core.api.Assertions.assertThat; import static org.junit.jupiter.api.Assertions.assertThrows; @@ -28,8 +28,8 @@ import java.util.Map; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; -import org.onap.aaf.certservice.CertServiceApplication; -import org.onap.aaf.certservice.certification.configuration.model.Cmpv2Server; +import org.onap.oom.certservice.CertServiceApplication; +import org.onap.oom.certservice.certification.configuration.model.Cmpv2Server; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit.jupiter.SpringExtension; diff --git a/certService/src/test/java/org/onap/aaf/certservice/certification/configuration/CmpServersConfigTest.java b/certService/src/test/java/org/onap/oom/certservice/certification/configuration/CmpServersConfigTest.java index 511c3966..e938fdde 100644 --- a/certService/src/test/java/org/onap/aaf/certservice/certification/configuration/CmpServersConfigTest.java +++ b/certService/src/test/java/org/onap/oom/certservice/certification/configuration/CmpServersConfigTest.java @@ -18,7 +18,7 @@ * ============LICENSE_END========================================================= */ -package org.onap.aaf.certservice.certification.configuration; +package org.onap.oom.certservice.certification.configuration; import static org.assertj.core.api.Assertions.assertThat; import static org.junit.jupiter.api.Assertions.assertThrows; @@ -34,9 +34,9 @@ import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; import org.mockito.Mockito; import org.mockito.junit.jupiter.MockitoExtension; -import org.onap.aaf.certservice.certification.configuration.model.Authentication; -import org.onap.aaf.certservice.certification.configuration.model.CaMode; -import org.onap.aaf.certservice.certification.configuration.model.Cmpv2Server; +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) class CmpServersConfigTest { diff --git a/certService/src/test/java/org/onap/aaf/certservice/certification/configuration/Cmpv2ServerProviderTest.java b/certService/src/test/java/org/onap/oom/certservice/certification/configuration/Cmpv2ServerProviderTest.java index b83fb9aa..dc6de3ba 100644 --- a/certService/src/test/java/org/onap/aaf/certservice/certification/configuration/Cmpv2ServerProviderTest.java +++ b/certService/src/test/java/org/onap/oom/certservice/certification/configuration/Cmpv2ServerProviderTest.java @@ -18,7 +18,7 @@ * ============LICENSE_END========================================================= */ -package org.onap.aaf.certservice.certification.configuration; +package org.onap.oom.certservice.certification.configuration; import org.bouncycastle.asn1.x500.X500Name; import org.junit.jupiter.api.BeforeEach; @@ -26,10 +26,10 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; -import org.onap.aaf.certservice.certification.configuration.model.Authentication; -import org.onap.aaf.certservice.certification.configuration.model.CaMode; -import org.onap.aaf.certservice.certification.configuration.model.Cmpv2Server; -import org.onap.aaf.certservice.certification.exception.Cmpv2ServerNotFoundException; +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; import java.util.Collections; diff --git a/certService/src/test/java/org/onap/aaf/certservice/certification/configuration/validation/Cmpv2ServersConfigurationValidatorTest.java b/certService/src/test/java/org/onap/oom/certservice/certification/configuration/validation/Cmpv2ServersConfigurationValidatorTest.java index 6db77753..b07c9035 100644 --- a/certService/src/test/java/org/onap/aaf/certservice/certification/configuration/validation/Cmpv2ServersConfigurationValidatorTest.java +++ b/certService/src/test/java/org/onap/oom/certservice/certification/configuration/validation/Cmpv2ServersConfigurationValidatorTest.java @@ -18,17 +18,17 @@ * ============LICENSE_END========================================================= */ -package org.onap.aaf.certservice.certification.configuration.validation; +package org.onap.oom.certservice.certification.configuration.validation; import org.bouncycastle.asn1.x500.X500Name; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; -import org.onap.aaf.certservice.CertServiceApplication; -import org.onap.aaf.certservice.certification.configuration.model.Authentication; -import org.onap.aaf.certservice.certification.configuration.model.CaMode; -import org.onap.aaf.certservice.certification.configuration.model.Cmpv2Server; +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; import org.springframework.test.context.junit.jupiter.SpringExtension; diff --git a/certService/src/test/java/org/onap/aaf/certservice/certification/configuration/validation/constraints/Cmpv2UrlValidatorTest.java b/certService/src/test/java/org/onap/oom/certservice/certification/configuration/validation/constraints/Cmpv2UrlValidatorTest.java index 7082626f..5022342f 100644 --- a/certService/src/test/java/org/onap/aaf/certservice/certification/configuration/validation/constraints/Cmpv2UrlValidatorTest.java +++ b/certService/src/test/java/org/onap/oom/certservice/certification/configuration/validation/constraints/Cmpv2UrlValidatorTest.java @@ -19,7 +19,7 @@ */ -package org.onap.aaf.certservice.certification.configuration.validation.constraints; +package org.onap.oom.certservice.certification.configuration.validation.constraints; import org.junit.jupiter.api.Test; diff --git a/certService/src/test/java/org/onap/aaf/certservice/certification/configuration/validation/constraints/violations/PortNumberViolationTest.java b/certService/src/test/java/org/onap/oom/certservice/certification/configuration/validation/constraints/violations/PortNumberViolationTest.java index e729c738..59bf40aa 100644 --- a/certService/src/test/java/org/onap/aaf/certservice/certification/configuration/validation/constraints/violations/PortNumberViolationTest.java +++ b/certService/src/test/java/org/onap/oom/certservice/certification/configuration/validation/constraints/violations/PortNumberViolationTest.java @@ -18,7 +18,7 @@ * ============LICENSE_END========================================================= */ -package org.onap.aaf.certservice.certification.configuration.validation.constraints.violations; +package org.onap.oom.certservice.certification.configuration.validation.constraints.violations; import org.junit.jupiter.api.Test; diff --git a/certService/src/test/java/org/onap/aaf/certservice/certification/configuration/validation/constraints/violations/RequestTypeViolationTest.java b/certService/src/test/java/org/onap/oom/certservice/certification/configuration/validation/constraints/violations/RequestTypeViolationTest.java index dce66d52..90475f84 100644 --- a/certService/src/test/java/org/onap/aaf/certservice/certification/configuration/validation/constraints/violations/RequestTypeViolationTest.java +++ b/certService/src/test/java/org/onap/oom/certservice/certification/configuration/validation/constraints/violations/RequestTypeViolationTest.java @@ -18,7 +18,7 @@ * ============LICENSE_END========================================================= */ -package org.onap.aaf.certservice.certification.configuration.validation.constraints.violations; +package org.onap.oom.certservice.certification.configuration.validation.constraints.violations; import org.junit.jupiter.api.Test; diff --git a/certService/src/test/java/org/onap/aaf/certservice/certification/model/CsrModelTest.java b/certService/src/test/java/org/onap/oom/certservice/certification/model/CsrModelTest.java index 08bc3368..7981b271 100644 --- a/certService/src/test/java/org/onap/aaf/certservice/certification/model/CsrModelTest.java +++ b/certService/src/test/java/org/onap/oom/certservice/certification/model/CsrModelTest.java @@ -18,17 +18,17 @@ * ============LICENSE_END========================================================= */ -package org.onap.aaf.certservice.certification.model; +package org.onap.oom.certservice.certification.model; import org.bouncycastle.asn1.x509.SubjectPublicKeyInfo; import org.bouncycastle.pkcs.PKCS10CertificationRequest; import org.bouncycastle.util.io.pem.PemObject; import org.junit.jupiter.api.Test; -import org.onap.aaf.certservice.certification.Pkcs10CertificationRequestFactory; -import org.onap.aaf.certservice.certification.PemObjectFactory; -import org.onap.aaf.certservice.certification.exception.CsrDecryptionException; -import org.onap.aaf.certservice.certification.exception.DecryptionException; -import org.onap.aaf.certservice.certification.exception.KeyDecryptionException; +import org.onap.oom.certservice.certification.Pkcs10CertificationRequestFactory; +import org.onap.oom.certservice.certification.PemObjectFactory; +import org.onap.oom.certservice.certification.exception.CsrDecryptionException; +import org.onap.oom.certservice.certification.exception.DecryptionException; +import org.onap.oom.certservice.certification.exception.KeyDecryptionException; import java.io.IOException; @@ -37,9 +37,9 @@ import static org.junit.jupiter.api.Assertions.assertThrows; import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; -import static org.onap.aaf.certservice.certification.TestData.TEST_CSR; -import static org.onap.aaf.certservice.certification.TestData.TEST_PEM; -import static org.onap.aaf.certservice.certification.TestData.TEST_PK; +import static org.onap.oom.certservice.certification.TestData.TEST_CSR; +import static org.onap.oom.certservice.certification.TestData.TEST_PEM; +import static org.onap.oom.certservice.certification.TestData.TEST_PK; class CsrModelTest { diff --git a/certService/src/test/java/org/onap/aaf/certservice/cmpv2client/Cmpv2ClientTest.java b/certService/src/test/java/org/onap/oom/certservice/cmpv2client/Cmpv2ClientTest.java index 05bda54b..984e8c77 100644 --- a/certService/src/test/java/org/onap/aaf/certservice/cmpv2client/Cmpv2ClientTest.java +++ b/certService/src/test/java/org/onap/oom/certservice/cmpv2client/Cmpv2ClientTest.java @@ -14,7 +14,7 @@ * limitations under the License */ -package org.onap.aaf.certservice.cmpv2client; +package org.onap.oom.certservice.cmpv2client; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.mockito.ArgumentMatchers.any; @@ -57,12 +57,12 @@ import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.mockito.Mock; -import org.onap.aaf.certservice.certification.configuration.model.Authentication; -import org.onap.aaf.certservice.certification.configuration.model.Cmpv2Server; -import org.onap.aaf.certservice.certification.model.CsrModel; -import org.onap.aaf.certservice.cmpv2client.exceptions.CmpClientException; -import org.onap.aaf.certservice.cmpv2client.impl.CmpClientImpl; -import org.onap.aaf.certservice.cmpv2client.model.Cmpv2CertificationModel; +import org.onap.oom.certservice.certification.configuration.model.Authentication; +import org.onap.oom.certservice.certification.configuration.model.Cmpv2Server; +import org.onap.oom.certservice.certification.model.CsrModel; +import org.onap.oom.certservice.cmpv2client.exceptions.CmpClientException; +import org.onap.oom.certservice.cmpv2client.impl.CmpClientImpl; +import org.onap.oom.certservice.cmpv2client.model.Cmpv2CertificationModel; class Cmpv2ClientTest { diff --git a/certService/src/test/java/org/onap/aaf/certservice/cmpv2client/impl/CmpResponseHelperTest.java b/certService/src/test/java/org/onap/oom/certservice/cmpv2client/impl/CmpResponseHelperTest.java index c41d6364..6686191f 100644 --- a/certService/src/test/java/org/onap/aaf/certservice/cmpv2client/impl/CmpResponseHelperTest.java +++ b/certService/src/test/java/org/onap/oom/certservice/cmpv2client/impl/CmpResponseHelperTest.java @@ -18,7 +18,7 @@ * ============LICENSE_END========================================================= */ -package org.onap.aaf.certservice.cmpv2client.impl; +package org.onap.oom.certservice.cmpv2client.impl; import org.bouncycastle.asn1.cmp.CMPCertificate; import org.bouncycastle.asn1.cmp.CertRepMessage; @@ -27,8 +27,8 @@ import org.bouncycastle.util.io.pem.PemObject; import org.bouncycastle.util.io.pem.PemReader; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; -import org.onap.aaf.certservice.cmpv2client.exceptions.CmpClientException; -import org.onap.aaf.certservice.cmpv2client.model.Cmpv2CertificationModel; +import org.onap.oom.certservice.cmpv2client.exceptions.CmpClientException; +import org.onap.oom.certservice.cmpv2client.model.Cmpv2CertificationModel; import java.io.ByteArrayInputStream; import java.io.IOException; diff --git a/certService/src/test/resources/application.properties b/certService/src/test/resources/application.properties index b70ab3b4..0bd9b36f 100644 --- a/certService/src/test/resources/application.properties +++ b/certService/src/test/resources/application.properties @@ -1,4 +1,4 @@ -# AAF CertService app specific configuration +# OOM CertService app specific configuration app.config.path=./src/test/resources # Mutual TLS configuration @@ -6,8 +6,8 @@ server.ssl.enabled=true server.ssl.client-auth=need server.port=${HTTPS_PORT:8443} -server.ssl.key-store=${KEYSTORE_PATH:/etc/onap/aaf/certservice/certs/certServiceServer-keystore.jks} +server.ssl.key-store=${KEYSTORE_PATH:/etc/onap/oom/certservice/certs/certServiceServer-keystore.jks} server.ssl.key-store-password=${KEYSTORE_PASSWORD:secret} -server.ssl.trust-store=${TRUSTSTORE_PATH:/etc/onap/aaf/certservice/certs/truststore.jks} +server.ssl.trust-store=${TRUSTSTORE_PATH:/etc/onap/oom/certservice/certs/truststore.jks} server.ssl.trust-store-password=${TRUSTSTORE_PASSWORD:secret}
\ No newline at end of file |