diff options
author | shivasubedi <shiva.subedi@est.tech> | 2021-04-29 12:48:05 +0100 |
---|---|---|
committer | Shiva Subedi <shiva.subedi@est.tech> | 2021-04-29 11:54:59 +0000 |
commit | 8a74ced574d566024513044859f433d263e3cc1b (patch) | |
tree | ded9f6e3ebffad554fc184ca231d4a0fa78e8c3f /cps-service/src/test/groovy | |
parent | ff7ba3a74265b62b116abb2fc34767f87444a655 (diff) |
Investigate and update Spock version
Issue-ID: CPS-368
Signed-off-by: shivasubedi <shiva.subedi@est.tech>
Change-Id: Ie8505cf29068660af6bc6b9887f593f7e3be074f
Diffstat (limited to 'cps-service/src/test/groovy')
5 files changed, 0 insertions, 16 deletions
diff --git a/cps-service/src/test/groovy/org/onap/cps/api/impl/CpsDataServiceImplSpec.groovy b/cps-service/src/test/groovy/org/onap/cps/api/impl/CpsDataServiceImplSpec.groovy index 29a2314a33..8fbf74504b 100644 --- a/cps-service/src/test/groovy/org/onap/cps/api/impl/CpsDataServiceImplSpec.groovy +++ b/cps-service/src/test/groovy/org/onap/cps/api/impl/CpsDataServiceImplSpec.groovy @@ -30,7 +30,6 @@ import org.onap.cps.spi.model.DataNodeBuilder import org.onap.cps.yang.YangTextSchemaSourceSet import org.onap.cps.yang.YangTextSchemaSourceSetBuilder import spock.lang.Specification -import spock.lang.Unroll class CpsDataServiceImplSpec extends Specification { def mockCpsDataPersistenceService = Mock(CpsDataPersistenceService) @@ -89,7 +88,6 @@ class CpsDataServiceImplSpec extends Specification { { dataNode -> dataNode.xpath == '/test-tree/branch[@name=\'New\']' }) } - @Unroll def 'Get data node with option #fetchDescendantsOption.'() { def xpath = '/xpath' def dataNode = new DataNodeBuilder().withXpath(xpath).build() @@ -101,7 +99,6 @@ class CpsDataServiceImplSpec extends Specification { fetchDescendantsOption << FetchDescendantsOption.values() } - @Unroll def 'Update data node leaves: #scenario.'() { given: 'that the admin service will return an anchor' def anchor = Anchor.builder().name(anchorName).schemaSetName(schemaSetName).build() @@ -123,7 +120,6 @@ class CpsDataServiceImplSpec extends Specification { 'level 2 node' | '/test-tree' | '{"branch": [{"name":"Name"}]}' | '/test-tree/branch[@name=\'Name\']' | ['name': 'Name'] } - @Unroll def 'Replace data node: #scenario.'() { given: 'that the admin service will return an anchor' def anchor = Anchor.builder().name(anchorName).schemaSetName(schemaSetName).build() diff --git a/cps-service/src/test/groovy/org/onap/cps/api/impl/CpsModuleServiceImplSpec.groovy b/cps-service/src/test/groovy/org/onap/cps/api/impl/CpsModuleServiceImplSpec.groovy index 261d174934..d20149bc4e 100644 --- a/cps-service/src/test/groovy/org/onap/cps/api/impl/CpsModuleServiceImplSpec.groovy +++ b/cps-service/src/test/groovy/org/onap/cps/api/impl/CpsModuleServiceImplSpec.groovy @@ -34,7 +34,6 @@ import org.springframework.cache.caffeine.CaffeineCacheManager import org.springframework.context.annotation.ComponentScan import org.springframework.test.context.ContextConfiguration import spock.lang.Specification -import spock.lang.Unroll import static org.onap.cps.spi.CascadeDeleteAllowed.CASCADE_DELETE_ALLOWED import static org.onap.cps.spi.CascadeDeleteAllowed.CASCADE_DELETE_PROHIBITED @@ -95,7 +94,6 @@ class CpsModuleServiceImplSpec extends Specification { 1 * mockModuleStoreService.getYangSchemaResources('someDataspace', 'someSchemaSet') >> yangResourcesNameToContentMap } - @Unroll def 'Delete set by name and dataspace with #cascadeDeleteOption.'() { when: 'schema set deletion is requested' objectUnderTest.deleteSchemaSet(dataspaceName, schemaSetname, cascadeDeleteOption) diff --git a/cps-service/src/test/groovy/org/onap/cps/api/impl/CpsQueryServiceImplSpec.groovy b/cps-service/src/test/groovy/org/onap/cps/api/impl/CpsQueryServiceImplSpec.groovy index 99d25ecfc8..30945152ff 100644 --- a/cps-service/src/test/groovy/org/onap/cps/api/impl/CpsQueryServiceImplSpec.groovy +++ b/cps-service/src/test/groovy/org/onap/cps/api/impl/CpsQueryServiceImplSpec.groovy @@ -22,8 +22,6 @@ package org.onap.cps.api.impl import org.onap.cps.spi.CpsDataPersistenceService import org.onap.cps.spi.FetchDescendantsOption import spock.lang.Specification -import spock.lang.Unroll - class CpsQueryServiceImplSpec extends Specification { def mockCpsDataPersistenceService = Mock(CpsDataPersistenceService) @@ -34,7 +32,6 @@ class CpsQueryServiceImplSpec extends Specification { objectUnderTest.cpsDataPersistenceService = mockCpsDataPersistenceService } - @Unroll def 'Query data nodes by cps path with #fetchDescendantsOption.'() { given: 'a dataspace name, an anchor name and a cps path' def dataspaceName = 'some dataspace' diff --git a/cps-service/src/test/groovy/org/onap/cps/utils/YangTextSchemaSourceSetSpec.groovy b/cps-service/src/test/groovy/org/onap/cps/utils/YangTextSchemaSourceSetSpec.groovy index f7efd5dffd..e58f442129 100644 --- a/cps-service/src/test/groovy/org/onap/cps/utils/YangTextSchemaSourceSetSpec.groovy +++ b/cps-service/src/test/groovy/org/onap/cps/utils/YangTextSchemaSourceSetSpec.groovy @@ -24,11 +24,9 @@ import org.onap.cps.spi.exceptions.ModelValidationException import org.onap.cps.yang.YangTextSchemaSourceSetBuilder import org.opendaylight.yangtools.yang.common.Revision import spock.lang.Specification -import spock.lang.Unroll class YangTextSchemaSourceSetSpec extends Specification { - @Unroll def 'Building a valid YangTextSchemaSourceSet using #filenameCase filename.'() { given: 'a yang model (file)' def yangResourceNameToContent = [filename: TestUtils.getResourceFileContent('bookstore.yang')] @@ -44,7 +42,6 @@ class YangTextSchemaSourceSetSpec extends Specification { 'RFC-6020 recommended' | 'bookstore-test@2020-09-15.YANG' } - @Unroll def 'Building YangTextSchemaSourceSet error case: #description.'() { given: 'a file with #description' def yangResourceNameToContent = TestUtils.getYangResourcesAsMap(filename) diff --git a/cps-service/src/test/groovy/org/onap/cps/utils/YangUtilsSpec.groovy b/cps-service/src/test/groovy/org/onap/cps/utils/YangUtilsSpec.groovy index 0b00cbb835..435426b2a2 100644 --- a/cps-service/src/test/groovy/org/onap/cps/utils/YangUtilsSpec.groovy +++ b/cps-service/src/test/groovy/org/onap/cps/utils/YangUtilsSpec.groovy @@ -26,7 +26,6 @@ import org.onap.cps.yang.YangTextSchemaSourceSetBuilder import org.opendaylight.yangtools.yang.common.QName import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode import spock.lang.Specification -import spock.lang.Unroll class YangUtilsSpec extends Specification { def 'Parsing a valid Json String.'() { @@ -41,7 +40,6 @@ class YangUtilsSpec extends Specification { result.nodeType == QName.create('org:onap:ccsdk:sample', '2020-09-15', 'bookstore') } - @Unroll def 'Parsing invalid data: #description.'() { given: 'a yang model (file)' def yangResourceNameToContent = TestUtils.getYangResourcesAsMap('bookstore.yang') @@ -57,7 +55,6 @@ class YangUtilsSpec extends Specification { '{" }' | 'json with syntax exception' } - @Unroll def 'Parsing json data fragment by xpath for #scenario.'() { given: 'schema context' def yangResourcesMap = TestUtils.getYangResourcesAsMap('test-tree.yang') @@ -73,7 +70,6 @@ class YangUtilsSpec extends Specification { 'container element' | '{ "nest": { "name": "N", "birds": ["bird"] } }' | '/test-tree/branch[@name=\'Branch\']' || 'nest' } - @Unroll def 'Parsing json data fragment by xpath error scenario: #scenario.'() { given: 'schema context' def yangResourcesMap = TestUtils.getYangResourcesAsMap('test-tree.yang') |