diff options
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/java/org/onap/clamp/clds/model/dcae/DcaeInventoryResponseCacheTest.java | 3 | ||||
-rw-r--r-- | src/test/java/org/onap/clamp/loop/deploy/BlueprintInputParametersTest.java (renamed from src/test/java/org/onap/clamp/loop/deploy/DeployParametersTest.java) | 5 | ||||
-rwxr-xr-x | src/test/resources/http-cache/third_party_proxy.py | 2 |
3 files changed, 6 insertions, 4 deletions
diff --git a/src/test/java/org/onap/clamp/clds/model/dcae/DcaeInventoryResponseCacheTest.java b/src/test/java/org/onap/clamp/clds/model/dcae/DcaeInventoryResponseCacheTest.java index 70d1b4ac..26cc831e 100644 --- a/src/test/java/org/onap/clamp/clds/model/dcae/DcaeInventoryResponseCacheTest.java +++ b/src/test/java/org/onap/clamp/clds/model/dcae/DcaeInventoryResponseCacheTest.java @@ -32,6 +32,9 @@ public class DcaeInventoryResponseCacheTest { public static DcaeInventoryCache inventoryCache = new DcaeInventoryCache(); + /** + * Initialize the responses. + */ @BeforeClass public static void createExample() { DcaeInventoryResponse response1 = new DcaeInventoryResponse(); diff --git a/src/test/java/org/onap/clamp/loop/deploy/DeployParametersTest.java b/src/test/java/org/onap/clamp/loop/deploy/BlueprintInputParametersTest.java index 8834ef66..75ca25cf 100644 --- a/src/test/java/org/onap/clamp/loop/deploy/DeployParametersTest.java +++ b/src/test/java/org/onap/clamp/loop/deploy/BlueprintInputParametersTest.java @@ -41,7 +41,7 @@ import org.onap.clamp.loop.Loop; import org.onap.clamp.policy.microservice.MicroServicePolicy; import org.onap.sdc.tosca.parser.exceptions.SdcToscaParserException; -public class DeployParametersTest { +public class BlueprintInputParametersTest { private BlueprintArtifact buildFakeBuildprintArtifact(String blueprintFilePath) throws IOException { BlueprintArtifact blueprintArtifact = Mockito.mock(BlueprintArtifact.class); @@ -77,8 +77,7 @@ public class DeployParametersTest { umServiceSet.add(umService); Mockito.when(loop.getMicroServicePolicies()).thenReturn(umServiceSet); - DeployParameters deployParams = new DeployParameters(buildFakeCsarHandler(), loop); - JsonObject paramJson = deployParams.getDeploymentParametersinJson(); + JsonObject paramJson = DcaeDeployParameters.getDcaeDeploymentParametersInJson(buildFakeCsarHandler(), loop); Assert.assertEquals(JsonUtils.GSON_JPA_MODEL.toJson(paramJson), ResourceFileUtil.getResourceAsString("example/sdc/expected-result/deployment-parameters.json")); diff --git a/src/test/resources/http-cache/third_party_proxy.py b/src/test/resources/http-cache/third_party_proxy.py index 5ec9f46c..9dcc4b3a 100755 --- a/src/test/resources/http-cache/third_party_proxy.py +++ b/src/test/resources/http-cache/third_party_proxy.py @@ -237,7 +237,7 @@ class Proxy(SimpleHTTPServer.SimpleHTTPRequestHandler): with open(cached_file_content, 'w+') as f: f.write(self.data_string) return True - elif self.path.startswith("/policy/api/v1/policytypes/") and http_type == "GET": + elif (self.path.startswith("/policy/api/v1/policytypes/") or self.path.startswith("/policy/pap/v1/policies/deployed/")) and http_type == "GET": print "self.path start with /policy/api/v1/policytypes/, generating response json..." jsonGenerated = "{\"policyTypeId\": \"onap.policies.controlloop.operational\",\"policyTypeVersion\": \"1.0.0\",\"policyId\": \"OPERATIONAL_z711F_v1_0_ResourceInstanceName1_tca\"}" print "jsonGenerated: " + jsonGenerated |