summaryrefslogtreecommitdiffstats
path: root/catalog-be/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'catalog-be/src/test')
-rw-r--r--catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ComponentInstanceBusinessLogicTest.java10
-rw-r--r--catalog-be/src/test/resources/config/catalog-be/error-configuration.yaml9
2 files changed, 18 insertions, 1 deletions
diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ComponentInstanceBusinessLogicTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ComponentInstanceBusinessLogicTest.java
index f22b346052..f6a86ac02f 100644
--- a/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ComponentInstanceBusinessLogicTest.java
+++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ComponentInstanceBusinessLogicTest.java
@@ -319,6 +319,7 @@ class ComponentInstanceBusinessLogicTest {
property.setName("property");
property.setValue("newVal");
property.setType("string");
+ property.setUniqueId("propId");
properties.add(property);
List<ComponentInstanceProperty> origProperties = new ArrayList<>();
@@ -328,6 +329,14 @@ class ComponentInstanceBusinessLogicTest {
origProperty.setType("string");
origProperties.add(origProperty);
+ List<PropertyDefinition> ciProperties = new ArrayList<>();
+ PropertyDefinition ciProperty = new ComponentInstanceProperty();
+ ciProperty.setName("property");
+ ciProperty.setValue("value");
+ ciProperty.setType("string");
+ ciProperty.setUniqueId("propId");
+ ciProperties.add(ciProperty);
+
Map<String, DataTypeDefinition> types = new HashMap<>();
DataTypeDefinition dataTypeDef = new DataTypeDefinition();
types.put("string", dataTypeDef);
@@ -340,6 +349,7 @@ class ComponentInstanceBusinessLogicTest {
component.setComponentInstancesProperties(componentInstanceProps);
ComponentInstance ci = createComponentInstance("ci1");
ci.setUniqueId("resourceId");
+ ci.setProperties(ciProperties);
component.setComponentInstances(Arrays.asList(ci, createComponentInstance("ci2"),
createComponentInstance(componentInstanceID)));
diff --git a/catalog-be/src/test/resources/config/catalog-be/error-configuration.yaml b/catalog-be/src/test/resources/config/catalog-be/error-configuration.yaml
index b3df674126..fc4e7d33b7 100644
--- a/catalog-be/src/test/resources/config/catalog-be/error-configuration.yaml
+++ b/catalog-be/src/test/resources/config/catalog-be/error-configuration.yaml
@@ -2848,4 +2848,11 @@ errors:
CAPABILITY_NOT_FOUND:
code: 404
message: "Capability '%1' was not found for model '%2'."
- messageId: "SVC4014" \ No newline at end of file
+ messageId: "SVC4014"
+
+ #---------SVC4015-----------------------------
+ CANNOT_CHANGE_CONSTRAINTS: {
+ code: 400,
+ message: "Cannot change this properties constraints as the resource is an instance.",
+ messageId: "SVC4015"
+ } \ No newline at end of file