import spock.lang.Shared
import spock.lang.Specification
+import java.time.OffsetDateTime
+
@SpringBootTest(classes = [TestConfig, CpsAdminServiceImpl, CpsValidatorImpl])
@Testcontainers
@EnableAutoConfiguration
CpsQueryService cpsQueryService
def static GENERAL_TEST_DATASPACE = 'generalTestDataspace'
- def static FUNCTIONAL_TEST_DATASPACE = 'functionalTestDataspace'
def static BOOKSTORE_SCHEMA_SET = 'bookstoreSchemaSet'
- def static BOOKSTORE_ANCHOR = 'bookstoreAnchor'
def static initialized = false
}
return true
}
+
+ def addAnchorsWithData(numberOfAnchors, dataspaceName, schemaSetName, anchorNamePrefix, data) {
+ (1..numberOfAnchors).each {
+ cpsAdminService.createAnchor(dataspaceName, schemaSetName, anchorNamePrefix + it)
+ cpsDataService.saveData(dataspaceName, anchorNamePrefix + it, data, OffsetDateTime.now())
+ }
+ }
}