aboutsummaryrefslogtreecommitdiffstats
path: root/cps-ncmp-service
diff options
context:
space:
mode:
authorSourabh Sourabh <sourabh.sourabh@est.tech>2022-08-22 10:43:24 +0000
committerGerrit Code Review <gerrit@onap.org>2022-08-22 10:43:24 +0000
commit8d7cfc4545c3bd2efbad1eb1e5ea0cb0fcf8568c (patch)
tree033aea95352c6194aded0fe5e1aab3112dceb3f5 /cps-ncmp-service
parenta1a33160054bb9e7ffa57e18270dfa0f9a2ad77e (diff)
parent8919af5959249181b09e235e386dfd483e87402e (diff)
Merge "Fix: CM Handles for only hasAllModules Query"
Diffstat (limited to 'cps-ncmp-service')
-rw-r--r--cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/inventory/CmHandleQueries.java2
-rw-r--r--cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/inventory/CmHandleQueriesSpec.groovy2
2 files changed, 2 insertions, 2 deletions
diff --git a/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/inventory/CmHandleQueries.java b/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/inventory/CmHandleQueries.java
index 92387bab32..3dbb4a1472 100644
--- a/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/inventory/CmHandleQueries.java
+++ b/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/inventory/CmHandleQueries.java
@@ -91,7 +91,7 @@ public class CmHandleQueries {
final Map<String, NcmpServiceCmHandle> firstQuery,
final Map<String, NcmpServiceCmHandle> secondQuery) {
if (firstQuery == NO_QUERY_TO_EXECUTE && secondQuery == NO_QUERY_TO_EXECUTE) {
- return Collections.emptyMap();
+ return NO_QUERY_TO_EXECUTE;
} else if (firstQuery == NO_QUERY_TO_EXECUTE) {
return secondQuery;
} else if (secondQuery == NO_QUERY_TO_EXECUTE) {
diff --git a/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/inventory/CmHandleQueriesSpec.groovy b/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/inventory/CmHandleQueriesSpec.groovy
index 10a5d62461..7d7258dc4c 100644
--- a/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/inventory/CmHandleQueriesSpec.groovy
+++ b/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/inventory/CmHandleQueriesSpec.groovy
@@ -82,7 +82,7 @@ class CmHandleQueriesSpec extends Specification {
'the first query contains entries and second query is null' | ['PNFDemo': pnfDemoCmHandle, 'PNFDemo2': pnfDemo2CmHandle] | null || ['PNFDemo': pnfDemoCmHandle, 'PNFDemo2': pnfDemo2CmHandle]
'the second query contains entries and first query is null' | null | ['PNFDemo': pnfDemoCmHandle, 'PNFDemo3': pnfDemo3CmHandle] || ['PNFDemo': pnfDemoCmHandle, 'PNFDemo3': pnfDemo3CmHandle]
'both queries are empty' | [:] | [:] || [:]
- 'both queries are null' | null | null || [:]
+ 'both queries are null' | null | null || null
}
def 'Get Cm Handles By State'() {