aboutsummaryrefslogtreecommitdiffstats
path: root/integration-test/src
diff options
context:
space:
mode:
authorToineSiebelink <toine.siebelink@est.tech>2024-12-09 11:22:29 +0000
committerToineSiebelink <toine.siebelink@est.tech>2024-12-10 18:33:49 +0000
commit9c4745535aeb1e68e1a3c8fdda358dbcbb673362 (patch)
tree0e01214a546223d35a23cd7b932d208e389c1757 /integration-test/src
parentf325ca432bae326cc279c85907543ccf3f45400c (diff)
Policy Executor API Review Board Comments
- Implemented Guild review comments in API - Updated Stub to reflect new API and 'support' all operations - Updated production code to use new API - Updated Semi-Integration Tests Issue-ID: CPS-2479 Change-Id: Ibe307b0d859312b534009a384e9f71e1ea2affe0 Signed-off-by: ToineSiebelink <toine.siebelink@est.tech>
Diffstat (limited to 'integration-test/src')
-rw-r--r--integration-test/src/test/groovy/org/onap/cps/integration/base/PolicyDispatcher.groovy10
1 files changed, 5 insertions, 5 deletions
diff --git a/integration-test/src/test/groovy/org/onap/cps/integration/base/PolicyDispatcher.groovy b/integration-test/src/test/groovy/org/onap/cps/integration/base/PolicyDispatcher.groovy
index b08d1c1548..f1e5449476 100644
--- a/integration-test/src/test/groovy/org/onap/cps/integration/base/PolicyDispatcher.groovy
+++ b/integration-test/src/test/groovy/org/onap/cps/integration/base/PolicyDispatcher.groovy
@@ -46,22 +46,22 @@ class PolicyDispatcher extends Dispatcher {
return new MockResponse().setResponseCode(401)
}
- if (recordedRequest.path != '/policy-executor/api/v1/execute') {
+ if (recordedRequest.path != '/operation-permission/v1/permissions') {
return new MockResponse().setResponseCode(400)
}
def body = objectMapper.readValue(recordedRequest.getBody().readUtf8(), Map.class)
- def targetIdentifier = body.get('requests').get(0).get('data').get('targetIdentifier')
+ def targetIdentifier = body.get('operations').get(0).get('targetIdentifier')
def responseAsMap = [:]
- responseAsMap.put('decisionId',1)
+ responseAsMap.put('id',1)
if (targetIdentifier == "mock slow response") {
TimeUnit.SECONDS.sleep(2) // One second more then configured readTimeoutInSeconds
}
if (allowAll || targetIdentifier == 'fdn1') {
- responseAsMap.put('decision','allow')
+ responseAsMap.put('permissionResult','allow')
responseAsMap.put('message','')
} else {
- responseAsMap.put('decision','deny from mock server (dispatcher)')
+ responseAsMap.put('permissionResult','deny from mock server (dispatcher)')
responseAsMap.put('message','I only like fdn1')
}
def responseAsString = objectMapper.writeValueAsString(responseAsMap)