diff options
author | 2020-02-12 18:20:06 -0600 | |
---|---|---|
committer | 2020-02-17 20:25:22 +0000 | |
commit | 6dfab64262ea5816c761042192c84e498a3177ab (patch) | |
tree | 665dd3e68a9fc4303898fc9d7fe34d4c404ef7a4 /controlloop/common/feature-controlloop-management/src/test/java/org | |
parent | 43b12b12c0c427bc89ab88f4d4034821d4c9835d (diff) |
tosca compliant op policy support + vcpe test
Tosca Compliant and Toscal Legacy Operational policies are
both supported for backwards compatibility.
vCPE usecase junits to support 2 equivalent policies,
one tosca compliant and the other one legacy.
Issue-ID: POLICY-2360
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: Iafbfc92bbec42e6a3fe4ceb4a9a17c85e636ea14
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Diffstat (limited to 'controlloop/common/feature-controlloop-management/src/test/java/org')
-rw-r--r-- | controlloop/common/feature-controlloop-management/src/test/java/org/onap/policy/drools/server/restful/RestControlLoopManagerTest.java | 23 |
1 files changed, 1 insertions, 22 deletions
diff --git a/controlloop/common/feature-controlloop-management/src/test/java/org/onap/policy/drools/server/restful/RestControlLoopManagerTest.java b/controlloop/common/feature-controlloop-management/src/test/java/org/onap/policy/drools/server/restful/RestControlLoopManagerTest.java index c2a9e536f..7fad4468d 100644 --- a/controlloop/common/feature-controlloop-management/src/test/java/org/onap/policy/drools/server/restful/RestControlLoopManagerTest.java +++ b/controlloop/common/feature-controlloop-management/src/test/java/org/onap/policy/drools/server/restful/RestControlLoopManagerTest.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * ONAP * ================================================================================ - * Copyright (C) 2018-2019 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2018-2020 AT&T Intellectual Property. All rights reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -28,11 +28,9 @@ import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; -import java.util.Collections; import java.util.Properties; import java.util.concurrent.Callable; import java.util.concurrent.TimeUnit; -import javax.ws.rs.client.Entity; import javax.ws.rs.core.Response.Status; import org.junit.AfterClass; import org.junit.BeforeClass; @@ -179,25 +177,6 @@ public class RestControlLoopManagerTest { assertEquals(Status.NOT_FOUND.getStatusCode(), HttpClientFactoryInstance.getClientFactory() .get(CONTROLLER).get(URL_CONTEXT_PATH_CONTROLLOOP_POLICY).getStatus()); - - String policyFromFile = new String(Files.readAllBytes(Paths.get(POLICY))); - HttpClientFactoryInstance.getClientFactory().get(CONTROLLER).put( - URL_CONTEXT_PATH_CONTROLLOOP_POLICY, Entity.text(policyFromFile), - Collections.emptyMap()); - - assertEquals(Status.OK.getStatusCode(), HttpClientFactoryInstance.getClientFactory() - .get(CONTROLLER).get(URL_CONTEXT_PATH_CONTROLLOOP_POLICY).getStatus()); - - String policyFromPdpD = HttpClientFactoryInstance.getClientFactory().get(CONTROLLER) - .get(URL_CONTEXT_PATH_CONTROLLOOP_POLICY).readEntity(String.class); - - assertEquals(policyFromFile, policyFromPdpD); - - assertEquals(Status.CONFLICT.getStatusCode(), - HttpClientFactoryInstance.getClientFactory().get(CONTROLLER) - .put(URL_CONTEXT_PATH_CONTROLLOOP_POLICY, Entity.text(policyFromFile), - Collections.emptyMap()) - .getStatus()); } /** |