diff options
author | 2025-03-05 17:28:07 +0000 | |
---|---|---|
committer | 2025-03-11 09:33:56 +0000 | |
commit | b701e3090b90b4bb3aef93c9f89a6d642e6e084a (patch) | |
tree | 46c3ba9a98d6e7a45832b2514b837545190321af /cps-service/src/test | |
parent | 025b21992b7b88d03f630beb8299bf2be28286a9 (diff) |
Allow limiting results in queryDataLeaf
This exposes queryResultLimit parameter in queryDataLeaf,
same as was implemented for queryDataNodes API.
Issue-ID: CPS-2680
Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech>
Change-Id: Ieb922ac1acc91dbfd67fb5ade7856213a2f93ce8
Diffstat (limited to 'cps-service/src/test')
-rw-r--r-- | cps-service/src/test/groovy/org/onap/cps/impl/CpsQueryServiceImplSpec.groovy | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/cps-service/src/test/groovy/org/onap/cps/impl/CpsQueryServiceImplSpec.groovy b/cps-service/src/test/groovy/org/onap/cps/impl/CpsQueryServiceImplSpec.groovy index 9db4aa4c3e..d581727e40 100644 --- a/cps-service/src/test/groovy/org/onap/cps/impl/CpsQueryServiceImplSpec.groovy +++ b/cps-service/src/test/groovy/org/onap/cps/impl/CpsQueryServiceImplSpec.groovy @@ -77,8 +77,8 @@ class CpsQueryServiceImplSpec extends Specification { and: 'the CpsValidator is called on the dataspaceName, schemaSetName and anchorName' 1 * mockCpsValidator.validateNameCharacters(dataspaceName) where: 'all fetch descendants options are supported' - fetchDescendantsOption << [FetchDescendantsOption.OMIT_DESCENDANTS, FetchDescendantsOption.INCLUDE_ALL_DESCENDANTS, - FetchDescendantsOption.DIRECT_CHILDREN_ONLY, new FetchDescendantsOption(10)] + fetchDescendantsOption << [FetchDescendantsOption.OMIT_DESCENDANTS, FetchDescendantsOption.INCLUDE_ALL_DESCENDANTS, + FetchDescendantsOption.DIRECT_CHILDREN_ONLY, new FetchDescendantsOption(10)] } def 'Query total anchors for dataspace and cps path.'() { @@ -91,7 +91,7 @@ class CpsQueryServiceImplSpec extends Specification { def 'Query data leaf.'() { when: 'a query for a specific leaf is executed' objectUnderTest.queryDataLeaf('some-dataspace', 'some-anchor', '/cps-path/@id', Object.class) - then: 'solution is not implemented yet' - 1 * mockCpsDataPersistenceService.queryDataLeaf('some-dataspace', 'some-anchor', '/cps-path/@id', Object.class) + then: 'the persistence service is called once with the correct parameters' + 1 * mockCpsDataPersistenceService.queryDataLeaf('some-dataspace', 'some-anchor', '/cps-path/@id', 0, Object.class) } } |