diff options
Diffstat (limited to 'integration-test')
-rw-r--r-- | integration-test/src/test/groovy/org/onap/cps/integration/base/FunctionalSpecBase.groovy | 4 | ||||
-rw-r--r-- | integration-test/src/test/groovy/org/onap/cps/integration/base/TestConfig.groovy | 24 |
2 files changed, 22 insertions, 6 deletions
diff --git a/integration-test/src/test/groovy/org/onap/cps/integration/base/FunctionalSpecBase.groovy b/integration-test/src/test/groovy/org/onap/cps/integration/base/FunctionalSpecBase.groovy index b10194560a..20687c3ea3 100644 --- a/integration-test/src/test/groovy/org/onap/cps/integration/base/FunctionalSpecBase.groovy +++ b/integration-test/src/test/groovy/org/onap/cps/integration/base/FunctionalSpecBase.groovy @@ -1,6 +1,6 @@ /* * ============LICENSE_START======================================================= - * Copyright (C) 2023 Nordix Foundation + * Copyright (C) 2023-2024 Nordix Foundation * Modifications Copyright (C) 2022-2023 TechMahindra Ltd. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the 'License'); @@ -75,7 +75,7 @@ class FunctionalSpecBase extends CpsIntegrationSpecBase { def anchorName = 'bookstoreAnchor' + anchorNumber cpsAnchorService.deleteAnchor(FUNCTIONAL_TEST_DATASPACE_1, anchorName) cpsAnchorService.createAnchor(FUNCTIONAL_TEST_DATASPACE_1, BOOKSTORE_SCHEMA_SET, anchorName) - cpsDataService.saveData(FUNCTIONAL_TEST_DATASPACE_1, anchorName, bookstoreJsonData.replace("Easons", "Easons-"+anchorNumber.toString()), OffsetDateTime.now()) + cpsDataService.saveData(FUNCTIONAL_TEST_DATASPACE_1, anchorName, bookstoreJsonData.replace('Easons', 'Easons-'+anchorNumber.toString()), OffsetDateTime.now()) } } diff --git a/integration-test/src/test/groovy/org/onap/cps/integration/base/TestConfig.groovy b/integration-test/src/test/groovy/org/onap/cps/integration/base/TestConfig.groovy index e1ccdaa6ee..69c2d17445 100644 --- a/integration-test/src/test/groovy/org/onap/cps/integration/base/TestConfig.groovy +++ b/integration-test/src/test/groovy/org/onap/cps/integration/base/TestConfig.groovy @@ -1,6 +1,6 @@ /* * ============LICENSE_START======================================================= - * Copyright (C) 2023 Nordix Foundation + * Copyright (C) 2023-2024 Nordix Foundation * ================================================================================ * Licensed under the Apache License, Version 2.0 (the 'License'); * you may not use this file except in compliance with the License. @@ -21,6 +21,7 @@ package org.onap.cps.integration.base import com.fasterxml.jackson.databind.ObjectMapper +import org.onap.cps.api.impl.YangTextSchemaSourceSetCache import org.onap.cps.spi.CpsDataPersistenceService import org.onap.cps.spi.CpsModulePersistenceService import org.onap.cps.spi.impl.CpsAdminPersistenceServiceImpl @@ -35,7 +36,8 @@ import org.onap.cps.spi.repository.YangResourceRepository import org.onap.cps.spi.utils.SessionManager import org.onap.cps.spi.utils.TimeLimiterProvider import org.onap.cps.utils.JsonObjectMapper -import org.onap.cps.utils.TimedYangParser +import org.onap.cps.utils.YangParser +import org.onap.cps.utils.YangParserHelper import org.onap.cps.yang.TimedYangTextSchemaSourceSetBuilder import org.springframework.beans.factory.annotation.Autowired import org.springframework.context.annotation.Bean @@ -77,6 +79,15 @@ class TestConfig extends Specification{ @Lazy SessionManager sessionManager + @Autowired + @Lazy + YangParserHelper yangParserHelper + + @Autowired + @Lazy + YangTextSchemaSourceSetCache YangTextSchemaSourceSetCache + + @Bean CpsAdminPersistenceServiceImpl cpsAdminPersistenceService() { new CpsAdminPersistenceServiceImpl(dataspaceRepository, anchorRepository, schemaSetRepository, yangResourceRepository) @@ -98,8 +109,13 @@ class TestConfig extends Specification{ } @Bean - TimedYangParser timedYangParser() { - return new TimedYangParser() + YangParserHelper yangParserHelper() { + return new YangParserHelper() + } + + @Bean + YangParser yangParser() { + return new YangParser(yangParserHelper, yangTextSchemaSourceSetCache) } @Bean |