From 1e85e4ee328b0d6aae39c6b7275a5fd949296b00 Mon Sep 17 00:00:00 2001 From: Alexis de Talhouët Date: Wed, 4 Sep 2019 14:57:51 -0400 Subject: Do not throw exception when no data exist. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The first time we're doing a diff, if a store operation has never been done before, we shouldn't throw exception, we should silently succeed and set the diff as empty value. Change-Id: Ie2371737758a1525da6b76ac85bceb7fe1aa4673 Issue-ID: CCSDK-1690 Signed-off-by: Alexis de Talhouët --- .../configs/api/ResourceConfigSnapshotControllerTest.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'ms/blueprintsprocessor/modules/inbounds') 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 c3f18fcba..b4c1ad0e0 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 @@ -129,14 +129,15 @@ class ResourceConfigSnapshotControllerTest { } @Test - fun `get returns 404 if entry not found`() { + fun `get returns 200 if entry not found`() { runBlocking { webTestClient .get() .uri("/api/v1/configs?resourceId=MISSING&resourceType=PNF") .exchange() - .expectStatus().isNotFound + .expectStatus().is2xxSuccessful + .expectBody() } } -- cgit 1.2.3-korg