summaryrefslogtreecommitdiffstats
path: root/adapters/mso-adapter-utils/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'adapters/mso-adapter-utils/src/test')
-rw-r--r--adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/beans/VnfRollbackTest.java11
-rw-r--r--adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoHeatUtilsTest.java2
-rw-r--r--adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoHeatUtilsWithUpdateTest.java8
-rw-r--r--adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoMulticloudUtilsTest.java8
4 files changed, 17 insertions, 12 deletions
diff --git a/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/beans/VnfRollbackTest.java b/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/beans/VnfRollbackTest.java
index 163f141c5d..444a9a8e94 100644
--- a/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/beans/VnfRollbackTest.java
+++ b/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/beans/VnfRollbackTest.java
@@ -33,6 +33,7 @@ public class VnfRollbackTest extends BaseTest {
private String vnfId = "testVnfId";
private String tenantId = "testTenantId";
+ private String cloudOwner = "testCloudOwner";
private String cloudSiteId = "testCloudSiteId";
private boolean tenantCreated = true;
private boolean vnfCreated = true;
@@ -42,16 +43,17 @@ public class VnfRollbackTest extends BaseTest {
private String requestType = "testRequestType";
private String modelCustomizationUuid = "testModelCustimizationUuid";
private String orchestrationMode = "testOrchestrationMode";
- private static final String VNF_ROLLBACK_STRING = "VnfRollback: cloud=testCloudSiteId, tenant=testTenantId, vnf=testVnfId, "
+ private static final String VNF_ROLLBACK_STRING = "VnfRollback: cloud=testCloudSiteId, cloudOwner=testCloudOwner, tenant=testTenantId, vnf=testVnfId, "
+ "tenantCreated=true, vnfCreated=true, requestType = testRequestType, modelCustomizationUuid=testModelCustimizationUuid, mode=testOrchestrationMode";
@Test
public void VnfRollbackInstantiationTest() {
- vnfRollback = new VnfRollback(vnfId, tenantId, cloudSiteId, tenantCreated, vnfCreated,
+ vnfRollback = new VnfRollback(vnfId, tenantId, cloudOwner, cloudSiteId, tenantCreated, vnfCreated,
msoRequest, volumeGroupName, volumeGroupId, requestType, modelCustomizationUuid);
assertEquals(vnfId, vnfRollback.getVnfId());
assertEquals(tenantId, vnfRollback.getTenantId());
+ assertEquals(cloudOwner, vnfRollback.getCloudOwner());
assertEquals(cloudSiteId, vnfRollback.getCloudSiteId());
assertEquals(tenantCreated, vnfRollback.getTenantCreated());
assertEquals(vnfCreated, vnfRollback.getVnfCreated());
@@ -64,11 +66,12 @@ public class VnfRollbackTest extends BaseTest {
@Test
public void VnfRollbackInstantiationOrchestrationModeTest() {
- vnfRollback = new VnfRollback(vnfId, tenantId, cloudSiteId, tenantCreated, vnfCreated,
+ vnfRollback = new VnfRollback(vnfId, tenantId, cloudOwner, cloudSiteId, tenantCreated, vnfCreated,
msoRequest, volumeGroupName, volumeGroupId, requestType, modelCustomizationUuid, orchestrationMode);
assertEquals(vnfId, vnfRollback.getVnfId());
assertEquals(tenantId, vnfRollback.getTenantId());
+ assertEquals(cloudOwner, vnfRollback.getCloudOwner());
assertEquals(cloudSiteId, vnfRollback.getCloudSiteId());
assertEquals(tenantCreated, vnfRollback.getTenantCreated());
assertEquals(vnfCreated, vnfRollback.getVnfCreated());
@@ -82,7 +85,7 @@ public class VnfRollbackTest extends BaseTest {
@Test
public void toStringTest() {
- vnfRollback = new VnfRollback(vnfId, tenantId, cloudSiteId, tenantCreated, vnfCreated,
+ vnfRollback = new VnfRollback(vnfId, tenantId, cloudOwner, cloudSiteId, tenantCreated, vnfCreated,
msoRequest, volumeGroupName, volumeGroupId, requestType, modelCustomizationUuid, orchestrationMode);
assertEquals(VNF_ROLLBACK_STRING, vnfRollback.toString());
diff --git a/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoHeatUtilsTest.java b/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoHeatUtilsTest.java
index f9fc9284fe..888d376d37 100644
--- a/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoHeatUtilsTest.java
+++ b/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoHeatUtilsTest.java
@@ -229,7 +229,7 @@ public class MsoHeatUtilsTest extends BaseTest{
StubOpenStack.mockOpenStackResponseAccess(wireMockPort);
StubOpenStack.mockOpenStackPostStack_200("OpenstackResponse_Stack_Created.json");
StubOpenStack.mockOpenStackGet("TEST-stack/stackId");
- StackInfo stackInfo = heatUtils.createStack(cloudSite.getId(), "tenantId", "TEST-stack",
+ StackInfo stackInfo = heatUtils.createStack(cloudSite.getId(), "CloudOwner", "tenantId", "TEST-stack",
"TEST-heat", new HashMap<>(), false, 1, "TEST-env",
new HashMap<>(), new HashMap<>(), false);
assertNotNull(stackInfo);
diff --git a/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoHeatUtilsWithUpdateTest.java b/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoHeatUtilsWithUpdateTest.java
index b735e735c9..5691d9cd69 100644
--- a/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoHeatUtilsWithUpdateTest.java
+++ b/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoHeatUtilsWithUpdateTest.java
@@ -67,6 +67,7 @@ public class MsoHeatUtilsWithUpdateTest extends TestDataSetup {
@InjectMocks
private MsoHeatUtilsWithUpdate heatUtils;
+ private String cloudOwner;
private String cloudSiteId;
private String tenantId;
private String stackName;
@@ -79,6 +80,7 @@ public class MsoHeatUtilsWithUpdateTest extends TestDataSetup {
public void before() {
MockitoAnnotations.initMocks(this);
+ cloudOwner = "cloudOwner";
cloudSiteId = "cloudSiteId";
tenantId = "tenantId";
stackName = "stackName";
@@ -104,7 +106,7 @@ public class MsoHeatUtilsWithUpdateTest extends TestDataSetup {
doReturn("0").when(environment).getProperty(isA(String.class), isA(String.class));
doReturn(updateStack).when(heatUtils).queryHeatStack(isA(Heat.class), isA(String.class));
- StackInfo actualStackInfo = heatUtils.updateStack(cloudSiteId, tenantId, stackName,
+ StackInfo actualStackInfo = heatUtils.updateStack(cloudSiteId, cloudOwner, tenantId, stackName,
heatTemplate, stackInputs, pollForCompletion, timeoutMinutes);
assertThat(actualStackInfo, sameBeanAs(expectedStackInfo));
@@ -129,7 +131,7 @@ public class MsoHeatUtilsWithUpdateTest extends TestDataSetup {
doReturn("0").when(environment).getProperty(isA(String.class), isA(String.class));
doReturn(updateStack).when(heatUtils).queryHeatStack(isA(Heat.class), isA(String.class));
- StackInfo actualStackInfo = heatUtils.updateStack(cloudSiteId, tenantId, stackName,
+ StackInfo actualStackInfo = heatUtils.updateStack(cloudSiteId, cloudOwner, tenantId, stackName,
heatTemplate, stackInputs, pollForCompletion, timeoutMinutes, environmentString);
assertThat(actualStackInfo, sameBeanAs(expectedStackInfo));
@@ -155,7 +157,7 @@ public class MsoHeatUtilsWithUpdateTest extends TestDataSetup {
doReturn("0").when(environment).getProperty(isA(String.class), isA(String.class));
doReturn(updateStack).when(heatUtils).queryHeatStack(isA(Heat.class), isA(String.class));
- StackInfo actualStackInfo = heatUtils.updateStack(cloudSiteId, tenantId, stackName,
+ StackInfo actualStackInfo = heatUtils.updateStack(cloudSiteId, cloudOwner, tenantId, stackName,
heatTemplate, stackInputs, pollForCompletion, timeoutMinutes , environmentString, files);
assertThat(actualStackInfo, sameBeanAs(expectedStackInfo));
diff --git a/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoMulticloudUtilsTest.java b/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoMulticloudUtilsTest.java
index fcb651e4dd..b999b49ab1 100644
--- a/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoMulticloudUtilsTest.java
+++ b/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoMulticloudUtilsTest.java
@@ -64,7 +64,7 @@ public class MsoMulticloudUtilsTest extends BaseTest {
.willReturn(aResponse().withHeader("Content-Type", "application/json")
.withBody(CREATE_STACK_RESPONSE)
.withStatus(HttpStatus.SC_CREATED)));
- StackInfo result = multicloudUtils.createStack("MTN13", "TEST-tenant", "TEST-stack",
+ StackInfo result = multicloudUtils.createStack("MTN13", "CloudOwner", "TEST-tenant", "TEST-stack",
"TEST-heat", new HashMap<>(), false, 200, "TEST-env",
new HashMap<>(), new HashMap<>());
assertNotNull(result);
@@ -79,7 +79,7 @@ public class MsoMulticloudUtilsTest extends BaseTest {
cloudSite.setIdentityService(new CloudIdentity());
when(cloudConfigMock.getCloudSite("MTN13")).
thenReturn(Optional.of(cloudSite));
- multicloudUtilsMock.createStack("MTN13", "TEST-tenant", "TEST-stack",
+ multicloudUtilsMock.createStack("MTN13", "CloudOwner", "TEST-tenant", "TEST-stack",
"TEST-heat", new HashMap<>(), false, 200, "TEST-env",
new HashMap<>(), new HashMap<>());
} catch (MsoException e) {
@@ -95,7 +95,7 @@ public class MsoMulticloudUtilsTest extends BaseTest {
stubFor(post(urlPathEqualTo("/v2.0"))
.willReturn(aResponse().withHeader("Content-Type", "application/json")
.withStatus(HttpStatus.SC_BAD_REQUEST)));
- multicloudUtils.createStack("MTN13", "TEST-tenant", "TEST-stack",
+ multicloudUtils.createStack("MTN13", "CloudOwner", "TEST-tenant", "TEST-stack",
"TEST-heat", new HashMap<>(), false, 200, "TEST-env",
new HashMap<>(), new HashMap<>());
} catch (MsoException e) {
@@ -110,7 +110,7 @@ public class MsoMulticloudUtilsTest extends BaseTest {
stubFor(post(urlPathEqualTo("/v2.0"))
.willReturn(aResponse().withHeader("Content-Type", "application/json")
.withStatus(HttpStatus.SC_CREATED)));
- StackInfo result = multicloudUtils.createStack("MTN13", "TEST-tenant", "TEST-stack",
+ StackInfo result = multicloudUtils.createStack("MTN13", "CloudOwner", "TEST-tenant", "TEST-stack",
"TEST-heat", new HashMap<>(), false, 200, "TEST-env",
new HashMap<>(), new HashMap<>());
assertNotNull(result);