From a4cc3554804540b49d9b778f75b158d6c1ec5899 Mon Sep 17 00:00:00 2001 From: "puthuparambil.aditya" Date: Wed, 28 Apr 2021 16:39:32 +0100 Subject: Fix Get descendent to support xpaths that end in list values Issue-ID: CPS-367 Signed-off-by: puthuparambil.aditya Change-Id: I3234afd8b8b69c5a3c87db1669d9b304f9fcaa49 --- .../CpsDataPersistenceQueryDataNodeSpec.groovy | 44 +++++++++++++++------- 1 file changed, 30 insertions(+), 14 deletions(-) (limited to 'cps-ri/src/test/groovy') diff --git a/cps-ri/src/test/groovy/org/onap/cps/spi/impl/CpsDataPersistenceQueryDataNodeSpec.groovy b/cps-ri/src/test/groovy/org/onap/cps/spi/impl/CpsDataPersistenceQueryDataNodeSpec.groovy index bfc088db2a..8acfe783da 100644 --- a/cps-ri/src/test/groovy/org/onap/cps/spi/impl/CpsDataPersistenceQueryDataNodeSpec.groovy +++ b/cps-ri/src/test/groovy/org/onap/cps/spi/impl/CpsDataPersistenceQueryDataNodeSpec.groovy @@ -76,7 +76,6 @@ class CpsDataPersistenceQueryDataNodeSpec extends CpsPersistenceSpecBase { return flatMap } - @Sql([CLEAR_DATA, SET_DATA]) def 'Cps Path query for single leaf value with type: #type.'() { when: 'a query is executed to get a data node by the given cps path' @@ -120,14 +119,14 @@ class CpsDataPersistenceQueryDataNodeSpec extends CpsPersistenceSpecBase { } @Sql([CLEAR_DATA, SET_DATA]) - def 'Cps Path query using descendant anywhere with %scenario '() { + def 'Cps Path query using descendant anywhere with #scenario '() { when: 'a query is executed to get a data node by the given cps path' def result = objectUnderTest.queryDataNodes(DATASPACE_NAME, ANCHOR_FOR_DATA_NODES_WITH_LEAVES, cpsPath, OMIT_DESCENDANTS) then: 'the correct number of data nodes are retrieved' result.size() == expectedXPaths.size() and: 'xpaths of the retrieved data nodes are as expected' for(int i = 0; i