summaryrefslogtreecommitdiffstats
path: root/src/test/java/org/onap
diff options
context:
space:
mode:
authorsebdet <sebastien.determe@intl.att.com>2021-01-24 16:40:18 +0100
committerS�bastien Determe <sebastien.determe@intl.att.com>2021-02-08 14:41:24 +0000
commit9d04a9cc8c6f4b12ae60cc0d4d42f71085f72328 (patch)
treea6767d8304537ea649b75e4bf90987369ae2de6d /src/test/java/org/onap
parentd2178bc9f7d6c06f60a3a8afecd83e428d84cd78 (diff)
Add new Camel route
Add the new rest endpoint in camel + add new permission type + add robot test for that route + small refactoring of trst files Issue-ID: POLICY-2924 Signed-off-by: sebdet <sebastien.determe@intl.att.com> Change-Id: I623cc8ec1724513cdb92eeea000adca5c2433bae
Diffstat (limited to 'src/test/java/org/onap')
-rw-r--r--src/test/java/org/onap/policy/clamp/clds/it/RobotItCase.java11
-rw-r--r--src/test/java/org/onap/policy/clamp/policy/pdpgroup/PoliciesPdpMergerTest.java4
2 files changed, 12 insertions, 3 deletions
diff --git a/src/test/java/org/onap/policy/clamp/clds/it/RobotItCase.java b/src/test/java/org/onap/policy/clamp/clds/it/RobotItCase.java
index 8c06929e1..2f17c61bf 100644
--- a/src/test/java/org/onap/policy/clamp/clds/it/RobotItCase.java
+++ b/src/test/java/org/onap/policy/clamp/clds/it/RobotItCase.java
@@ -2,7 +2,7 @@
* ============LICENSE_START=======================================================
* ONAP CLAMP
* ================================================================================
- * Copyright (C) 2020 AT&T Intellectual Property. All rights
+ * Copyright (C) 2020-2021 AT&T Intellectual Property. All rights
* reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -23,6 +23,8 @@
package org.onap.policy.clamp.clds.it;
+import static org.apache.commons.io.FileUtils.copyInputStreamToFile;
+
import com.att.eelf.configuration.EELFLogger;
import com.att.eelf.configuration.EELFManager;
import com.github.dockerjava.api.DockerClient;
@@ -111,6 +113,13 @@ public class RobotItCase {
} catch (InterruptedException e) {
throw new Exception("Failed to retrieve logs of container " + id, e);
}
+
+ copyInputStreamToFile(client.copyArchiveFromContainerCmd(id, "/opt/robotframework/reports/output.xml").exec(),
+ new File("target/robotframework/output.xml"));
+ copyInputStreamToFile(client.copyArchiveFromContainerCmd(id, "/opt/robotframework/reports/log.html").exec(),
+ new File("target/robotframework/log.html"));
+ copyInputStreamToFile(client.copyArchiveFromContainerCmd(id, "/opt/robotframework/reports/report.html").exec(),
+ new File("target/robotframework/report.html"));
client.stopContainerCmd(id);
}
}
diff --git a/src/test/java/org/onap/policy/clamp/policy/pdpgroup/PoliciesPdpMergerTest.java b/src/test/java/org/onap/policy/clamp/policy/pdpgroup/PoliciesPdpMergerTest.java
index b3fd3f19a..5da68f47f 100644
--- a/src/test/java/org/onap/policy/clamp/policy/pdpgroup/PoliciesPdpMergerTest.java
+++ b/src/test/java/org/onap/policy/clamp/policy/pdpgroup/PoliciesPdpMergerTest.java
@@ -94,8 +94,8 @@ public class PoliciesPdpMergerTest {
@Test
public void testUpdatePdpGroupOfPolicyModels() throws IOException {
- JSONAssert.assertEquals(ResourceFileUtils.getResourceAsString("clds/policy-merger.json"), PoliciesPdpMerger
- .mergePoliciesAndPdpGroupStates(
+ JSONAssert.assertEquals(ResourceFileUtils.getResourceAsString("example/policy/policy-merger.json"),
+ PoliciesPdpMerger.mergePoliciesAndPdpGroupStates(
ResourceFileUtils.getResourceAsString("http-cache/example/policy/api/v1/policies/.file"),
pdpGroupsJson), true);
}