aboutsummaryrefslogtreecommitdiffstats
path: root/src/test/java
diff options
context:
space:
mode:
authorsebdet <sebastien.determe@intl.att.com>2021-01-24 16:40:18 +0100
committerLiam Fallon <liam.fallon@est.tech>2021-02-10 16:18:33 +0000
commitad9f3334d908cce1d4c3c0f0d71a64f7ab6e6084 (patch)
tree58b7ba582eb9bb33ac2fc32301ae6b52c1adf8ca /src/test/java
parentcd3f004747d8513f34ded969d86cadad845505e7 (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 (cherry picked from commit 9d04a9cc8c6f4b12ae60cc0d4d42f71085f72328)
Diffstat (limited to 'src/test/java')
-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);
}