From a2dbf1f653cba8c2d2835b36e8c89c9e41c5d1bb Mon Sep 17 00:00:00 2001 From: sebdet Date: Tue, 31 Mar 2020 13:39:02 +0200 Subject: Fix the policy_id not set Fix the policy_id not set by default when it's a unique blueprint, and when it contains only one microservice Issue-ID: CLAMP-802 Signed-off-by: sebdet Change-Id: Iffe35e461395940567588228ec68ea4b7ff9a409 --- src/test/java/org/onap/clamp/loop/DcaeComponentTest.java | 10 +++++++--- src/test/java/org/onap/clamp/loop/DeployFlowTestItCase.java | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) (limited to 'src/test/java') diff --git a/src/test/java/org/onap/clamp/loop/DcaeComponentTest.java b/src/test/java/org/onap/clamp/loop/DcaeComponentTest.java index b42ba987e..7f3b57095 100644 --- a/src/test/java/org/onap/clamp/loop/DcaeComponentTest.java +++ b/src/test/java/org/onap/clamp/loop/DcaeComponentTest.java @@ -47,13 +47,15 @@ public class DcaeComponentTest { private Loop createTestLoop() { Loop loopTest = new Loop("ControlLoopTest", ""); loopTest.setGlobalPropertiesJson( - new Gson().fromJson("{\"dcaeDeployParameters\":{\"loop template blueprint\": {\"policy_id\": \"name\"}}}", JsonObject.class)); + new Gson().fromJson( + "{\"dcaeDeployParameters\":{\"uniqueBlueprintParameters\": {\"policy_id\": \"name\"}}}", + JsonObject.class)); loopTest.setLastComputedState(LoopState.DESIGN); loopTest.setDcaeDeploymentId("123456789"); loopTest.setDcaeDeploymentStatusUrl("http4://localhost:8085"); MicroServicePolicy microServicePolicy = new MicroServicePolicy("configPolicyTest", new PolicyModel("policy1", - "tosca_definitions_version: tosca_simple_yaml_1_0_0","1.0.0"), true, + "tosca_definitions_version: tosca_simple_yaml_1_0_0", "1.0.0"), true, new Gson().fromJson("{\"configtype\":\"json\"}", JsonObject.class), null, null, null); microServicePolicy.setConfigurationsJson(new Gson().fromJson("{\"param1\":\"value1\"}", JsonObject.class)); @@ -67,6 +69,7 @@ public class DcaeComponentTest { /** * Test the DcaeReponse roughly. + * * @throws IOException In case of issues */ @Test @@ -166,7 +169,8 @@ public class DcaeComponentTest { /** * Test the Converter to DcaeInventoryResponse method. - * @throws IOException In case of failure + * + * @throws IOException In case of failure * @throws ParseException In case of failure */ @Test diff --git a/src/test/java/org/onap/clamp/loop/DeployFlowTestItCase.java b/src/test/java/org/onap/clamp/loop/DeployFlowTestItCase.java index 98134e828..97fe337de 100644 --- a/src/test/java/org/onap/clamp/loop/DeployFlowTestItCase.java +++ b/src/test/java/org/onap/clamp/loop/DeployFlowTestItCase.java @@ -72,7 +72,7 @@ public class DeployFlowTestItCase { @Transactional public void deployWithSingleBlueprintTest() throws JsonSyntaxException, IOException { Loop loopTest = createLoop("ControlLoopTest", "", "yamlcontent", - "{\"dcaeDeployParameters\":{\"loop template blueprint\": {\"policy_id\": \"name\"}}}", + "{\"dcaeDeployParameters\":{\"uniqueBlueprintParameters\": {\"policy_id\": \"name\"}}}", "UUID-blueprint"); LoopTemplate template = new LoopTemplate(); template.setName("templateName"); -- cgit 1.2.3-korg