Fix the bad test 81/17481/1
authorDeterme, Sebastien (sd378r) <sd378r@intl.att.com>
Fri, 6 Oct 2017 15:46:08 +0000 (17:46 +0200)
committerDeterme, Sebastien (sd378r) <sd378r@intl.att.com>
Fri, 6 Oct 2017 15:46:08 +0000 (17:46 +0200)
This test fails when pnfType is set in the yaml

Change-Id: I7ec3996ca0bbf40334063011d9d745155b1ba6e8
Issue-ID: CLAMP-54
Signed-off-by: Determe, Sebastien (sd378r) <sd378r@intl.att.com>
src/test/java/org/onap/clamp/clds/it/OperationPolicyReqItCase.java

index 8fba573..c87bbf6 100644 (file)
@@ -76,7 +76,7 @@ public class OperationPolicyReqItCase extends AbstractItCase {
         yaml = yaml.replaceAll("id: (.*)", "id: <generatedId>");
         yaml = yaml.replaceAll("success: (.*)", "success: <generatedId>");
         // Remove this field as not always present (depends of policy api)
-        yaml = yaml.replaceAll("  pnf: null", "");
+        yaml = yaml.replaceAll("  pnf: null" + System.lineSeparator(), "");
         yaml = yaml.substring(yaml.indexOf("controlLoop:"), yaml.length());
 
         assertEquals(ResourceFileUtil.getResourceAsString("example/operational-policy/yaml-policy-chain-1.yaml"), yaml);
@@ -86,7 +86,7 @@ public class OperationPolicyReqItCase extends AbstractItCase {
         yaml = yaml.replaceAll("id: (.*)", "id: <generatedId>");
         yaml = yaml.replaceAll("success: (.*)", "success: <generatedId>");
         // Remove this field as not always present (depends of policy api)
-        yaml = yaml.replaceAll("  pnf: null", "");
+        yaml = yaml.replaceAll("  pnf: null" + System.lineSeparator(), "");
         yaml = yaml.substring(yaml.indexOf("controlLoop:"), yaml.length());
 
         assertEquals(ResourceFileUtil.getResourceAsString("example/operational-policy/yaml-policy-chain-2.yaml"), yaml);