1 package org.onap.cps.integration.functional.ncmp
3 import org.onap.cps.integration.base.CpsIntegrationSpecBase
4 import org.onap.cps.ncmp.api.datajobs.DataJobStatusService
5 import org.springframework.beans.factory.annotation.Autowired
7 class DataJobStatusServiceSpec extends CpsIntegrationSpecBase {
10 DataJobStatusService dataJobStatusService
12 def 'Get the status of a data job from DMI.'() {
13 given: 'the required data about the data job'
14 def dmiServiceName = DMI1_URL
15 def requestId = 'some-request-id'
16 def dataProducerJobId = 'some-data-producer-job-id'
17 def dataProducerId = 'some-data-producer-id'
18 def authorization = 'my authorization header'
19 when: 'the data job status checked'
20 def result = dataJobStatusService.getDataJobStatus(authorization, dmiServiceName, requestId, dataProducerJobId, dataProducerId)
21 then: 'the status is that defined in the mock service.'
22 assert result == 'status details from mock service'