diff options
author | RY303T <RY303T@att.com> | 2017-10-03 14:18:28 -0400 |
---|---|---|
committer | RY303T <RY303T@att.com> | 2017-10-03 14:18:54 -0400 |
commit | c985da3414e60d998e9853221bf375a663b0c8f2 (patch) | |
tree | d03d54e3907518da787c3070239bed2001209acc /appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/test | |
parent | 58ac30a6f6070da54cce13192df6238645268720 (diff) |
Update VMURL to use a range for the version
Replaced hardcoded 'v2' in url format with a range
Issue-Id: APPC-257
Change-Id: I0411f15d0d2166fb7cf72d2df587ea17b9c8705b
Signed-off-by: RY303T <RY303T@att.com>
Diffstat (limited to 'appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/test')
-rw-r--r-- | appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/test/java/org/openecomp/appc/adapter/iaas/impl/TestVMURL.java | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/test/java/org/openecomp/appc/adapter/iaas/impl/TestVMURL.java b/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/test/java/org/openecomp/appc/adapter/iaas/impl/TestVMURL.java index c1434273d..46dd5eea9 100644 --- a/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/test/java/org/openecomp/appc/adapter/iaas/impl/TestVMURL.java +++ b/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/test/java/org/openecomp/appc/adapter/iaas/impl/TestVMURL.java @@ -94,6 +94,22 @@ public class TestVMURL { assertEquals("/api/multicloud/v0/cloudowner_region", url.getPath()); assertEquals(TENANTID, url.getTenantId()); assertEquals(VMID, url.getServerId()); + assertEquals("v2",url.getVersion()); + assertEquals(url.toString(), URL); + } + + @Test + public void testValidURL4() { + URL = "http://msb.onap.org:80/api/multicloud/v0/cloudowner_region/v2.1/abcde12345fghijk6789lmnopq123rst/servers/abc12345-1234-5678-890a-abcdefg12345"; + VMURL url = VMURL.parseURL(URL); + assertNotNull(url); + assertEquals("http", url.getScheme()); + assertEquals("msb.onap.org", url.getHost()); + assertEquals("80", url.getPort()); + assertEquals("/api/multicloud/v0/cloudowner_region", url.getPath()); + assertEquals(TENANTID, url.getTenantId()); + assertEquals(VMID, url.getServerId()); + assertEquals("v2.1",url.getVersion()); assertEquals(url.toString(), URL); } |