4 Feature: Status Resource
8 * def Context = Java.type('org.onap.nbi.test.Context');
9 * call Context.startServers();
11 Scenario: testHealthCheck
15 And match response.status == 'ok'
16 And match response.name == 'nbi'
18 Scenario: testFullHealthCheck
20 And params {fullStatus :true}
23 And match response.status == 'ok'
24 And match response.name == 'nbi'
25 And assert response.components.length == 4
26 And match each $.components contains {status :'ok'}
29 Scenario: testFullHealthChecWithoutWiremock
30 * call Context.stopWiremock();
32 And params {fullStatus :true}
35 And match response.status == 'ok'
36 And match response.name == 'nbi'
37 And assert response.components.length == 4
38 And match each response.components contains { status: 'ko'}
40 Scenario: testFullHealthCheckWithSDCNotResponding
41 * call Context.removeWireMockMapping("/sdc2/rest/healthCheck");
43 And params {fullStatus :true}
46 And match response.status == 'ok'
47 And match response.name == 'nbi'
48 And assert response.components.length == 4
49 And match response.components contains [{name:'sdc connectivity', status: 'ko'},{name:'so connectivity', status: 'ok'},{name:'aai connectivity', status: 'ok'},{name:'dmaap connectivity', status: 'ok'},]