diff options
author | Lee Anjella Macabuhay <lee.anjella.macabuhay@est.tech> | 2024-12-11 12:38:53 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2024-12-11 12:38:53 +0000 |
commit | 29061930922eeb686da7f91ec7852b7ee875c739 (patch) | |
tree | 13be256aa3aefa8fdb36ead38c4e87d394008a4f /integration-test | |
parent | b3af94c350bbba26463435671f8b6774e37b0ba4 (diff) | |
parent | 9c4745535aeb1e68e1a3c8fdda358dbcbb673362 (diff) |
Merge "Policy Executor API Review Board Comments"
Diffstat (limited to 'integration-test')
-rw-r--r-- | integration-test/src/test/groovy/org/onap/cps/integration/base/PolicyDispatcher.groovy | 10 |
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) |