fdcad2b47bbace5ba5164d0d9fc4eb4431ce5140
[cps.git] /
1 package org.onap.cps.integration.functional.ncmp
2
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
6
7 class DataJobStatusServiceSpec extends CpsIntegrationSpecBase {
8
9     @Autowired
10     DataJobStatusService dataJobStatusService
11
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'
23     }
24 }