2 Library RequestsLibrary
3 Library OperatingSystem
5 Resource ../../common.robot
6 Resource ../resources/keywords/scaleout_vid_keywords.robot
10 ${VID_TEST_ASSET_DIR} %{WORKSPACE}/tests/vid/resources/simulators/test_data_assets
11 ${EXPECTED_SO_RESPONSES_FILEPATH} ${VID_TEST_ASSET_DIR}/expected_so_responses.json
12 ${EXPECTED_SO_REQUESTS_FILEPATH} ${VID_TEST_ASSET_DIR}/expected_so_requests.json
13 ${SO_SIMULATOR_BASE_URL} http://${SO_SIMULATOR_IP}:8443
14 ${VID_HTTP_BASE_URL} http://${VID_IP}:8080
15 ${VID_SCALEOUT_ENDPOINT} vid/change-management/workflow/ws-test-0310-8
16 ${VALID_SCALEOUT_REQ_FILEPATH} ${VID_TEST_ASSET_DIR}/vid_scaleout_request.json
17 ${VALID_SCALEOUT_RESP_FILEPATH} ${VID_TEST_ASSET_DIR}/so_action_response.json
21 Triggering scaleout workflow operation succeeds
22 Setup Expected Data In SO Simulator ${EXPECTED_SO_RESPONSES_FILEPATH} ${SO_SIMULATOR_BASE_URL} setResponse
23 ${soExpectedJsonResp}= json_from_file ${VALID_SCALEOUT_RESP_FILEPATH}
24 ${vidRequest}= json_from_file ${VALID_SCALEOUT_REQ_FILEPATH}
25 ${headers}= Create Dictionary Content-Type=application/json
26 ${session}= Create Session alias=vid url=${VID_HTTP_BASE_URL} headers=${headers}
27 ${resp}= Post Request vid uri=/${VID_SCALEOUT_ENDPOINT} data=${vidRequest} headers=${headers}
28 Should Be Equal As Strings ${resp.status_code} 200
29 Dictionaries Should Be Equal ${soExpectedJsonResp} ${resp.json()['entity']}