summaryrefslogtreecommitdiffstats
path: root/integration-test/src/test/groovy/org/onap/cps/integration/base/FunctionalSpecBase.groovy
diff options
context:
space:
mode:
Diffstat (limited to 'integration-test/src/test/groovy/org/onap/cps/integration/base/FunctionalSpecBase.groovy')
-rw-r--r--integration-test/src/test/groovy/org/onap/cps/integration/base/FunctionalSpecBase.groovy18
1 files changed, 12 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 5e5269114..b7a6030d8 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
@@ -20,10 +20,14 @@
package org.onap.cps.integration.base
-import java.time.OffsetDateTime
-
class FunctionalSpecBase extends CpsIntegrationSpecBase {
+ def static FUNCTIONAL_TEST_DATASPACE_1 = 'functionalTestDataspace1'
+ def static FUNCTIONAL_TEST_DATASPACE_2 = 'functionalTestDataspace2'
+ def static NUMBER_OF_ANCHORS_PER_DATASPACE_WITH_BOOKSTORE_DATA = 2
+ def static BOOKSTORE_ANCHOR_1 = 'bookstoreAnchor1'
+ def static BOOKSTORE_ANCHOR_2 = 'bookstoreAnchor2'
+
def static initialized = false
def setup() {
@@ -35,15 +39,17 @@ class FunctionalSpecBase extends CpsIntegrationSpecBase {
}
def setupBookstoreInfraStructure() {
- cpsAdminService.createDataspace(FUNCTIONAL_TEST_DATASPACE)
+ cpsAdminService.createDataspace(FUNCTIONAL_TEST_DATASPACE_1)
+ cpsAdminService.createDataspace(FUNCTIONAL_TEST_DATASPACE_2)
def bookstoreYangModelAsString = readResourceDataFile('bookstore/bookstore.yang')
- cpsModuleService.createSchemaSet(FUNCTIONAL_TEST_DATASPACE, BOOKSTORE_SCHEMA_SET, [bookstore: bookstoreYangModelAsString])
- cpsAdminService.createAnchor(FUNCTIONAL_TEST_DATASPACE, BOOKSTORE_SCHEMA_SET, BOOKSTORE_ANCHOR)
+ cpsModuleService.createSchemaSet(FUNCTIONAL_TEST_DATASPACE_1, BOOKSTORE_SCHEMA_SET, [bookstore: bookstoreYangModelAsString])
+ cpsModuleService.createSchemaSet(FUNCTIONAL_TEST_DATASPACE_2, BOOKSTORE_SCHEMA_SET, [bookstore: bookstoreYangModelAsString])
}
def addBookstoreData() {
def bookstoreJsonData = readResourceDataFile('bookstore/bookstoreData.json')
- cpsDataService.saveData(FUNCTIONAL_TEST_DATASPACE, BOOKSTORE_ANCHOR, bookstoreJsonData, OffsetDateTime.now())
+ addAnchorsWithData(NUMBER_OF_ANCHORS_PER_DATASPACE_WITH_BOOKSTORE_DATA, FUNCTIONAL_TEST_DATASPACE_1, BOOKSTORE_SCHEMA_SET, 'bookstoreAnchor', bookstoreJsonData)
+ addAnchorsWithData(NUMBER_OF_ANCHORS_PER_DATASPACE_WITH_BOOKSTORE_DATA, FUNCTIONAL_TEST_DATASPACE_2, BOOKSTORE_SCHEMA_SET, 'bookstoreAnchor', bookstoreJsonData)
}
}