diff options
author | 2024-08-19 10:01:46 +0000 | |
---|---|---|
committer | 2024-08-19 10:01:46 +0000 | |
commit | a336424ecec26fe7812f1b5682a6d9400133ed32 (patch) | |
tree | 45adaaa062f439ffae0eaf2e6b09298688369fd6 /integration-test | |
parent | 8f88e837708b0c8da5693f59286454ca9f1e56a3 (diff) | |
parent | 337ca7b2f98c439e33cacd4b10f1227d511fe101 (diff) |
Diffstat (limited to 'integration-test')
-rw-r--r-- | integration-test/src/test/groovy/org/onap/cps/integration/functional/cps/DataServiceIntegrationSpec.groovy | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/integration-test/src/test/groovy/org/onap/cps/integration/functional/cps/DataServiceIntegrationSpec.groovy b/integration-test/src/test/groovy/org/onap/cps/integration/functional/cps/DataServiceIntegrationSpec.groovy index b274324d7..d8395d0c9 100644 --- a/integration-test/src/test/groovy/org/onap/cps/integration/functional/cps/DataServiceIntegrationSpec.groovy +++ b/integration-test/src/test/groovy/org/onap/cps/integration/functional/cps/DataServiceIntegrationSpec.groovy @@ -459,17 +459,19 @@ class DataServiceIntegrationSpec extends FunctionalSpecBase { def 'Get delta between 2 anchors'() { when: 'attempt to get delta report between anchors' def result = objectUnderTest.getDeltaByDataspaceAndAnchors(FUNCTIONAL_TEST_DATASPACE_3, BOOKSTORE_ANCHOR_3, BOOKSTORE_ANCHOR_5, '/', OMIT_DESCENDANTS) + and: 'report is ordered based on xpath' + result = result.toList().sort { it.xpath } then: 'delta report contains expected number of changes' result.size() == 3 and: 'delta report contains UPDATE action with expected xpath' assert result[0].getAction() == 'update' assert result[0].getXpath() == '/bookstore' - and: 'delta report contains REMOVE action with expected xpath' - assert result[1].getAction() == 'remove' - assert result[1].getXpath() == "/bookstore-address[@bookstore-name='Easons-1']" and: 'delta report contains ADD action with expected xpath' - assert result[2].getAction() == 'add' - assert result[2].getXpath() == "/bookstore-address[@bookstore-name='Crossword Bookstores']" + assert result[1].getAction() == 'add' + assert result[1].getXpath() == "/bookstore-address[@bookstore-name='Crossword Bookstores']" + and: 'delta report contains REMOVE action with expected xpath' + assert result[2].getAction() == 'remove' + assert result[2].getXpath() == "/bookstore-address[@bookstore-name='Easons-1']" } def 'Get delta between 2 anchors returns empty response when #scenario'() { |