Added CSIT for Macroflow with HEAT
[integration/csit.git] / tests / so / sanity-check / macroflow.robot
1 *** Settings ***
2 Library     Collections
3 Library     RequestsLibrary
4 Library     OperatingSystem
5 Library     json
6
7 *** Variables ***
8 ${SLEEP_INTERVAL_SEC}=   60
9
10 *** Test Cases ***
11 Distribute Service Template
12     Create Session   sdc_controller_session  http://${REPO_IP}:8085
13     ${data}=    Get Binary File     ${CURDIR}${/}data${/}serviceBasicVfCnfnotification.json
14     &{headers}=  Create Dictionary    Authorization=Basic bXNvX2FkbWluOnBhc3N3b3JkMSQ=    resource-location=/distribution-test-zip/unzipped/    Content-Type=application/json    Accept=application/json
15     ${resp}=    Post Request    sdc_controller_session    /test/treatNotification/v1    data=${data}    headers=${headers}
16     Log To Console     Received status code: ${resp.status_code}
17     Run Keyword If  '${resp.status_code}' == '200'  log to console  \nexecuted with expected result
18     Should Be Equal As Strings    '${resp.status_code}'    '200'
19
20
21 Macroflow
22     Create Session   api_handler_session  http://${REPO_IP}:8080
23     ${data}=    Get Binary File     ${CURDIR}${/}data${/}macroflow.json
24     &{headers}=  Create Dictionary    Authorization=Basic SW5mcmFQb3J0YWxDbGllbnQ6cGFzc3dvcmQxJA==    Content-Type=application/json    Accept=application/json
25     ${service_instantiation_request}=    Post Request    api_handler_session    /onap/so/infra/serviceInstantiation/v7/serviceInstances    data=${data}    headers=${headers}
26     Log To Console     Received status code: ${service_instantiation_request.status_code}
27     Run Keyword If  '${service_instantiation_request.status_code}' == '202'  log to console   \nexecuted with expected result
28     Should Be Equal As Strings    '${service_instantiation_request.status_code}'    '202'
29     SLEEP   ${SLEEP_INTERVAL_SEC}s