Code Review
/
cps.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Remove the dependency-cycle between beans
[cps.git]
/
integration-test
/
src
/
test
/
groovy
/
org
/
onap
/
cps
/
integration
/
base
/
CpsIntegrationSpecBase.groovy
diff --git
a/integration-test/src/test/groovy/org/onap/cps/integration/base/CpsIntegrationSpecBase.groovy
b/integration-test/src/test/groovy/org/onap/cps/integration/base/CpsIntegrationSpecBase.groovy
index
40fe030
..
6dec3db
100644
(file)
--- a/
integration-test/src/test/groovy/org/onap/cps/integration/base/CpsIntegrationSpecBase.groovy
+++ b/
integration-test/src/test/groovy/org/onap/cps/integration/base/CpsIntegrationSpecBase.groovy
@@
-20,10
+20,11
@@
package org.onap.cps.integration.base
package org.onap.cps.integration.base
+import org.onap.cps.api.CpsAnchorService
+import org.onap.cps.api.CpsDataService
+import org.onap.cps.api.CpsDataspaceService
+import org.onap.cps.api.CpsModuleService
import org.onap.cps.api.CpsQueryService
import org.onap.cps.api.CpsQueryService
-import org.onap.cps.api.impl.CpsAdminServiceImpl
-import org.onap.cps.api.impl.CpsDataServiceImpl
-import org.onap.cps.api.impl.CpsModuleServiceImpl
import org.onap.cps.integration.DatabaseTestContainer
import org.onap.cps.spi.config.CpsSessionFactory
import org.onap.cps.spi.exceptions.DataspaceNotFoundException
import org.onap.cps.integration.DatabaseTestContainer
import org.onap.cps.spi.config.CpsSessionFactory
import org.onap.cps.spi.exceptions.DataspaceNotFoundException
@@
-44,7
+45,7
@@
import spock.lang.Specification
import java.time.OffsetDateTime
import java.time.OffsetDateTime
-@SpringBootTest(classes = [TestConfig, Cps
AdminServiceImpl, Cps
ValidatorImpl, SessionManager, CpsSessionFactory])
+@SpringBootTest(classes = [TestConfig, CpsValidatorImpl, SessionManager, CpsSessionFactory])
@Testcontainers
@EnableAutoConfiguration
@EnableJpaRepositories(basePackageClasses = [DataspaceRepository])
@Testcontainers
@EnableAutoConfiguration
@EnableJpaRepositories(basePackageClasses = [DataspaceRepository])
@@
-57,15
+58,19
@@
class CpsIntegrationSpecBase extends Specification {
@Autowired
@Lazy
@Autowired
@Lazy
- Cps
AdminServiceImpl cpsAdmin
Service
+ Cps
DataspaceService cpsDataspace
Service
@Autowired
@Lazy
@Autowired
@Lazy
- Cps
DataServiceImpl cpsData
Service
+ Cps
AnchorService cpsAnchor
Service
@Autowired
@Lazy
@Autowired
@Lazy
- CpsModuleServiceImpl cpsModuleService
+ CpsDataService cpsDataService
+
+ @Autowired
+ @Lazy
+ CpsModuleService cpsModuleService
@Autowired
@Lazy
@Autowired
@Lazy
@@
-83,7
+88,7
@@
class CpsIntegrationSpecBase extends Specification {
def setup() {
if (!initialized) {
def setup() {
if (!initialized) {
- cps
Admin
Service.createDataspace(GENERAL_TEST_DATASPACE)
+ cps
Dataspace
Service.createDataspace(GENERAL_TEST_DATASPACE)
def bookstoreModelFileContent = readResourceDataFile('bookstore/bookstore.yang')
cpsModuleService.createSchemaSet(GENERAL_TEST_DATASPACE, BOOKSTORE_SCHEMA_SET, [bookstore : bookstoreModelFileContent])
initialized = true;
def bookstoreModelFileContent = readResourceDataFile('bookstore/bookstore.yang')
cpsModuleService.createSchemaSet(GENERAL_TEST_DATASPACE, BOOKSTORE_SCHEMA_SET, [bookstore : bookstoreModelFileContent])
initialized = true;
@@
-108,7
+113,7
@@
class CpsIntegrationSpecBase extends Specification {
def dataspaceExists(dataspaceName) {
try {
def dataspaceExists(dataspaceName) {
try {
- cps
Admin
Service.getDataspace(dataspaceName)
+ cps
Dataspace
Service.getDataspace(dataspaceName)
} catch (DataspaceNotFoundException dataspaceNotFoundException) {
return false
}
} catch (DataspaceNotFoundException dataspaceNotFoundException) {
return false
}
@@
-117,7
+122,7
@@
class CpsIntegrationSpecBase extends Specification {
def addAnchorsWithData(numberOfAnchors, dataspaceName, schemaSetName, anchorNamePrefix, data) {
(1..numberOfAnchors).each {
def addAnchorsWithData(numberOfAnchors, dataspaceName, schemaSetName, anchorNamePrefix, data) {
(1..numberOfAnchors).each {
- cpsA
dmin
Service.createAnchor(dataspaceName, schemaSetName, anchorNamePrefix + it)
+ cpsA
nchor
Service.createAnchor(dataspaceName, schemaSetName, anchorNamePrefix + it)
cpsDataService.saveData(dataspaceName, anchorNamePrefix + it, data.replace("Easons", "Easons-"+it.toString()), OffsetDateTime.now())
}
}
cpsDataService.saveData(dataspaceName, anchorNamePrefix + it, data.replace("Easons", "Easons-"+it.toString()), OffsetDateTime.now())
}
}