From eb2b884f92a6b5405d7abffc919a3c5d6f9c8389 Mon Sep 17 00:00:00 2001 From: "Determe, Sebastien (sd378r)" Date: Fri, 22 Sep 2017 18:13:26 +0200 Subject: [PATCH] Fix bug at runtime There was a missing class due to policy dependency changed Change-Id: Id8d85a8925c1ac2164528333672a552cb55ca5ca Issue-ID: CLAMP-48 Signed-off-by: Determe, Sebastien (sd378r) --- pom.xml | 20 ++++++++++++++++++++ .../org/onap/clamp/clds/it/OperationPolicyReqIT.java | 3 +-- .../java/org/onap/clamp/clds/it/PolicyClientIT.java | 10 +--------- .../operational-policy/yaml-policy-chain-1.yaml | 1 + .../operational-policy/yaml-policy-chain-2.yaml | 1 + 5 files changed, 24 insertions(+), 11 deletions(-) diff --git a/pom.xml b/pom.xml index 8e9ed9d1..fbf99c34 100644 --- a/pom.xml +++ b/pom.xml @@ -430,6 +430,26 @@ + + org.onap.policy.drools-applications + aai + 1.1.0 + + + log4j + log4j + + + org.slf4j + slf4j-log4j12 + + + apache-log4j-extras + log4j + + + + com.fasterxml.jackson.core jackson-databind diff --git a/src/test/java/org/onap/clamp/clds/it/OperationPolicyReqIT.java b/src/test/java/org/onap/clamp/clds/it/OperationPolicyReqIT.java index e57c9dde..0f874e98 100644 --- a/src/test/java/org/onap/clamp/clds/it/OperationPolicyReqIT.java +++ b/src/test/java/org/onap/clamp/clds/it/OperationPolicyReqIT.java @@ -45,12 +45,11 @@ import org.onap.clamp.clds.util.ResourceFileUtil; import org.onap.policy.api.AttributeType; import org.onap.policy.controlloop.policy.builder.BuilderException; import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.boot.test.context.SpringBootTest.WebEnvironment; import org.springframework.test.context.TestPropertySource; import org.springframework.test.context.junit4.SpringRunner; @RunWith(SpringRunner.class) -@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT) +@SpringBootTest @TestPropertySource(locations = "classpath:application-no-camunda.properties") public class OperationPolicyReqIT extends AbstractIT { diff --git a/src/test/java/org/onap/clamp/clds/it/PolicyClientIT.java b/src/test/java/org/onap/clamp/clds/it/PolicyClientIT.java index 09f1efef..c57ddbfd 100644 --- a/src/test/java/org/onap/clamp/clds/it/PolicyClientIT.java +++ b/src/test/java/org/onap/clamp/clds/it/PolicyClientIT.java @@ -47,7 +47,6 @@ import org.onap.clamp.clds.util.ResourceFileUtil; import org.onap.policy.api.AttributeType; import org.skyscreamer.jsonassert.JSONAssert; import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.boot.test.context.SpringBootTest.WebEnvironment; import org.springframework.test.context.TestPropertySource; import org.springframework.test.context.junit4.SpringRunner; @@ -56,7 +55,7 @@ import org.springframework.test.context.junit4.SpringRunner; * Policy Delegates in tests. */ @RunWith(SpringRunner.class) -@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT) +@SpringBootTest @TestPropertySource(locations = "classpath:application-no-camunda.properties") public class PolicyClientIT extends AbstractIT { String modelProp; @@ -90,7 +89,6 @@ public class PolicyClientIT extends AbstractIT { } catch (Exception e) { assertTrue(e.getMessage().contains("Policy send failed: PE500 ")); } - System.out.println(responseMessage); } } @@ -104,7 +102,6 @@ public class PolicyClientIT extends AbstractIT { Map> attributes = OperationalPolicyReq.formatAttributes(refProp, prop, policy.getId(), policyChain); String responseMessage = policyClient.sendBrmsPolicy(attributes, prop, operationalPolicyRequestUuid); - System.out.println(responseMessage); } } } @@ -123,7 +120,6 @@ public class PolicyClientIT extends AbstractIT { } catch (Exception e) { assertTrue(e.getMessage().contains("Exception while communicating with Policy")); } - System.out.println(responseMessage); } } @@ -139,7 +135,6 @@ public class PolicyClientIT extends AbstractIT { } catch (Exception e) { assertTrue(e.getMessage().contains("Policy delete failed: PE500 ")); } - System.out.println(responseMessage); } } @@ -152,7 +147,6 @@ public class PolicyClientIT extends AbstractIT { for (PolicyChain policyChain : policy.getPolicyChains()) { prop.setPolicyUniqueId(policyChain.getPolicyId()); String responseMessage = policyClient.deleteBrms(prop); - System.out.println(responseMessage); } } } @@ -169,8 +163,6 @@ public class PolicyClientIT extends AbstractIT { } catch (Exception e) { assertTrue(e.getMessage().contains("Policy delete failed: PE500 ")); } - - System.out.println(responseMessage); } } diff --git a/src/test/resources/example/operational-policy/yaml-policy-chain-1.yaml b/src/test/resources/example/operational-policy/yaml-policy-chain-1.yaml index 029cfbb7..80b9b7ca 100644 --- a/src/test/resources/example/operational-policy/yaml-policy-chain-1.yaml +++ b/src/test/resources/example/operational-policy/yaml-policy-chain-1.yaml @@ -2,6 +2,7 @@ controlLoop: abatement: false controlLoopName: controlNameTest + pnf: null resources: - resourceInvariantUUID: null resourceName: 6c7aaec2-59eb-41d9-8681-b7f976ab668d diff --git a/src/test/resources/example/operational-policy/yaml-policy-chain-2.yaml b/src/test/resources/example/operational-policy/yaml-policy-chain-2.yaml index 029cfbb7..80b9b7ca 100644 --- a/src/test/resources/example/operational-policy/yaml-policy-chain-2.yaml +++ b/src/test/resources/example/operational-policy/yaml-policy-chain-2.yaml @@ -2,6 +2,7 @@ controlLoop: abatement: false controlLoopName: controlNameTest + pnf: null resources: - resourceInvariantUUID: null resourceName: 6c7aaec2-59eb-41d9-8681-b7f976ab668d -- 2.16.6