summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichaelMorris <michael.morris@est.tech>2023-10-08 15:09:11 +0100
committerVasyl Razinkov <vasyl.razinkov@est.tech>2023-10-09 09:59:54 +0000
commitd3bf58392f2a1c98b8d2289b70844ce39fb62e64 (patch)
treeafa2388b6fffab1df6c505cdba9601348dd1a78d
parent8bb8f3a4a1862104efde7714f6b39402b15feecd (diff)
Fix error updating milestone
Signed-off-by: MichaelMorris <michael.morris@est.tech> Issue-ID: SDC-4648 Change-Id: Iff21ecf1e0b999301baf6b7a2c26218fee8856da
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ComponentInterfaceOperationBusinessLogic.java2
-rw-r--r--catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ComponentInterfaceOperationBusinessLogicTest.java7
2 files changed, 8 insertions, 1 deletions
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ComponentInterfaceOperationBusinessLogic.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ComponentInterfaceOperationBusinessLogic.java
index a10bae9c1e..32fdffe1b4 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ComponentInterfaceOperationBusinessLogic.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ComponentInterfaceOperationBusinessLogic.java
@@ -140,7 +140,7 @@ public class ComponentInterfaceOperationBusinessLogic extends BaseBusinessLogic
final OperationDataDefinition updatedOperationDataDefinition = optionalOperationDataDefinition.get();
final Optional<ComponentInstanceInterface> optionalComponentInstanceInterface = componentInstanceInterfaceList.stream().filter(
ci -> ci.getOperations().values().stream().anyMatch(
- operationDataDefinition -> operationDataDefinition.getUniqueId().equalsIgnoreCase(updatedOperationDataDefinition.getUniqueId())))
+ operationDataDefinition -> operationDataDefinition.getName().equalsIgnoreCase(updatedOperationDataDefinition.getName())))
.findFirst();
if (optionalComponentInstanceInterface.isEmpty()) {
responseFormat = componentsUtils.getResponseFormat(ActionStatus.INTERFACE_NOT_FOUND_IN_COMPONENT);
diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ComponentInterfaceOperationBusinessLogicTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ComponentInterfaceOperationBusinessLogicTest.java
index 1dd7f40730..42cf3f21d0 100644
--- a/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ComponentInterfaceOperationBusinessLogicTest.java
+++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ComponentInterfaceOperationBusinessLogicTest.java
@@ -133,6 +133,7 @@ class ComponentInterfaceOperationBusinessLogicTest extends BaseBusinessLogicMock
final Map<String, OperationDataDefinition> operations = new HashMap<>();
final OperationDataDefinition operationDataDefinition = new OperationDataDefinition();
operationDataDefinition.setUniqueId(UUID.randomUUID().toString());
+ operationDataDefinition.setName("myOperationName");
final ArtifactDataDefinition artifactDataDefinition = new ArtifactDataDefinition();
artifactDataDefinition.setArtifactName("EO Implementation info");
operationDataDefinition.setImplementation(artifactDataDefinition);
@@ -180,6 +181,7 @@ class ComponentInterfaceOperationBusinessLogicTest extends BaseBusinessLogicMock
final Map<String, OperationDataDefinition> operations = new HashMap<>();
final OperationDataDefinition operationDataDefinition = new OperationDataDefinition();
operationDataDefinition.setUniqueId(UUID.randomUUID().toString());
+ operationDataDefinition.setName("myOperationName");
final ArtifactDataDefinition artifactDataDefinition = new ArtifactDataDefinition();
final ListDataDefinition<OperationInputDefinition> inputsDefinitionListData = new ListDataDefinition<>();
OperationInputDefinition input1 = new OperationInputDefinition();
@@ -238,6 +240,7 @@ class ComponentInterfaceOperationBusinessLogicTest extends BaseBusinessLogicMock
final Map<String, OperationDataDefinition> operations = new HashMap<>();
final OperationDataDefinition operationDataDefinition = new OperationDataDefinition();
operationDataDefinition.setUniqueId(UUID.randomUUID().toString());
+ operationDataDefinition.setName("myOperationName");
final ArtifactDataDefinition artifactDataDefinition = new ArtifactDataDefinition();
final ListDataDefinition<OperationInputDefinition> inputsDefinitionListData = new ListDataDefinition<>();
OperationInputDefinition input1 = new OperationInputDefinition();
@@ -299,6 +302,7 @@ class ComponentInterfaceOperationBusinessLogicTest extends BaseBusinessLogicMock
final Map<String, OperationDataDefinition> operations = new HashMap<>();
final OperationDataDefinition operationDataDefinition = new OperationDataDefinition();
operationDataDefinition.setUniqueId(UUID.randomUUID().toString());
+ operationDataDefinition.setName("myOperationName");
final ArtifactDataDefinition artifactDataDefinition = new ArtifactDataDefinition();
artifactDataDefinition.setArtifactName("EO Implementation info");
@@ -364,6 +368,7 @@ class ComponentInterfaceOperationBusinessLogicTest extends BaseBusinessLogicMock
final Map<String, OperationDataDefinition> operations = new HashMap<>();
final OperationDataDefinition operationDataDefinition = new OperationDataDefinition();
operationDataDefinition.setUniqueId(UUID.randomUUID().toString());
+ operationDataDefinition.setName("myOperationName");
final ArtifactDataDefinition artifactDataDefinition = new ArtifactDataDefinition();
artifactDataDefinition.setArtifactName("EO Implementation info");
@@ -429,6 +434,7 @@ class ComponentInterfaceOperationBusinessLogicTest extends BaseBusinessLogicMock
final Map<String, OperationDataDefinition> operations = new HashMap<>();
final OperationDataDefinition operationDataDefinition = new OperationDataDefinition();
operationDataDefinition.setUniqueId(UUID.randomUUID().toString());
+ operationDataDefinition.setName("myOperationName");
final ArtifactDataDefinition artifactDataDefinition = new ArtifactDataDefinition();
artifactDataDefinition.setArtifactName("EO Implementation info");
operationDataDefinition.setImplementation(artifactDataDefinition);
@@ -468,6 +474,7 @@ class ComponentInterfaceOperationBusinessLogicTest extends BaseBusinessLogicMock
final Map<String, OperationDataDefinition> operations = new HashMap<>();
final OperationDataDefinition operationDataDefinition = new OperationDataDefinition();
operationDataDefinition.setUniqueId(UUID.randomUUID().toString());
+ operationDataDefinition.setName("myOperationName");
final ArtifactDataDefinition artifactDataDefinition = new ArtifactDataDefinition();
artifactDataDefinition.setArtifactName("EO Implementation info");
operationDataDefinition.setImplementation(artifactDataDefinition);