aboutsummaryrefslogtreecommitdiffstats
path: root/ms/blueprintsprocessor/application/src
diff options
context:
space:
mode:
authorJozsef Csongvai <jozsef.csongvai@bell.ca>2022-04-12 19:24:37 -0400
committerJozsef Csongvai <jozsef.csongvai@bell.ca>2022-04-12 19:31:23 -0400
commit577316e6c8fbf21bb25f41174cd80f7bd8df327a (patch)
tree8977e5e1877bf8bac713a35e6926a5e66e2deb0c /ms/blueprintsprocessor/application/src
parent795c2d4349e04c4f7c0d4d5fb467727b8118b44a (diff)
Return errormessages in failing imperative workflows
Instead of discarding error messages after each node has executed, they are now kept until the workflow completes. If the workflow completes without exceptions, it means that all errors were handled and the error messages can be cleared. If the workflow does complete with exceptions, all error messages will be propagated in the response. Also update UatExecutor to enable expected status codes other than 200. Issue-ID: CCSDK-3630 Signed-off-by: Jozsef Csongvai <jozsef.csongvai@bell.ca> Change-Id: I94fd81c342ad2a798e64051c603beb62bf1aaacd
Diffstat (limited to 'ms/blueprintsprocessor/application/src')
-rw-r--r--ms/blueprintsprocessor/application/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/uat/utils/UatExecutor.kt3
1 files changed, 2 insertions, 1 deletions
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 1e1d3ac2a..ae9b7d35c 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
@@ -241,7 +241,8 @@ class UatExecutor(
}
val response = client.execute(request) { response ->
val statusLine = response.statusLine
- assertThat("${process.name}", statusLine.statusCode, equalTo(HttpStatus.SC_OK))
+ val expectedCode = expectedResponse?.get("status")?.get("code")?.intValue()
+ assertThat("${process.name}", statusLine.statusCode, equalTo(expectedCode ?: HttpStatus.SC_OK))
val entity = response.entity
assertThat("${process.name} Response contains no content", entity, notNullValue())
entity.content.bufferedReader().use { it.readText() }