summaryrefslogtreecommitdiffstats
path: root/ms/blueprintsprocessor/application
diff options
context:
space:
mode:
Diffstat (limited to 'ms/blueprintsprocessor/application')
-rwxr-xr-xms/blueprintsprocessor/application/pom.xml70
-rwxr-xr-xms/blueprintsprocessor/application/src/main/docker/Dockerfile33
-rwxr-xr-x[-rw-r--r--]ms/blueprintsprocessor/application/src/main/docker/startService.sh0
-rw-r--r--ms/blueprintsprocessor/application/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/BlueprintDatabaseConfiguration.kt6
-rw-r--r--ms/blueprintsprocessor/application/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/BlueprintProcessorApplication.kt6
-rw-r--r--ms/blueprintsprocessor/application/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/BlueprintProcessorExceptionHandler.kt2
-rw-r--r--ms/blueprintsprocessor/application/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/actuator/indicator/BluePrintCustomIndicator.kt2
-rw-r--r--ms/blueprintsprocessor/application/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/uat/logging/MockInvocationLogger.kt1
-rw-r--r--ms/blueprintsprocessor/application/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/uat/utils/PathDeserializer.kt1
-rw-r--r--ms/blueprintsprocessor/application/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/uat/utils/RequiredMapEntriesMatcher.kt1
-rw-r--r--ms/blueprintsprocessor/application/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/uat/utils/UatDefinition.kt12
-rw-r--r--ms/blueprintsprocessor/application/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/uat/utils/UatExecutor.kt124
-rw-r--r--ms/blueprintsprocessor/application/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/uat/utils/UatServices.kt4
-rw-r--r--ms/blueprintsprocessor/application/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/uat/BaseUatTest.kt1
-rw-r--r--ms/blueprintsprocessor/application/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/uat/BlueprintsAcceptanceTest.kt8
-rw-r--r--ms/blueprintsprocessor/application/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/uat/ErrorCatalogTestConfiguration.kt2
-rw-r--r--ms/blueprintsprocessor/application/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/uat/UatServicesTest.kt10
-rw-r--r--ms/blueprintsprocessor/application/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/uat/error/ErrorCatalogServiceTest.kt71
-rw-r--r--ms/blueprintsprocessor/application/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/uat/logging/SmartColorDiscriminator.kt1
-rw-r--r--ms/blueprintsprocessor/application/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/uat/utils/ExtendedTemporaryFolder.kt16
-rw-r--r--ms/blueprintsprocessor/application/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/uat/utils/MarkedSlf4jNotifier.kt1
-rw-r--r--ms/blueprintsprocessor/application/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/uat/utils/TestSecuritySettings.kt2
-rw-r--r--ms/blueprintsprocessor/application/src/test/resources/logback-test.xml6
23 files changed, 222 insertions, 158 deletions
diff --git a/ms/blueprintsprocessor/application/pom.xml b/ms/blueprintsprocessor/application/pom.xml
index eb4522040..7e60b3de6 100755
--- a/ms/blueprintsprocessor/application/pom.xml
+++ b/ms/blueprintsprocessor/application/pom.xml
@@ -23,31 +23,26 @@
<parent>
<groupId>org.onap.ccsdk.cds.blueprintsprocessor</groupId>
- <artifactId>parent</artifactId>
- <version>1.0.0-SNAPSHOT</version>
+ <artifactId>blueprintsprocessor-parent</artifactId>
+ <version>1.1.0-SNAPSHOT</version>
<relativePath>../parent</relativePath>
</parent>
- <artifactId>application</artifactId>
+ <artifactId>blueprintsprocessor-application</artifactId>
<packaging>jar</packaging>
- <name>Blueprints Processor Application</name>
- <description>Blueprints Processor Application</description>
+ <name>MS Blueprints Processor Application</name>
<properties>
<assembly.id>maven</assembly.id>
<name.space>org.onap.ccsdk.cds</name.space>
<serviceArtifactName>blueprintsprocessor</serviceArtifactName>
<image.name>onap/ccsdk-blueprintsprocessor</image.name>
- <docker.push.phase>deploy</docker.push.phase>
- <docker.verbose>true</docker.verbose>
- <ccsdk.project.version>${project.version}</ccsdk.project.version>
- <ccsdk.build.timestamp>${maven.build.timestamp}</ccsdk.build.timestamp>
</properties>
<dependencies>
<dependency>
- <groupId>org.onap.ccsdk.cds.blueprintsprocessor</groupId>
+ <groupId>org.onap.ccsdk.cds.blueprintsprocessor.modules</groupId>
<artifactId>blueprint-core</artifactId>
<exclusions>
<exclusion>
@@ -73,29 +68,29 @@
<artifactId>error-catalog-services</artifactId>
</dependency>
- <!-- North Bound -->
+ <!-- North Bound - Modules -->
<dependency>
- <groupId>org.onap.ccsdk.cds.blueprintsprocessor</groupId>
+ <groupId>org.onap.ccsdk.cds.blueprintsprocessor.modules</groupId>
<artifactId>designer-api</artifactId>
</dependency>
<dependency>
- <groupId>org.onap.ccsdk.cds.blueprintsprocessor</groupId>
+ <groupId>org.onap.ccsdk.cds.blueprintsprocessor.modules</groupId>
<artifactId>resource-api</artifactId>
</dependency>
<dependency>
- <groupId>org.onap.ccsdk.cds.blueprintsprocessor</groupId>
+ <groupId>org.onap.ccsdk.cds.blueprintsprocessor.modules</groupId>
<artifactId>selfservice-api</artifactId>
</dependency>
<dependency>
- <groupId>org.onap.ccsdk.cds.blueprintsprocessor</groupId>
+ <groupId>org.onap.ccsdk.cds.blueprintsprocessor.modules</groupId>
<artifactId>configs-api</artifactId>
</dependency>
<dependency>
- <groupId>org.onap.ccsdk.cds.blueprintsprocessor</groupId>
+ <groupId>org.onap.ccsdk.cds.blueprintsprocessor.modules</groupId>
<artifactId>health-api</artifactId>
</dependency>
<dependency>
- <groupId>org.onap.ccsdk.cds.blueprintsprocessor</groupId>
+ <groupId>org.onap.ccsdk.cds.blueprintsprocessor.modules</groupId>
<artifactId>health-api-common</artifactId>
</dependency>
@@ -132,6 +127,8 @@
<groupId>org.onap.ccsdk.cds.blueprintsprocessor.functions</groupId>
<artifactId>k8s-profile-upload</artifactId>
</dependency>
+
+ <!-- Test Dependencies -->
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
@@ -156,6 +153,7 @@
<artifactId>reactor-test</artifactId>
<scope>test</scope>
</dependency>
+
<!-- BEGIN UAT -->
<dependency>
<groupId>org.skyscreamer</groupId>
@@ -197,7 +195,6 @@
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
</dependency>
-
</dependencies>
<build>
@@ -230,6 +227,21 @@
</resources>
<plugins>
<plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>${maven-surefire-plugin.version}</version>
+ <configuration>
+ <!-- Sets the VM argument line used when unit tests are run. -->
+ <argLine>-Xmx1024m -XX:MaxPermSize=256m ${surefireArgLine}</argLine>
+ <!-- Excludes integration tests when unit tests are run. -->
+ <excludes>
+ <exclude>**/IT*.java</exclude>
+ </excludes>
+ <reuseForks>false</reuseForks>
+ <forkCount>1</forkCount>
+ </configuration>
+ </plugin>
+ <plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>2.6</version>
<executions>
@@ -310,14 +322,6 @@
</executions>
</plugin>
<plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <version>3.1</version>
- <configuration>
- <source>1.8</source>
- <target>1.8</target>
- </configuration>
- </plugin>
- <plugin>
<groupId>pl.project13.maven</groupId>
<artifactId>git-commit-id-plugin</artifactId>
</plugin>
@@ -332,7 +336,7 @@
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
- <version>0.26.1</version>
+ <version>0.34.0</version>
<inherited>false</inherited>
<configuration>
<images>
@@ -349,18 +353,12 @@
</build>
</image>
</images>
- <verbose>true</verbose>
+ <verbose>${docker.verbose}</verbose>
+ <skipPush>${docker.skip.push}</skipPush>
</configuration>
<executions>
<execution>
- <id>generate-images</id>
- <phase>package</phase>
- <goals>
- <goal>build</goal>
- </goals>
- </execution>
- <execution>
- <id>push-images</id>
+ <id>build-push-images</id>
<phase>${docker.push.phase}</phase>
<goals>
<goal>build</goal>
diff --git a/ms/blueprintsprocessor/application/src/main/docker/Dockerfile b/ms/blueprintsprocessor/application/src/main/docker/Dockerfile
index e9c4c5895..c4da384f5 100755
--- a/ms/blueprintsprocessor/application/src/main/docker/Dockerfile
+++ b/ms/blueprintsprocessor/application/src/main/docker/Dockerfile
@@ -1,24 +1,21 @@
-FROM alpine:latest AS extractor
+FROM onap/ccsdk-alpine-j11-image:1.0.1
+
+USER root
+# add entrypoint
+COPY startService.sh /opt/app/onap/blueprints-processor/startService.sh
+# add application
COPY @project.build.finalName@-@assembly.id@.tar.gz /source.tar.gz
+
RUN tar -xzf /source.tar.gz -C /tmp \
&& cp -rf /tmp/@project.build.finalName@/opt / \
&& rm -rf /source.tar.gz \
- && rm -rf /tmp/@project.build.finalName@
-
-FROM omahoco1/alpine-java-python
+ && rm -rf /tmp/@project.build.finalName@ \
+ && touch /velocity.log \
+ && chown onap:onap /velocity.log \
+ && chmod 755 /velocity.log \
+ && mkdir -p /opt/app/onap/blueprints/deploy \
+ && chown onap:onap /opt -R \
+ && chmod 755 /opt/app/onap/blueprints-processor/startService.sh
-# add entrypoint
-COPY startService.sh /startService.sh
-RUN addgroup -S -g 1000 onap && adduser -u 1000 -S onap -G onap
-RUN chown onap:onap /startService.sh
-RUN touch /velocity.log && chmod 777 /velocity.log
-RUN chown onap:onap /velocity.log
-RUN chmod 777 /startService.sh && dos2unix /startService.sh
-
-# add application
-COPY --from=extractor /opt /opt
-RUN mkdir -p /opt/app/onap/blueprints/deploy
-RUN chown onap:onap /opt -R
USER onap
-
-ENTRYPOINT [ "/startService.sh" ]
+ENTRYPOINT [ "/opt/app/onap/blueprints-processor/startService.sh" ]
diff --git a/ms/blueprintsprocessor/application/src/main/docker/startService.sh b/ms/blueprintsprocessor/application/src/main/docker/startService.sh
index fb44ffd1c..fb44ffd1c 100644..100755
--- a/ms/blueprintsprocessor/application/src/main/docker/startService.sh
+++ b/ms/blueprintsprocessor/application/src/main/docker/startService.sh
diff --git a/ms/blueprintsprocessor/application/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/BlueprintDatabaseConfiguration.kt b/ms/blueprintsprocessor/application/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/BlueprintDatabaseConfiguration.kt
index e9557aed9..f5ccdee18 100644
--- a/ms/blueprintsprocessor/application/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/BlueprintDatabaseConfiguration.kt
+++ b/ms/blueprintsprocessor/application/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/BlueprintDatabaseConfiguration.kt
@@ -31,8 +31,10 @@ import javax.sql.DataSource
@Configuration
@Import(BluePrintDBLibConfiguration::class)
@EnableJpaRepositories(
- basePackages = ["org.onap.ccsdk.cds.controllerblueprints", "org.onap.ccsdk.cds.blueprintsprocessor",
- "org.onap.ccsdk.cds.error.catalog"],
+ basePackages = [
+ "org.onap.ccsdk.cds.controllerblueprints", "org.onap.ccsdk.cds.blueprintsprocessor",
+ "org.onap.ccsdk.cds.error.catalog"
+ ],
entityManagerFactoryRef = "primaryEntityManager",
transactionManagerRef = "primaryTransactionManager"
)
diff --git a/ms/blueprintsprocessor/application/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/BlueprintProcessorApplication.kt b/ms/blueprintsprocessor/application/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/BlueprintProcessorApplication.kt
index 97b7d28b0..e576877e3 100644
--- a/ms/blueprintsprocessor/application/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/BlueprintProcessorApplication.kt
+++ b/ms/blueprintsprocessor/application/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/BlueprintProcessorApplication.kt
@@ -31,8 +31,10 @@ import org.springframework.context.annotation.ComponentScan
@SpringBootApplication
@EnableAutoConfiguration(exclude = [DataSourceAutoConfiguration::class, HazelcastAutoConfiguration::class])
@ComponentScan(
- basePackages = ["org.onap.ccsdk.cds.error.catalog",
- "org.onap.ccsdk.cds.blueprintsprocessor", "org.onap.ccsdk.cds.controllerblueprints"]
+ basePackages = [
+ "org.onap.ccsdk.cds.error.catalog",
+ "org.onap.ccsdk.cds.blueprintsprocessor", "org.onap.ccsdk.cds.controllerblueprints"
+ ]
)
open class BlueprintProcessorApplication
diff --git a/ms/blueprintsprocessor/application/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/BlueprintProcessorExceptionHandler.kt b/ms/blueprintsprocessor/application/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/BlueprintProcessorExceptionHandler.kt
index f241e3f42..598300f47 100644
--- a/ms/blueprintsprocessor/application/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/BlueprintProcessorExceptionHandler.kt
+++ b/ms/blueprintsprocessor/application/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/BlueprintProcessorExceptionHandler.kt
@@ -22,4 +22,4 @@ import org.springframework.web.bind.annotation.RestControllerAdvice
@RestControllerAdvice("org.onap.ccsdk.cds")
open class BlueprintProcessorExceptionHandler(private val errorCatalogService: ErrorCatalogService) :
- ErrorCatalogExceptionHandler(errorCatalogService)
+ ErrorCatalogExceptionHandler(errorCatalogService)
diff --git a/ms/blueprintsprocessor/application/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/actuator/indicator/BluePrintCustomIndicator.kt b/ms/blueprintsprocessor/application/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/actuator/indicator/BluePrintCustomIndicator.kt
index 8fcffbf06..c795ee5fb 100644
--- a/ms/blueprintsprocessor/application/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/actuator/indicator/BluePrintCustomIndicator.kt
+++ b/ms/blueprintsprocessor/application/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/actuator/indicator/BluePrintCustomIndicator.kt
@@ -32,7 +32,7 @@ import org.springframework.stereotype.Component
*/
@Component
open class BluePrintCustomIndicator(private val bluePrintProcessorHealthCheck: BluePrintProcessorHealthCheck) :
- AbstractHealthIndicator() {
+ AbstractHealthIndicator() {
private var logger = LoggerFactory.getLogger(BluePrintCustomIndicator::class.java)
diff --git a/ms/blueprintsprocessor/application/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/uat/logging/MockInvocationLogger.kt b/ms/blueprintsprocessor/application/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/uat/logging/MockInvocationLogger.kt
index f8e6bd486..5b3843a31 100644
--- a/ms/blueprintsprocessor/application/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/uat/logging/MockInvocationLogger.kt
+++ b/ms/blueprintsprocessor/application/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/uat/logging/MockInvocationLogger.kt
@@ -59,6 +59,7 @@ class MockInvocationLogger(private val marker: Marker) : InvocationListener {
}
companion object {
+
private const val INDENT = " "
private val log = LoggerFactory.getLogger(MockInvocationLogger::class.java)
}
diff --git a/ms/blueprintsprocessor/application/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/uat/utils/PathDeserializer.kt b/ms/blueprintsprocessor/application/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/uat/utils/PathDeserializer.kt
index 6c5759155..b77caebcb 100644
--- a/ms/blueprintsprocessor/application/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/uat/utils/PathDeserializer.kt
+++ b/ms/blueprintsprocessor/application/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/uat/utils/PathDeserializer.kt
@@ -24,6 +24,7 @@ import com.fasterxml.jackson.databind.DeserializationContext
import com.fasterxml.jackson.databind.deser.std.StdDeserializer
internal class PathDeserializer : StdDeserializer<String>(String::class.java) {
+
override fun deserialize(jp: JsonParser, ctxt: DeserializationContext?): String {
val path = jp.codec.readValue(jp, Any::class.java)
return flatJoin(path)
diff --git a/ms/blueprintsprocessor/application/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/uat/utils/RequiredMapEntriesMatcher.kt b/ms/blueprintsprocessor/application/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/uat/utils/RequiredMapEntriesMatcher.kt
index 0f98d7213..ca60bb3b3 100644
--- a/ms/blueprintsprocessor/application/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/uat/utils/RequiredMapEntriesMatcher.kt
+++ b/ms/blueprintsprocessor/application/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/uat/utils/RequiredMapEntriesMatcher.kt
@@ -23,6 +23,7 @@ import com.google.common.collect.Maps
import org.mockito.ArgumentMatcher
class RequiredMapEntriesMatcher<K, V>(private val requiredEntries: Map<K, V>) : ArgumentMatcher<Map<K, V>> {
+
override fun matches(argument: Map<K, V>?): Boolean {
val missingEntries = Maps.difference(requiredEntries, argument).entriesOnlyOnLeft()
return missingEntries.isEmpty()
diff --git a/ms/blueprintsprocessor/application/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/uat/utils/UatDefinition.kt b/ms/blueprintsprocessor/application/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/uat/utils/UatDefinition.kt
index 17b79f588..d5bf3f4c6 100644
--- a/ms/blueprintsprocessor/application/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/uat/utils/UatDefinition.kt
+++ b/ms/blueprintsprocessor/application/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/uat/utils/UatDefinition.kt
@@ -47,9 +47,14 @@ data class RequestDefinition(
)
@JsonInclude(JsonInclude.Include.NON_EMPTY)
-data class ResponseDefinition(val status: Int = 200, val body: JsonNode? = null, val headers: Map<String, String> = mapOf("Content-Type" to "application/json")) {
+data class ResponseDefinition(
+ val status: Int = 200,
+ val body: JsonNode? = null,
+ val headers: Map<String, String> = mapOf("Content-Type" to "application/json")
+) {
companion object {
+
val DEFAULT_RESPONSES = listOf(ResponseDefinition())
}
}
@@ -61,9 +66,11 @@ class ExpectationDefinition(
responses: List<ResponseDefinition>? = null,
val times: String = ">= 1"
) {
+
val responses: List<ResponseDefinition> = resolveOneOrMany(response, responses, ResponseDefinition.DEFAULT_RESPONSES)
companion object {
+
fun <T> resolveOneOrMany(one: T?, many: List<T>?, defaultMany: List<T>): List<T> = when {
many != null -> many
one != null -> listOf(one)
@@ -108,7 +115,8 @@ data class UatDefinition(
}
companion object {
+
fun load(mapper: ObjectMapper, spec: String): UatDefinition =
- mapper.convertValue(Yaml().load(spec), UatDefinition::class.java)
+ mapper.convertValue(Yaml().load(spec), UatDefinition::class.java)
}
}
diff --git a/ms/blueprintsprocessor/application/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/uat/utils/UatExecutor.kt b/ms/blueprintsprocessor/application/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/uat/utils/UatExecutor.kt
index d120e71d6..7d0c8751d 100644
--- a/ms/blueprintsprocessor/application/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/uat/utils/UatExecutor.kt
+++ b/ms/blueprintsprocessor/application/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/uat/utils/UatExecutor.kt
@@ -78,6 +78,7 @@ class UatExecutor(
) {
companion object {
+
private const val NOOP_PASSWORD_PREFIX = "{noop}"
private const val PROPERTY_IN_UAT = "IN_UAT"
private val TIMES_SPEC_REGEX = "([<>]=?)?\\s*(\\d+)".toRegex()
@@ -106,8 +107,8 @@ class UatExecutor(
fun execute(uat: UatDefinition, cbaBytes: ByteArray): UatDefinition {
val defaultHeaders = listOf(BasicHeader(HttpHeaders.AUTHORIZATION, clientAuthToken()))
val httpClient = HttpClientBuilder.create()
- .setDefaultHeaders(defaultHeaders)
- .build()
+ .setDefaultHeaders(defaultHeaders)
+ .build()
// Only if externalServices are defined
val mockInterceptor = MockPreInterceptor()
// Always defined and used, whatever the case
@@ -117,13 +118,13 @@ class UatExecutor(
markUatBegin()
// Configure mocked external services and save their expectations for further validation
val expectationsPerClient = uat.externalServices.associateBy(
- { service ->
- createRestClientMock(service.expectations).also { restClient ->
- // side-effect: register restClient to override real instance
- mockInterceptor.registerMock(service.selector, restClient)
- }
- },
- { service -> service.expectations }
+ { service ->
+ createRestClientMock(service.expectations).also { restClient ->
+ // side-effect: register restClient to override real instance
+ mockInterceptor.registerMock(service.selector, restClient)
+ }
+ },
+ { service -> service.expectations }
)
val newProcesses = httpClient.use { client ->
@@ -134,14 +135,14 @@ class UatExecutor(
log.info("Executing process '${process.name}'")
val responseNormalizer = JsonNormalizer.getNormalizer(mapper, process.responseNormalizerSpec)
val actualResponse = processBlueprint(
- client, process.request,
- process.expectedResponse, responseNormalizer
+ client, process.request,
+ process.expectedResponse, responseNormalizer
)
ProcessDefinition(
- process.name,
- process.request,
- actualResponse,
- process.responseNormalizerSpec
+ process.name,
+ process.request,
+ actualResponse,
+ process.responseNormalizerSpec
)
}
}
@@ -151,10 +152,10 @@ class UatExecutor(
expectations.forEach { expectation ->
val request = expectation.request
verify(mockClient, evalVerificationMode(expectation.times)).exchangeResource(
- eq(request.method),
- eq(request.path),
- argThat { assertJsonEquals(request.body, this) },
- argThat(RequiredMapEntriesMatcher(request.headers))
+ eq(request.method),
+ eq(request.path),
+ argThat { assertJsonEquals(request.body, this) },
+ argThat(RequiredMapEntriesMatcher(request.headers))
)
}
// Don't mind the invocations to the overloaded exchangeResource(String, String, String)
@@ -163,7 +164,7 @@ class UatExecutor(
}
val newExternalServices = spyInterceptor.getSpies()
- .map(SpyService::asServiceDefinition)
+ .map(SpyService::asServiceDefinition)
return UatDefinition(newProcesses, newExternalServices)
} finally {
@@ -181,43 +182,43 @@ class UatExecutor(
}
private fun createRestClientMock(restExpectations: List<ExpectationDefinition>):
- BlueprintWebClientService {
- val restClient = mock<BlueprintWebClientService>(
+ BlueprintWebClientService {
+ val restClient = mock<BlueprintWebClientService>(
defaultAnswer = Answers.RETURNS_SMART_NULLS,
// our custom verboseLogging handler
invocationListeners = arrayOf(mockLoggingListener)
- )
+ )
- // Delegates to overloaded exchangeResource(String, String, String, Map<String, String>)
- whenever(restClient.exchangeResource(any(), any(), any()))
+ // Delegates to overloaded exchangeResource(String, String, String, Map<String, String>)
+ whenever(restClient.exchangeResource(any(), any(), any()))
.thenAnswer { invocation ->
val method = invocation.arguments[0] as String
val path = invocation.arguments[1] as String
val request = invocation.arguments[2] as String
restClient.exchangeResource(method, path, request, emptyMap())
}
- for (expectation in restExpectations) {
- var stubbing = whenever(
+ for (expectation in restExpectations) {
+ var stubbing = whenever(
restClient.exchangeResource(
- eq(expectation.request.method),
- eq(expectation.request.path),
- any(),
- any()
+ eq(expectation.request.method),
+ eq(expectation.request.path),
+ any(),
+ any()
)
- )
- for (response in expectation.responses) {
- stubbing = stubbing.thenReturn(WebClientResponse(response.status, response.body.toString()))
+ )
+ for (response in expectation.responses) {
+ stubbing = stubbing.thenReturn(WebClientResponse(response.status, response.body.toString()))
+ }
}
+ return restClient
}
- return restClient
- }
@Throws(AssertionError::class)
private fun uploadBlueprint(client: HttpClient, cbaBytes: ByteArray) {
val multipartEntity = MultipartEntityBuilder.create()
- .setMode(HttpMultipartMode.BROWSER_COMPATIBLE)
- .addBinaryBody("file", cbaBytes, ContentType.DEFAULT_BINARY, "cba.zip")
- .build()
+ .setMode(HttpMultipartMode.BROWSER_COMPATIBLE)
+ .addBinaryBody("file", cbaBytes, ContentType.DEFAULT_BINARY, "cba.zip")
+ .build()
val request = HttpPost("$baseUrl/api/v1/blueprint-model/publish").apply {
entity = multipartEntity
}
@@ -254,7 +255,8 @@ class UatExecutor(
private fun evalVerificationMode(times: String): VerificationMode {
val matchResult = TIMES_SPEC_REGEX.matchEntire(times) ?: throw InvalidUatDefinition(
- "Time specification '$times' does not follow expected format $TIMES_SPEC_REGEX")
+ "Time specification '$times' does not follow expected format $TIMES_SPEC_REGEX"
+ )
val counter = matchResult.groups[2]!!.value.toInt()
return when (matchResult.groups[1]?.value) {
">=" -> atLeast(counter)
@@ -278,21 +280,25 @@ class UatExecutor(
}
private fun localServerPort(): Int =
- (environment.getProperty("local.server.port")
- ?: environment.getRequiredProperty("blueprint.httpPort")).toInt()
+ (
+ environment.getProperty("local.server.port")
+ ?: environment.getRequiredProperty("blueprint.httpPort")
+ ).toInt()
private fun clientAuthToken(): String {
val username = environment.getRequiredProperty("security.user.name")
val password = environment.getRequiredProperty("security.user.password")
val plainPassword = when {
password.startsWith(NOOP_PASSWORD_PREFIX) -> password.substring(
- NOOP_PASSWORD_PREFIX.length)
+ NOOP_PASSWORD_PREFIX.length
+ )
else -> username
}
return "Basic " + Base64Utils.encodeToString("$username:$plainPassword".toByteArray())
}
private class MockPreInterceptor : BluePrintRestLibPropertyService.PreInterceptor {
+
private val mocks = ConcurrentHashMap<String, BlueprintWebClientService>()
override fun getInstance(jsonNode: JsonNode): BlueprintWebClientService? {
@@ -300,7 +306,7 @@ class UatExecutor(
}
override fun getInstance(selector: String): BlueprintWebClientService? =
- mocks[selector]
+ mocks[selector]
fun registerMock(selector: String, client: BlueprintWebClientService) {
mocks[selector] = client
@@ -322,7 +328,7 @@ class UatExecutor(
}
fun getSpies(): List<SpyService> =
- spies.values.toList()
+ spies.values.toList()
}
private class SpyService(
@@ -330,14 +336,15 @@ class UatExecutor(
val selector: String,
private val realService: BlueprintWebClientService
) :
- BlueprintWebClientService by realService {
+ BlueprintWebClientService by realService {
private val expectations: MutableList<ExpectationDefinition> = mutableListOf()
override fun exchangeResource(methodType: String, path: String, request: String): WebClientResponse<String> =
- exchangeResource(methodType, path, request,
- DEFAULT_HEADERS
- )
+ exchangeResource(
+ methodType, path, request,
+ DEFAULT_HEADERS
+ )
override fun exchangeResource(
methodType: String,
@@ -346,7 +353,7 @@ class UatExecutor(
headers: Map<String, String>
): WebClientResponse<String> {
val requestDefinition =
- RequestDefinition(methodType, path, headers, toJson(request))
+ RequestDefinition(methodType, path, headers, toJson(request))
val realAnswer = realService.exchangeResource(methodType, path, request, headers)
val responseBody = when {
// TODO: confirm if we need to normalize the response here
@@ -354,12 +361,12 @@ class UatExecutor(
else -> null
}
val responseDefinition =
- ResponseDefinition(realAnswer.status, responseBody)
+ ResponseDefinition(realAnswer.status, responseBody)
expectations.add(
- ExpectationDefinition(
- requestDefinition,
- responseDefinition
- )
+ ExpectationDefinition(
+ requestDefinition,
+ responseDefinition
+ )
)
return realAnswer
}
@@ -369,7 +376,7 @@ class UatExecutor(
}
fun asServiceDefinition() =
- ServiceDefinition(selector, expectations)
+ ServiceDefinition(selector, expectations)
private fun toJson(str: String): JsonNode? {
return when {
@@ -379,9 +386,10 @@ class UatExecutor(
}
companion object {
+
private val DEFAULT_HEADERS = mapOf(
- HttpHeaders.CONTENT_TYPE to MediaType.APPLICATION_JSON_VALUE,
- HttpHeaders.ACCEPT to MediaType.APPLICATION_JSON_VALUE
+ HttpHeaders.CONTENT_TYPE to MediaType.APPLICATION_JSON_VALUE,
+ HttpHeaders.ACCEPT to MediaType.APPLICATION_JSON_VALUE
)
}
}
diff --git a/ms/blueprintsprocessor/application/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/uat/utils/UatServices.kt b/ms/blueprintsprocessor/application/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/uat/utils/UatServices.kt
index f40b903de..f6dd88dd5 100644
--- a/ms/blueprintsprocessor/application/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/uat/utils/UatServices.kt
+++ b/ms/blueprintsprocessor/application/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/uat/utils/UatServices.kt
@@ -87,7 +87,8 @@ open class UatServices(private val uatExecutor: UatExecutor, private val mapper:
val uat = UatDefinition.load(mapper, uatSpec)
val cbaBytes = tempFile.readBytes()
val updatedUat = uatExecutor.execute(uat, cbaBytes)
- return@runBlocking updatedUat.dump(mapper,
+ return@runBlocking updatedUat.dump(
+ mapper,
FIELDS_TO_EXCLUDE
)
} catch (t: Throwable) {
@@ -119,6 +120,7 @@ open class UatServices(private val uatExecutor: UatExecutor, private val mapper:
}
companion object {
+
// Fields that can be safely ignored from BPP response, and can be omitted on the UAT specification.
private val FIELDS_TO_EXCLUDE = listOf("timestamp")
}
diff --git a/ms/blueprintsprocessor/application/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/uat/BaseUatTest.kt b/ms/blueprintsprocessor/application/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/uat/BaseUatTest.kt
index 7f38608c9..41e997b88 100644
--- a/ms/blueprintsprocessor/application/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/uat/BaseUatTest.kt
+++ b/ms/blueprintsprocessor/application/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/uat/BaseUatTest.kt
@@ -55,6 +55,7 @@ abstract class BaseUatTest {
}
companion object {
+
const val UAT_BLUEPRINTS_BASE_DIR = "../../../components/model-catalog/blueprint-model/uat-blueprints"
}
}
diff --git a/ms/blueprintsprocessor/application/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/uat/BlueprintsAcceptanceTest.kt b/ms/blueprintsprocessor/application/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/uat/BlueprintsAcceptanceTest.kt
index ff7cd78c0..4a8da536f 100644
--- a/ms/blueprintsprocessor/application/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/uat/BlueprintsAcceptanceTest.kt
+++ b/ms/blueprintsprocessor/application/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/uat/BlueprintsAcceptanceTest.kt
@@ -58,9 +58,11 @@ class BlueprintsAcceptanceTest(
@Parameterized.Parameters(name = "{index} {0}")
@JvmStatic
fun scanUatEmpoweredBlueprints(): List<Array<Any>> {
- return (File(UAT_BLUEPRINTS_BASE_DIR)
- .listFiles { file -> file.isDirectory && File(file, UAT_SPECIFICATION_FILE).isFile }
- ?: throw RuntimeException("Failed to scan $UAT_BLUEPRINTS_BASE_DIR"))
+ return (
+ File(UAT_BLUEPRINTS_BASE_DIR)
+ .listFiles { file -> file.isDirectory && File(file, UAT_SPECIFICATION_FILE).isFile }
+ ?: throw RuntimeException("Failed to scan $UAT_BLUEPRINTS_BASE_DIR")
+ )
.map { file ->
arrayOf(
file.nameWithoutExtension,
diff --git a/ms/blueprintsprocessor/application/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/uat/ErrorCatalogTestConfiguration.kt b/ms/blueprintsprocessor/application/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/uat/ErrorCatalogTestConfiguration.kt
index c9d55c18a..33e795728 100644
--- a/ms/blueprintsprocessor/application/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/uat/ErrorCatalogTestConfiguration.kt
+++ b/ms/blueprintsprocessor/application/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/uat/ErrorCatalogTestConfiguration.kt
@@ -22,7 +22,7 @@ import org.springframework.context.annotation.Configuration
@Configuration
@ComponentScan(
- basePackages = ["org.onap.ccsdk.cds.error.catalog"]
+ basePackages = ["org.onap.ccsdk.cds.error.catalog"]
)
@EnableAutoConfiguration
open class ErrorCatalogTestConfiguration
diff --git a/ms/blueprintsprocessor/application/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/uat/UatServicesTest.kt b/ms/blueprintsprocessor/application/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/uat/UatServicesTest.kt
index 4e7d4ce40..fe2d539e3 100644
--- a/ms/blueprintsprocessor/application/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/uat/UatServicesTest.kt
+++ b/ms/blueprintsprocessor/application/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/uat/UatServicesTest.kt
@@ -74,6 +74,7 @@ fun String.prefixIfNot(prefix: String) =
class UatServicesTest : BaseUatTest() {
companion object {
+
private const val BLUEPRINT_NAME = "pnf_config"
private val BLUEPRINT_BASE_DIR = Paths.get(UAT_BLUEPRINTS_BASE_DIR, BLUEPRINT_NAME)
private val UAT_PATH = BLUEPRINT_BASE_DIR.resolve(UAT_SPECIFICATION_FILE)
@@ -223,11 +224,14 @@ class UatServicesTest : BaseUatTest() {
for (response in expectation.responses) {
val responseDefinitionBuilder: ResponseDefinitionBuilder = aResponse()
- .withStatus(response.status)
+ .withStatus(response.status)
if (response.body != null) {
responseDefinitionBuilder.withBody(mapper.writeValueAsBytes(response.body))
- .withHeaders(HttpHeaders(
- response.headers.entries.map { e -> HttpHeader(e.key, e.value) }))
+ .withHeaders(
+ HttpHeaders(
+ response.headers.entries.map { e -> HttpHeader(e.key, e.value) }
+ )
+ )
}
// TODO: MockServer verification for multiple responses should be done using Wiremock scenarios
diff --git a/ms/blueprintsprocessor/application/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/uat/error/ErrorCatalogServiceTest.kt b/ms/blueprintsprocessor/application/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/uat/error/ErrorCatalogServiceTest.kt
index 4f7ef0ec2..f00eb9d5f 100644
--- a/ms/blueprintsprocessor/application/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/uat/error/ErrorCatalogServiceTest.kt
+++ b/ms/blueprintsprocessor/application/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/uat/error/ErrorCatalogServiceTest.kt
@@ -35,10 +35,11 @@ import kotlin.test.assertTrue
@RunWith(SpringRunner::class)
@ContextConfiguration(
- classes = [ErrorCatalogTestConfiguration::class]
+ classes = [ErrorCatalogTestConfiguration::class]
)
@TestPropertySource(locations = ["classpath:application-test.properties"])
class ErrorCatalogServiceTest {
+
@Autowired
lateinit var errorCatalogService: ErrorCatalogService
@@ -52,46 +53,74 @@ class ErrorCatalogServiceTest {
@BeforeTest
fun setup() {
errorType = ErrorCatalogCodes.GENERIC_FAILURE
- errorCatalogHttp = ErrorCatalog(errorType, domain, 500,
- "Contact CDS administrator team.", "Internal error in Blueprint Processor run time.")
- errorCatalogGrpc = ErrorCatalog(errorType, domain, 2,
- "Contact CDS administrator team.", "Internal error in Blueprint Processor run time.")
+ errorCatalogHttp = ErrorCatalog(
+ errorType, domain, 500,
+ "Contact CDS administrator team.", "Internal error in Blueprint Processor run time."
+ )
+ errorCatalogGrpc = ErrorCatalog(
+ errorType, domain, 2,
+ "Contact CDS administrator team.", "Internal error in Blueprint Processor run time."
+ )
- errorPayloadHttp = ErrorPayload(500, ErrorCatalogCodes.GENERIC_FAILURE,
- "Cause: Internal error in Blueprint Processor run time. \n Action : Contact CDS administrator team.",
- errorMessage = ErrorMessage("org.onap.ccsdk.cds.blueprintsprocessor",
- "Internal error in Blueprint Processor run time.", ""))
- errorPayloadGrpc = ErrorPayload(2, ErrorCatalogCodes.GENERIC_FAILURE,
- "Cause: Internal error in Blueprint Processor run time. \n Action : Contact CDS administrator team.",
- errorMessage = ErrorMessage("org.onap.ccsdk.cds.blueprintsprocessor",
- "Internal error in Blueprint Processor run time.", ""))
+ errorPayloadHttp = ErrorPayload(
+ 500, ErrorCatalogCodes.GENERIC_FAILURE,
+ "Cause: Internal error in Blueprint Processor run time. \n Action : Contact CDS administrator team.",
+ errorMessage = ErrorMessage(
+ "org.onap.ccsdk.cds.blueprintsprocessor",
+ "Internal error in Blueprint Processor run time.", ""
+ )
+ )
+ errorPayloadGrpc = ErrorPayload(
+ 2, ErrorCatalogCodes.GENERIC_FAILURE,
+ "Cause: Internal error in Blueprint Processor run time. \n Action : Contact CDS administrator team.",
+ errorMessage = ErrorMessage(
+ "org.onap.ccsdk.cds.blueprintsprocessor",
+ "Internal error in Blueprint Processor run time.", ""
+ )
+ )
}
@Test
fun errorPayloadHttp() {
- val errorPayload = errorCatalogService.errorPayload(httpProcessorException(errorType, domain,
- "Internal error in Blueprint Processor run time."))
+ val errorPayload = errorCatalogService.errorPayload(
+ httpProcessorException(
+ errorType, domain,
+ "Internal error in Blueprint Processor run time."
+ )
+ )
assertTrue { errorPayload.isEqualTo(errorPayloadHttp) }
}
@Test
fun errorPayloadGrpc() {
- val errorPayload = errorCatalogService.errorPayload(grpcProcessorException(errorType, domain,
- "Internal error in Blueprint Processor run time."))
+ val errorPayload = errorCatalogService.errorPayload(
+ grpcProcessorException(
+ errorType, domain,
+ "Internal error in Blueprint Processor run time."
+ )
+ )
assertTrue { errorPayload.isEqualTo(errorPayloadGrpc) }
}
@Test
fun getErrorCatalogHttp() {
- val errorCatalog = errorCatalogService.getErrorCatalog(httpProcessorException(errorType, domain,
- "Internal error in Blueprint Processor run time."))
+ val errorCatalog = errorCatalogService.getErrorCatalog(
+ httpProcessorException(
+ errorType, domain,
+ "Internal error in Blueprint Processor run time."
+ )
+ )
assertTrue { errorCatalog == errorCatalogHttp }
}
@Test
fun getErrorCatalogGrpc() {
- val errorCatalog = errorCatalogService.getErrorCatalog(grpcProcessorException(errorType, domain,
- "Internal error in Blueprint Processor run time."))
+ val errorCatalog = errorCatalogService.getErrorCatalog(
+ grpcProcessorException(
+ errorType, domain,
+ "Internal error in Blueprint Processor run time."
+ )
+ )
assertTrue { errorCatalog == errorCatalogGrpc }
}
}
diff --git a/ms/blueprintsprocessor/application/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/uat/logging/SmartColorDiscriminator.kt b/ms/blueprintsprocessor/application/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/uat/logging/SmartColorDiscriminator.kt
index cad235450..e5d924d36 100644
--- a/ms/blueprintsprocessor/application/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/uat/logging/SmartColorDiscriminator.kt
+++ b/ms/blueprintsprocessor/application/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/uat/logging/SmartColorDiscriminator.kt
@@ -24,6 +24,7 @@ import ch.qos.logback.core.sift.AbstractDiscriminator
import org.onap.ccsdk.cds.blueprintsprocessor.uat.logging.LogColor.MDC_COLOR_KEY
class SmartColorDiscriminator : AbstractDiscriminator<ILoggingEvent>() {
+
var defaultValue: String = "white"
override fun getKey(): String {
diff --git a/ms/blueprintsprocessor/application/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/uat/utils/ExtendedTemporaryFolder.kt b/ms/blueprintsprocessor/application/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/uat/utils/ExtendedTemporaryFolder.kt
index 9090361fb..dd31c0e8f 100644
--- a/ms/blueprintsprocessor/application/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/uat/utils/ExtendedTemporaryFolder.kt
+++ b/ms/blueprintsprocessor/application/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/uat/utils/ExtendedTemporaryFolder.kt
@@ -29,6 +29,7 @@ import java.nio.file.attribute.BasicFileAttributes
import javax.annotation.PreDestroy
class ExtendedTemporaryFolder {
+
private val tempFolder = createTempDir("uat")
@PreDestroy
@@ -49,12 +50,15 @@ class ExtendedTemporaryFolder {
* Delete all files under the root temporary folder recursively. The folders are preserved.
*/
fun deleteAllFiles() {
- Files.walkFileTree(tempFolder.toPath(), object : SimpleFileVisitor<Path>() {
- @Throws(IOException::class)
- override fun visitFile(file: Path?, attrs: BasicFileAttributes?): FileVisitResult {
- file?.toFile()?.delete()
- return FileVisitResult.CONTINUE
+ Files.walkFileTree(
+ tempFolder.toPath(),
+ object : SimpleFileVisitor<Path>() {
+ @Throws(IOException::class)
+ override fun visitFile(file: Path?, attrs: BasicFileAttributes?): FileVisitResult {
+ file?.toFile()?.delete()
+ return FileVisitResult.CONTINUE
+ }
}
- })
+ )
}
}
diff --git a/ms/blueprintsprocessor/application/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/uat/utils/MarkedSlf4jNotifier.kt b/ms/blueprintsprocessor/application/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/uat/utils/MarkedSlf4jNotifier.kt
index e6198b1ba..a4320e654 100644
--- a/ms/blueprintsprocessor/application/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/uat/utils/MarkedSlf4jNotifier.kt
+++ b/ms/blueprintsprocessor/application/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/uat/utils/MarkedSlf4jNotifier.kt
@@ -38,6 +38,7 @@ class MarkedSlf4jNotifier(private val marker: Marker) : Notifier {
}
companion object {
+
private val log = LoggerFactory.getLogger("uat.WireMock")
}
}
diff --git a/ms/blueprintsprocessor/application/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/uat/utils/TestSecuritySettings.kt b/ms/blueprintsprocessor/application/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/uat/utils/TestSecuritySettings.kt
index 888ab8dcd..eec36c88d 100644
--- a/ms/blueprintsprocessor/application/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/uat/utils/TestSecuritySettings.kt
+++ b/ms/blueprintsprocessor/application/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/uat/utils/TestSecuritySettings.kt
@@ -26,6 +26,7 @@ import org.springframework.util.Base64Utils
class TestSecuritySettings {
companion object {
+
private const val authUsername = "walter.white"
private const val authPassword = "Heisenberg"
@@ -34,6 +35,7 @@ class TestSecuritySettings {
}
class ServerContextInitializer : ApplicationContextInitializer<ConfigurableApplicationContext> {
+
override fun initialize(context: ConfigurableApplicationContext) {
TestPropertySourceUtils.addInlinedPropertiesToEnvironment(
context,
diff --git a/ms/blueprintsprocessor/application/src/test/resources/logback-test.xml b/ms/blueprintsprocessor/application/src/test/resources/logback-test.xml
index 90dfed324..ed1fb9d00 100644
--- a/ms/blueprintsprocessor/application/src/test/resources/logback-test.xml
+++ b/ms/blueprintsprocessor/application/src/test/resources/logback-test.xml
@@ -29,8 +29,8 @@
</sift>
</appender>
- <logger name="org.springframework.web.HttpLogging" level="trace"/>
- <logger name="org.springframework.web.reactive.function.client.ExchangeFunctions" level="trace"/>
+ <logger name="org.springframework.web.HttpLogging" level="debug"/>
+ <logger name="org.springframework.web.reactive.function.client.ExchangeFunctions" level="debug"/>
<!-- Helpful to optimize Spring Context caching to speed-up tests
and prevent resorting to @DirtiesContext as much as possible -->
@@ -39,7 +39,7 @@
<!-- Please refer to https://thoughts-on-java.org/hibernate-logging-guide/
for a lengthy discussion on good Hibernate logging practices -->
<logger name="org.hibernate.SQL" level="debug"/>
- <logger name="org.hibernate.type.descriptor.sql" level="trace"/>
+ <logger name="org.hibernate.type.descriptor.sql" level="debug"/>
<logger name="org.apache.http" level="debug"/>
<logger name="org.apache.http.wire" level="error"/>