- def 'Get bulk resource data for non-supported #datastoreName from dmi service.'() {
- given: 'bulk resource data url'
- def getUrl = "$ncmpBasePathV1/batch/data/ds/ncmp-datastore:operational" +
- "?resourceIdentifier=parent/child&options=(a=1,b=2)&topic=myTopic"
+ def 'Get batch resource data for #scenario from dmi service.'() {
+ given: 'batch resource data url'
+ def getUrl = "$ncmpBasePathV1/data?topic=my-topic-name"
+ def resourceDataBatchRequestJsonData = jsonObjectMapper.asJsonString(
+ getResourceDataBatchRequest(operation, datastore))
+ when: 'post data resource request is performed'
+ def response = mvc.perform(
+ post(getUrl)
+ .contentType(MediaType.APPLICATION_JSON)
+ .content(resourceDataBatchRequestJsonData)
+ ).andReturn().response
+ then: 'response status is BAD_REQUEST'
+ response.status == HttpStatus.BAD_REQUEST.value()
+ where: 'the following parameters are used'
+ scenario | datastore | operation
+ 'non-supported datastoreName' | OPERATIONAL.datastoreName | 'read'
+ 'non-supported operation (passthrough-running)' | PASSTHROUGH_RUNNING.datastoreName | 'create'
+ 'non-supported operation (passthrough-operational)' | PASSTHROUGH_OPERATIONAL.datastoreName | 'create'
+ }
+
+ def 'Get batch resource data when notification feature is disabled for datastore: #datastore.'() {
+ given: 'batch resource data url'
+ def getUrl = "$ncmpBasePathV1/data?topic=my-topic-name"
+ def resourceDataBatchRequestJsonData = jsonObjectMapper.asJsonString(
+ getResourceDataBatchRequest("read", datastore.datastoreName))
+ ncmpPassthroughResourceRequestHandler.notificationFeatureEnabled = false