diff options
author | Gamboa, Gilbert <gilbert.g.gamboa@att.com> | 2019-10-07 10:09:51 -0400 |
---|---|---|
committer | Benjamin, Max (mb388a) <mb388a@att.com> | 2019-10-07 14:34:31 -0400 |
commit | 110724f489ba8416a9921cee8f94410e58307af0 (patch) | |
tree | 3209fbd04824e4b31b57b4ecbf082463e2d5ead6 /bpmn/so-bpmn-infrastructure-flows/src/test | |
parent | 6392515d91c00df8cb925ec9e99273a2f9e4744f (diff) |
Converted tests to use LATEST
Always use LATEST for A&AI based tests rather than a particular version
Issue-ID: SO-2398
Signed-off-by: Benjamin, Max (mb388a) <mb388a@att.com>
Change-Id: I7840b46f8d50b74a6e6b98270c4f3febc4d0b993
Diffstat (limited to 'bpmn/so-bpmn-infrastructure-flows/src/test')
-rw-r--r-- | bpmn/so-bpmn-infrastructure-flows/src/test/java/org/onap/so/bpmn/infrastructure/process/CreateVcpeResCustServiceSimplifiedTest.java | 37 |
1 files changed, 21 insertions, 16 deletions
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/java/org/onap/so/bpmn/infrastructure/process/CreateVcpeResCustServiceSimplifiedTest.java b/bpmn/so-bpmn-infrastructure-flows/src/test/java/org/onap/so/bpmn/infrastructure/process/CreateVcpeResCustServiceSimplifiedTest.java index 5b095a9983..1cd8295fa2 100644 --- a/bpmn/so-bpmn-infrastructure-flows/src/test/java/org/onap/so/bpmn/infrastructure/process/CreateVcpeResCustServiceSimplifiedTest.java +++ b/bpmn/so-bpmn-infrastructure-flows/src/test/java/org/onap/so/bpmn/infrastructure/process/CreateVcpeResCustServiceSimplifiedTest.java @@ -43,6 +43,7 @@ import org.onap.ccsdk.cds.controllerblueprints.processing.api.ExecutionServiceIn import org.onap.so.BaseBPMNTest; import org.onap.so.GrpcNettyServer; import org.onap.so.bpmn.mock.FileUtil; +import org.onap.so.client.aai.AAIVersion; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; @@ -60,7 +61,7 @@ public class CreateVcpeResCustServiceSimplifiedTest extends BaseBPMNTest { private static final int DMAAP_DELAY_TIME_MS = 2000; private static final String TEST_PROCESSINSTANCE_KEY = "CreateVcpeResCustService_simplified"; - + private static final AAIVersion VERSION = AAIVersion.LATEST; private String testBusinessKey; private String requestObject; private String responseObject; @@ -230,7 +231,8 @@ public class CreateVcpeResCustServiceSimplifiedTest extends BaseBPMNTest { String aaiResponse = "{\n" + " \"results\": [\n" + " {\n" + " \"resource-type\": \"service-instance\",\n" - + " \"resource-link\": \"https://localhost:8443/aai/v15/business/customers/customer/ADemoCustomerInCiti/service-subscriptions/service-subscription/vCPE/service-instances/service-instance/key3\"\n" + + " \"resource-link\": \"https://localhost:8443/aai/" + VERSION + + "/business/customers/customer/ADemoCustomerInCiti/service-subscriptions/service-subscription/vCPE/service-instances/service-instance/key3\"\n" + " }\n" + " ]\n" + "}"; String aaiPnfEntry = "{ \n" + " \"pnf-name\":\"PNFDemo\",\n" + " \"pnf-id\":\"testtest\",\n" @@ -240,52 +242,55 @@ public class CreateVcpeResCustServiceSimplifiedTest extends BaseBPMNTest { /** * Get the AAI entry for globalCustomerId as specified in the request file. */ - wireMockServer.stubFor( - get(urlPathMatching("/aai/v15/business/customers/customer/ADemoCustomerInCiti.*")).willReturn(ok())); + wireMockServer + .stubFor(get(urlPathMatching("/aai/" + VERSION + "/business/customers/customer/ADemoCustomerInCiti.*")) + .willReturn(ok())); /** * PUT the service to AAI with globalCustomerId, service type as specified in the request file. Service instance * id is generated during runtime, REGEX is used to represent the information. */ - wireMockServer.stubFor(put(urlPathMatching( - "/aai/v15/business/customers/customer/ADemoCustomerInCiti/service-subscriptions/service-subscription/vCPE/service-instances/service-instance/.*"))); + wireMockServer.stubFor(put(urlPathMatching("/aai/" + VERSION + + "/business/customers/customer/ADemoCustomerInCiti/service-subscriptions/service-subscription/vCPE/service-instances/service-instance/.*"))); - wireMockServer.stubFor(get(urlPathMatching( - "/aai/v15/business/customers/customer/ADemoCustomerInCiti/service-subscriptions/service-subscription/vCPE/service-instances/service-instance/.*")) + wireMockServer.stubFor(get(urlPathMatching("/aai/" + VERSION + + "/business/customers/customer/ADemoCustomerInCiti/service-subscriptions/service-subscription/vCPE/service-instances/service-instance/.*")) .willReturn(okJson(aaiResponse))); /** * Get the service from AAI */ - wireMockServer.stubFor(get(urlPathMatching("/aai/v15/nodes/service-instances/service-instance/.*")) + wireMockServer.stubFor(get(urlPathMatching("/aai/" + VERSION + "/nodes/service-instances/service-instance/.*")) .willReturn(okJson(aaiResponse))); /** * Put the project as specified in the request file to AAI. */ - wireMockServer.stubFor(put(urlEqualTo("/aai/v15/business/projects/project/Project-Demonstration"))); + wireMockServer.stubFor(put(urlEqualTo("/aai/" + VERSION + "/business/projects/project/Project-Demonstration"))); /** * GET the project as specified in the request file to AAI. */ - wireMockServer.stubFor( - get(urlPathMatching("/aai/v15/business/projects/project/Project-Demonstration")).willReturn(ok())); + wireMockServer + .stubFor(get(urlPathMatching("/aai/" + VERSION + "/business/projects/project/Project-Demonstration")) + .willReturn(ok())); /** * PUT the PNF correlation ID to AAI. */ - wireMockServer.stubFor(put(urlEqualTo("/aai/v15/network/pnfs/pnf/PNFDemo"))); + wireMockServer.stubFor(put(urlEqualTo("/aai/" + VERSION + "/network/pnfs/pnf/PNFDemo"))); /** * Get the PNF entry from AAI. */ - wireMockServer.stubFor(get(urlEqualTo("/aai/v15/network/pnfs/pnf/PNFDemo")).willReturn(okJson(aaiPnfEntry))); + wireMockServer.stubFor( + get(urlEqualTo("/aai/" + VERSION + "/network/pnfs/pnf/PNFDemo")).willReturn(okJson(aaiPnfEntry))); /** * Put the PNF relationship */ - wireMockServer.stubFor(put( - urlEqualTo("/aai/v15/business/projects/project/Project-Demonstration/relationship-list/relationship"))); + wireMockServer.stubFor(put(urlEqualTo("/aai/" + VERSION + + "/business/projects/project/Project-Demonstration/relationship-list/relationship"))); } /** |