diff options
author | ToineSiebelink <toine.siebelink@est.tech> | 2024-09-16 15:42:30 +0100 |
---|---|---|
committer | ToineSiebelink <toine.siebelink@est.tech> | 2024-09-17 09:24:42 +0100 |
commit | 6191d41c8d8ee20f0388172faf57e2bf8bbf8862 (patch) | |
tree | bfedd60f8b2ba705dec2b1fec96243e0e7515e33 /policy-executor-stub/src/test/groovy/org | |
parent | fc49910404bf3868788e4b8d91d93047ce297f4d (diff) |
Policy Executor API: Add Prefix in Yaml
- Remove servers from yaml.
- Add prefix to path in yaml.
- Remove basepath prefix from Controller Impl.
- Added policy server port to 8093.
- Exposed docker env. vars for policy services.
Issue-ID: CPS-2291
Change-Id: Idcc9e23f9d63bad2480537dc8d39523fe82b4b83
Signed-off-by: ToineSiebelink <toine.siebelink@est.tech>
Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
Diffstat (limited to 'policy-executor-stub/src/test/groovy/org')
-rw-r--r-- | policy-executor-stub/src/test/groovy/org/onap/cps/policyexecutor/stub/controller/PolicyExecutorStubControllerSpec.groovy | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/policy-executor-stub/src/test/groovy/org/onap/cps/policyexecutor/stub/controller/PolicyExecutorStubControllerSpec.groovy b/policy-executor-stub/src/test/groovy/org/onap/cps/policyexecutor/stub/controller/PolicyExecutorStubControllerSpec.groovy index efb12ac619..064e0234a3 100644 --- a/policy-executor-stub/src/test/groovy/org/onap/cps/policyexecutor/stub/controller/PolicyExecutorStubControllerSpec.groovy +++ b/policy-executor-stub/src/test/groovy/org/onap/cps/policyexecutor/stub/controller/PolicyExecutorStubControllerSpec.groovy @@ -108,15 +108,11 @@ class PolicyExecutorStubControllerSpec extends Specification { } def 'Execute policy action with invalid json for request data.'() { - given: 'a policy execution request' - def request = new Request('ncmp-delete-schema:1.0.0', 'invalid json') - def policyExecutionRequest = new PolicyExecutionRequest('some decision type', [request]) - def requestBody = objectMapper.writeValueAsString(policyExecutionRequest) when: 'request is posted' def response = mockMvc.perform(post(url) .header('Authorization','some string') .contentType(MediaType.APPLICATION_JSON) - .content(requestBody)) + .content('invalid json')) .andReturn().response then: 'response status is Bad Request' assert response.status == HttpStatus.BAD_REQUEST.value() @@ -143,7 +139,7 @@ class PolicyExecutorStubControllerSpec extends Specification { def createRequestBody(decisionType, schema, targetIdentifier) { def ncmpDelete = new NcmpDelete(targetIdentifier: targetIdentifier) - def request = new Request(schema, objectMapper.writeValueAsString(ncmpDelete)) + def request = new Request(schema, ncmpDelete) def policyExecutionRequest = new PolicyExecutionRequest(decisionType, [request]) return objectMapper.writeValueAsString(policyExecutionRequest) } |