summaryrefslogtreecommitdiffstats
path: root/runtime/src/test/java/org/onap
diff options
context:
space:
mode:
authorsaul.gill <saul.gill@est.tech>2021-07-09 12:10:46 +0100
committersaul.gill <saul.gill@est.tech>2021-07-13 14:12:58 +0100
commitccf9b0dc2858265e3a3d7da28a653f6bc7e2e8a3 (patch)
tree0c34f1c0556bba3376a8c321ac010e44a673c2ce /runtime/src/test/java/org/onap
parent94d85829c2067c8f27f3fd5c49673b5eabbceccb (diff)
Added get json schema endpoints
Added runtime-controlloop endpoint to return Json Schema Schema returned can be for specified type within Tosca Service Template Added Camel in runtime endpoint to proxy the Schema endpoint Dependency added to pom for the json schema generation Issue-ID: POLICY-3439 Change-Id: I2a98ce16dfb3761a174c90f4b965d1a37a0d8576 Signed-off-by: saul.gill <saul.gill@est.tech>
Diffstat (limited to 'runtime/src/test/java/org/onap')
-rw-r--r--runtime/src/test/java/org/onap/policy/clamp/runtime/RuntimeCommissioningResponseTestItCase.java14
1 files changed, 14 insertions, 0 deletions
diff --git a/runtime/src/test/java/org/onap/policy/clamp/runtime/RuntimeCommissioningResponseTestItCase.java b/runtime/src/test/java/org/onap/policy/clamp/runtime/RuntimeCommissioningResponseTestItCase.java
index 0ba1486bb..7616d7a49 100644
--- a/runtime/src/test/java/org/onap/policy/clamp/runtime/RuntimeCommissioningResponseTestItCase.java
+++ b/runtime/src/test/java/org/onap/policy/clamp/runtime/RuntimeCommissioningResponseTestItCase.java
@@ -47,6 +47,20 @@ public class RuntimeCommissioningResponseTestItCase {
+ " \"name\": \"ToscaServiceTemplateSimple\", \"version\": \"1.0.0\", \"metadata\": {}}";
@Test
+ public void testToscaServiceTemplateSchemaStatus() {
+ ProducerTemplate prodTemplate = camelContext.createProducerTemplate();
+
+ Exchange exchangeResponse =
+ prodTemplate.send("direct:get-json-schema", ExchangeBuilder.anExchange(camelContext)
+ .withProperty("section", "data_types")
+ .withProperty("raiseHttpExceptionFlag", "true")
+ .build());
+
+ assertThat(HttpStatus.valueOf((Integer) exchangeResponse.getIn().getHeader(Exchange.HTTP_RESPONSE_CODE))
+ .is2xxSuccessful()).isTrue();
+ }
+
+ @Test
public void testToscaServiceTemplateStatus() {
ProducerTemplate prodTemplate = camelContext.createProducerTemplate();