aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDeterme, Sebastien (sd378r) <sd378r@intl.att.com>2017-09-22 18:13:26 +0200
committerDeterme, Sebastien (sd378r) <sd378r@intl.att.com>2017-09-22 18:13:26 +0200
commiteb2b884f92a6b5405d7abffc919a3c5d6f9c8389 (patch)
treebe88532de1c22bb8ce9abcb949f9f68c74bb4c8e
parentb30b002d2f68c83d7d04dc8d15199a93b6126ed2 (diff)
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) <sd378r@intl.att.com>
-rw-r--r--pom.xml20
-rw-r--r--src/test/java/org/onap/clamp/clds/it/OperationPolicyReqIT.java3
-rw-r--r--src/test/java/org/onap/clamp/clds/it/PolicyClientIT.java10
-rw-r--r--src/test/resources/example/operational-policy/yaml-policy-chain-1.yaml1
-rw-r--r--src/test/resources/example/operational-policy/yaml-policy-chain-2.yaml1
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
@@ -431,6 +431,26 @@
</exclusions>
</dependency>
<dependency>
+ <groupId>org.onap.policy.drools-applications</groupId>
+ <artifactId>aai</artifactId>
+ <version>1.1.0</version>
+ <exclusions>
+ <exclusion>
+ <artifactId>log4j</artifactId>
+ <groupId>log4j</groupId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ </exclusion>
+ <exclusion>
+ <artifactId>apache-log4j-extras</artifactId>
+ <groupId>log4j</groupId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+
+ <dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.6.3</version>
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<AttributeType, Map<String, String>> 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