summaryrefslogtreecommitdiffstats
path: root/main/src/test
diff options
context:
space:
mode:
authorLiam Fallon <liam.fallon@est.tech>2019-04-10 16:22:25 +0000
committerGerrit Code Review <gerrit@onap.org>2019-04-10 16:22:25 +0000
commitb793c0cedf08d44de56073d24256567f50dcd1c3 (patch)
treea5241dafc9ea44503729f5eb19d185020fb7de55 /main/src/test
parenta183c027762a5087760fe17c21b115eb4dcc21ff (diff)
parentf156e04114c5e67ad59d3b7f12e6ddf9e8442755 (diff)
Merge "Current draft of undeploy"
Diffstat (limited to 'main/src/test')
-rw-r--r--main/src/test/java/org/onap/policy/pap/main/rest/depundep/TestPdpGroupDeleteControllerV1.java (renamed from main/src/test/java/org/onap/policy/pap/main/rest/TestPdpGroupDeleteControllerV1.java)19
1 files changed, 10 insertions, 9 deletions
diff --git a/main/src/test/java/org/onap/policy/pap/main/rest/TestPdpGroupDeleteControllerV1.java b/main/src/test/java/org/onap/policy/pap/main/rest/depundep/TestPdpGroupDeleteControllerV1.java
index dd4fe937..e1c8c519 100644
--- a/main/src/test/java/org/onap/policy/pap/main/rest/TestPdpGroupDeleteControllerV1.java
+++ b/main/src/test/java/org/onap/policy/pap/main/rest/depundep/TestPdpGroupDeleteControllerV1.java
@@ -19,7 +19,7 @@
* ============LICENSE_END=========================================================
*/
-package org.onap.policy.pap.main.rest;
+package org.onap.policy.pap.main.rest.depundep;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;
@@ -28,6 +28,7 @@ import javax.ws.rs.client.Invocation;
import javax.ws.rs.core.Response;
import org.junit.Test;
import org.onap.policy.models.pap.concepts.PdpGroupDeleteResponse;
+import org.onap.policy.pap.main.rest.CommonPapRestServer;
public class TestPdpGroupDeleteControllerV1 extends CommonPapRestServer {
@@ -88,13 +89,13 @@ public class TestPdpGroupDeleteControllerV1 extends CommonPapRestServer {
Invocation.Builder invocationBuilder = sendRequest(uri);
Response rawresp = invocationBuilder.delete();
PdpGroupDeleteResponse resp = rawresp.readEntity(PdpGroupDeleteResponse.class);
- assertEquals(Response.Status.OK.getStatusCode(), rawresp.getStatus());
- assertNull(resp.getErrorDetails());
+ assertEquals(Response.Status.INTERNAL_SERVER_ERROR.getStatusCode(), rawresp.getStatus());
+ assertEquals("cannot find policy: my-name", resp.getErrorDetails());
rawresp = invocationBuilder.delete();
resp = rawresp.readEntity(PdpGroupDeleteResponse.class);
- assertEquals(Response.Status.OK.getStatusCode(), rawresp.getStatus());
- assertNull(resp.getErrorDetails());
+ assertEquals(Response.Status.INTERNAL_SERVER_ERROR.getStatusCode(), rawresp.getStatus());
+ assertEquals("cannot find policy: my-name", resp.getErrorDetails());
// verify it fails when no authorization info is included
checkUnauthRequest(uri, req -> req.delete());
@@ -107,13 +108,13 @@ public class TestPdpGroupDeleteControllerV1 extends CommonPapRestServer {
Invocation.Builder invocationBuilder = sendRequest(uri);
Response rawresp = invocationBuilder.delete();
PdpGroupDeleteResponse resp = rawresp.readEntity(PdpGroupDeleteResponse.class);
- assertEquals(Response.Status.OK.getStatusCode(), rawresp.getStatus());
- assertNull(resp.getErrorDetails());
+ assertEquals(Response.Status.INTERNAL_SERVER_ERROR.getStatusCode(), rawresp.getStatus());
+ assertEquals("cannot find policy: my-name 3", resp.getErrorDetails());
rawresp = invocationBuilder.delete();
resp = rawresp.readEntity(PdpGroupDeleteResponse.class);
- assertEquals(Response.Status.OK.getStatusCode(), rawresp.getStatus());
- assertNull(resp.getErrorDetails());
+ assertEquals(Response.Status.INTERNAL_SERVER_ERROR.getStatusCode(), rawresp.getStatus());
+ assertEquals("cannot find policy: my-name 3", resp.getErrorDetails());
// verify it fails when no authorization info is included
checkUnauthRequest(uri, req -> req.delete());