From: sebdet Date: Mon, 11 Oct 2021 08:52:23 +0000 (+0200) Subject: Fix delete action in design state X-Git-Tag: 6.1.3~5 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F78%2F124778%2F3;p=policy%2Fclamp.git Fix delete action in design state It can still happen due to DCAE deployment, so this patch should fix it. + Fix test due to changes done in DCAE camel flows Issue-ID: POLICY-3707 Signed-off-by: sebdet Change-Id: I0f439fc029354a0632b2b17a452b7811df90492a --- diff --git a/runtime/src/main/resources/clds/camel/rest/clamp-api-v2.xml b/runtime/src/main/resources/clds/camel/rest/clamp-api-v2.xml index 82e1940b1..e7ba1283f 100644 --- a/runtime/src/main/resources/clds/camel/rest/clamp-api-v2.xml +++ b/runtime/src/main/resources/clds/camel/rest/clamp-api-v2.xml @@ -336,6 +336,9 @@ + + true + - - true - + + + false + + false + diff --git a/runtime/src/main/resources/clds/camel/routes/dcae-flows.xml b/runtime/src/main/resources/clds/camel/routes/dcae-flows.xml index 517fb09a9..55ec70d16 100644 --- a/runtime/src/main/resources/clds/camel/routes/dcae-flows.xml +++ b/runtime/src/main/resources/clds/camel/routes/dcae-flows.xml @@ -180,17 +180,11 @@ ${exchangeProperty['loopObject'].getLoopTemplate().getUniqueBlueprint()} == true - - true - ${exchangeProperty['loopObject'].getLoopTemplate().getUniqueBlueprint()} == false - - true - diff --git a/runtime/src/test/java/org/onap/policy/clamp/loop/DeployFlowItTestCase.java b/runtime/src/test/java/org/onap/policy/clamp/loop/DeployFlowItTestCase.java index bfd5b0377..899b6206b 100644 --- a/runtime/src/test/java/org/onap/policy/clamp/loop/DeployFlowItTestCase.java +++ b/runtime/src/test/java/org/onap/policy/clamp/loop/DeployFlowItTestCase.java @@ -154,7 +154,7 @@ public class DeployFlowItTestCase { loopTest.addMicroServicePolicy(microServicePolicy); loopService.saveOrUpdateLoop(loopTest); Exchange myCamelExchange = ExchangeBuilder.anExchange(camelContext).withProperty("loopObject", loopTest) - .build(); + .withProperty("raiseHttpExceptionFlag", true).build(); camelContext.createProducerTemplate().send("direct:undeploy-loop", myCamelExchange); @@ -189,7 +189,7 @@ public class DeployFlowItTestCase { loopTest2.addMicroServicePolicy(microServicePolicy2); loopsRepository.saveAndFlush(loopTest2); Exchange myCamelExchange = ExchangeBuilder.anExchange(camelContext).withProperty("loopObject", loopTest2) - .build(); + .withProperty("raiseHttpExceptionFlag", true).build(); camelContext.createProducerTemplate().send("direct:undeploy-loop", myCamelExchange);