diff options
author | danielhanrahan <daniel.hanrahan@est.tech> | 2024-11-22 12:50:19 +0000 |
---|---|---|
committer | danielhanrahan <daniel.hanrahan@est.tech> | 2024-11-26 11:45:32 +0000 |
commit | 05e97441ad192b69051fbb67263284eb99ee1c41 (patch) | |
tree | 947c2bb52fc266da64e202ebab446713fa98eddf /cps-ri/src/test | |
parent | e50b36d17de45bc64eebb305a80dc62ac4ee0928 (diff) |
Don't handle root xpath in getFragmentEntity
getFragmentEntity is an internal method only used for resovling
parent xpaths. The root xpath handling is never reachable.
- Remove root xpath handling in getFragmentEntity
- Clean up unneeded FragmentRepository code
Issue-ID: CPS-2511
Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech>
Change-Id: I910065bdb2e7c5fbb7c67af87f3f68af6c0fd4e0
Diffstat (limited to 'cps-ri/src/test')
-rw-r--r-- | cps-ri/src/test/groovy/org/onap/cps/ri/CpsDataPersistenceServiceImplSpec.groovy | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cps-ri/src/test/groovy/org/onap/cps/ri/CpsDataPersistenceServiceImplSpec.groovy b/cps-ri/src/test/groovy/org/onap/cps/ri/CpsDataPersistenceServiceImplSpec.groovy index 36bf55e2db..500fe76a90 100644 --- a/cps-ri/src/test/groovy/org/onap/cps/ri/CpsDataPersistenceServiceImplSpec.groovy +++ b/cps-ri/src/test/groovy/org/onap/cps/ri/CpsDataPersistenceServiceImplSpec.groovy @@ -246,7 +246,7 @@ class CpsDataPersistenceServiceImplSpec extends Specification { def createDataNodeAndMockRepositoryMethodSupportingIt(xpath, scenario) { def dataNode = new DataNodeBuilder().withXpath(xpath).build() def fragmentEntity = new FragmentEntity(xpath: xpath, childFragments: []) - mockFragmentRepository.getByAnchorAndXpath(_, xpath) >> fragmentEntity + mockFragmentRepository.findByAnchorIdAndXpath(_, xpath) >> fragmentEntity if ('EXCEPTION' == scenario) { mockFragmentRepository.save(fragmentEntity) >> { throw new StaleStateException("concurrent updates") } } |