aboutsummaryrefslogtreecommitdiffstats
path: root/src/test
diff options
context:
space:
mode:
authorXue Gao <xg353y@intl.att.com>2020-03-31 12:30:47 +0000
committerGerrit Code Review <gerrit@onap.org>2020-03-31 12:30:47 +0000
commit73be3cb5e615c119a09d95117246a141bbb55af7 (patch)
treee4812523e6c6cd64a89b7501b7935dbcf8e03dbe /src/test
parentab8b4df23e6e2e819ccc5aac7043de336cabc4b7 (diff)
parenta2dbf1f653cba8c2d2835b36e8c89c9e41c5d1bb (diff)
Merge "Fix the policy_id not set"
Diffstat (limited to 'src/test')
-rw-r--r--src/test/java/org/onap/clamp/loop/DcaeComponentTest.java10
-rw-r--r--src/test/java/org/onap/clamp/loop/DeployFlowTestItCase.java2
-rw-r--r--src/test/resources/example/sdc/expected-result/deployment-parameters-single-blueprint.json4
3 files changed, 10 insertions, 6 deletions
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", "<xml></xml>");
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", "<xml></xml>", "yamlcontent",
- "{\"dcaeDeployParameters\":{\"loop template blueprint\": {\"policy_id\": \"name\"}}}",
+ "{\"dcaeDeployParameters\":{\"uniqueBlueprintParameters\": {\"policy_id\": \"name\"}}}",
"UUID-blueprint");
LoopTemplate template = new LoopTemplate();
template.setName("templateName");
diff --git a/src/test/resources/example/sdc/expected-result/deployment-parameters-single-blueprint.json b/src/test/resources/example/sdc/expected-result/deployment-parameters-single-blueprint.json
index 494c2e4ff..7140a4748 100644
--- a/src/test/resources/example/sdc/expected-result/deployment-parameters-single-blueprint.json
+++ b/src/test/resources/example/sdc/expected-result/deployment-parameters-single-blueprint.json
@@ -1,9 +1,9 @@
{
"dcaeDeployParameters": {
- "loop template blueprint": {
+ "uniqueBlueprintParameters": {
"location_id": "",
"service_id": "",
- "policy_id": "loop template blueprint"
+ "policy_id": "testName1"
}
}
} \ No newline at end of file