aboutsummaryrefslogtreecommitdiffstats
path: root/ms/blueprintsprocessor/modules/inbounds/configs-api/src/test/kotlin
diff options
context:
space:
mode:
Diffstat (limited to 'ms/blueprintsprocessor/modules/inbounds/configs-api/src/test/kotlin')
-rw-r--r--ms/blueprintsprocessor/modules/inbounds/configs-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/configs/api/ErrorCatalogTestConfiguration.kt2
-rw-r--r--ms/blueprintsprocessor/modules/inbounds/configs-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/configs/api/ResourceConfigSnapshotControllerTest.kt82
-rw-r--r--ms/blueprintsprocessor/modules/inbounds/configs-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/configs/api/TestDatabaseConfiguration.kt6
3 files changed, 46 insertions, 44 deletions
diff --git a/ms/blueprintsprocessor/modules/inbounds/configs-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/configs/api/ErrorCatalogTestConfiguration.kt b/ms/blueprintsprocessor/modules/inbounds/configs-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/configs/api/ErrorCatalogTestConfiguration.kt
index 66fc3b2ed..5a000d157 100644
--- a/ms/blueprintsprocessor/modules/inbounds/configs-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/configs/api/ErrorCatalogTestConfiguration.kt
+++ b/ms/blueprintsprocessor/modules/inbounds/configs-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/configs/api/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/modules/inbounds/configs-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/configs/api/ResourceConfigSnapshotControllerTest.kt b/ms/blueprintsprocessor/modules/inbounds/configs-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/configs/api/ResourceConfigSnapshotControllerTest.kt
index e2fa5ca44..634c3368b 100644
--- a/ms/blueprintsprocessor/modules/inbounds/configs-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/configs/api/ResourceConfigSnapshotControllerTest.kt
+++ b/ms/blueprintsprocessor/modules/inbounds/configs-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/configs/api/ResourceConfigSnapshotControllerTest.kt
@@ -148,13 +148,13 @@ class ResourceConfigSnapshotControllerTest {
post(resourceType, resourceId, "RUNNING")
webTestClient
- .get()
- .uri("/api/v1/configs/allByID?resourceId=$resourceId")
- .exchange()
- .expectStatus().is2xxSuccessful
- .expectBody()
- .jsonPath("$.length()")
- .isEqualTo(1)
+ .get()
+ .uri("/api/v1/configs/allByID?resourceId=$resourceId")
+ .exchange()
+ .expectStatus().is2xxSuccessful
+ .expectBody()
+ .jsonPath("$.length()")
+ .isEqualTo(1)
}
}
@@ -166,13 +166,13 @@ class ResourceConfigSnapshotControllerTest {
post(resourceType, resourceId, "CANDIDATE")
webTestClient
- .get()
- .uri("/api/v1/configs/allByID?resourceId=$resourceId&status=CANDIDATE")
- .exchange()
- .expectStatus().is2xxSuccessful
- .expectBody()
- .jsonPath("$.length()")
- .isEqualTo(1)
+ .get()
+ .uri("/api/v1/configs/allByID?resourceId=$resourceId&status=CANDIDATE")
+ .exchange()
+ .expectStatus().is2xxSuccessful
+ .expectBody()
+ .jsonPath("$.length()")
+ .isEqualTo(1)
}
}
@@ -181,11 +181,11 @@ class ResourceConfigSnapshotControllerTest {
runBlocking {
webTestClient
- .get()
- .uri("/api/v1/configs/allByID")
- .exchange()
- .expectStatus().is4xxClientError
- .expectBody()
+ .get()
+ .uri("/api/v1/configs/allByID")
+ .exchange()
+ .expectStatus().is4xxClientError
+ .expectBody()
}
}
@@ -194,11 +194,11 @@ class ResourceConfigSnapshotControllerTest {
runBlocking {
webTestClient
- .get()
- .uri("/api/v1/configs/allByID?resourceId=$resourceId&status=NOTGOOD")
- .exchange()
- .expectStatus().is4xxClientError
- .expectBody()
+ .get()
+ .uri("/api/v1/configs/allByID?resourceId=$resourceId&status=NOTGOOD")
+ .exchange()
+ .expectStatus().is4xxClientError
+ .expectBody()
}
}
@@ -210,13 +210,13 @@ class ResourceConfigSnapshotControllerTest {
post(resourceType, "1", "RUNNING")
webTestClient
- .get()
- .uri("/api/v1/configs/allByType?resourceType=$resourceType")
- .exchange()
- .expectStatus().is2xxSuccessful
- .expectBody()
- .jsonPath("$.length()")
- .isEqualTo(3)
+ .get()
+ .uri("/api/v1/configs/allByType?resourceType=$resourceType")
+ .exchange()
+ .expectStatus().is2xxSuccessful
+ .expectBody()
+ .jsonPath("$.length()")
+ .isEqualTo(3)
}
}
@@ -225,11 +225,11 @@ class ResourceConfigSnapshotControllerTest {
runBlocking {
webTestClient
- .get()
- .uri("/api/v1/configs/allByType")
- .exchange()
- .expectStatus().is4xxClientError
- .expectBody()
+ .get()
+ .uri("/api/v1/configs/allByType")
+ .exchange()
+ .expectStatus().is4xxClientError
+ .expectBody()
}
}
@@ -238,11 +238,11 @@ class ResourceConfigSnapshotControllerTest {
runBlocking {
webTestClient
- .get()
- .uri("/api/v1/configs/allByType?resourceType=$resourceType&status=NOTGOOD")
- .exchange()
- .expectStatus().is4xxClientError
- .expectBody()
+ .get()
+ .uri("/api/v1/configs/allByType?resourceType=$resourceType&status=NOTGOOD")
+ .exchange()
+ .expectStatus().is4xxClientError
+ .expectBody()
}
}
diff --git a/ms/blueprintsprocessor/modules/inbounds/configs-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/configs/api/TestDatabaseConfiguration.kt b/ms/blueprintsprocessor/modules/inbounds/configs-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/configs/api/TestDatabaseConfiguration.kt
index 661e28def..ee4c0a544 100644
--- a/ms/blueprintsprocessor/modules/inbounds/configs-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/configs/api/TestDatabaseConfiguration.kt
+++ b/ms/blueprintsprocessor/modules/inbounds/configs-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/configs/api/TestDatabaseConfiguration.kt
@@ -31,9 +31,11 @@ import javax.sql.DataSource
@Configuration
@Import(BluePrintDBLibConfiguration::class)
@EnableJpaRepositories(
- basePackages = ["org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution",
+ basePackages = [
+ "org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution",
"org.onap.ccsdk.cds.blueprintsprocessor.functions.config.snapshots",
- "org.onap.ccsdk.cds.blueprintsprocessor.db.primary"],
+ "org.onap.ccsdk.cds.blueprintsprocessor.db.primary"
+ ],
entityManagerFactoryRef = "primaryEntityManager",
transactionManagerRef = "primaryTransactionManager"
)