adam | 6142bef | 2018-10-01 10:34:19 +0200 | [diff] [blame] | 1 | *** Settings *** |
koblosz | 2ac270a | 2018-10-23 07:32:30 +0200 | [diff] [blame] | 2 | Library SeleniumLibrary |
| 3 | Library RequestsLibrary |
| 4 | Library OperatingSystem |
| 5 | Library json |
| 6 | Resource ../../common.robot |
| 7 | Resource ../resources/keywords/scaleout_vid_keywords.robot |
| 8 | |
adam | 6142bef | 2018-10-01 10:34:19 +0200 | [diff] [blame] | 9 | |
| 10 | *** Variables *** |
koblosz | 2ac270a | 2018-10-23 07:32:30 +0200 | [diff] [blame] | 11 | ${VID_TEST_ASSET_DIR} %{WORKSPACE}/tests/vid/resources/simulators/test_data_assets |
| 12 | ${EXPECTED_SO_RESPONSES_FILEPATH} ${VID_TEST_ASSET_DIR}/expected_so_responses.json |
| 13 | ${EXPECTED_SO_REQUESTS_FILEPATH} ${VID_TEST_ASSET_DIR}/expected_so_requests.json |
| 14 | ${SO_SIMULATOR_BASE_URL} http://${SO_SIMULATOR_IP}:8443 |
| 15 | ${VID_HTTP_BASE_URL} http://${VID_IP}:8080 |
| 16 | ${VID_SCALEOUT_ENDPOINT} vid/mso/mso_create_vfmodule_instance/0d8a98d8-d7ca-4c26-b7ab-81d3729e3b6c/vnfs/61c19619-2714-46f8-90c9-39734e4f545f |
| 17 | ${VALID_SCALEOUT_REQ_FILEPATH} ${VID_TEST_ASSET_DIR}/vid_create_vfmodule_request.json |
| 18 | ${VALID_SCALEOUT_RESP_FILEPATH} ${VID_TEST_ASSET_DIR}/so_action_response.json |
adam | 6142bef | 2018-10-01 10:34:19 +0200 | [diff] [blame] | 19 | |
| 20 | |
| 21 | *** Test Cases *** |
koblosz | 2ac270a | 2018-10-23 07:32:30 +0200 | [diff] [blame] | 22 | Triggering create vfmodule operation in SO is performed using HTTPS |
| 23 | Setup Expected Data In SO Simulator ${EXPECTED_SO_RESPONSES_FILEPATH} ${SO_SIMULATOR_BASE_URL} setResponse |
| 24 | ${jsessionIdCookie}= Login to VID Internally ${VID_HTTP_BASE_URL}/vid/login.htm demo Kp8bJ4SXszM0WX |
| 25 | Log to console loginResponse: ${jsessionIdCookie} |
| 26 | ${soExpectedJsonResp}= json_from_file ${VALID_SCALEOUT_RESP_FILEPATH} |
| 27 | ${soResponse}= Send Post request from VID FE ${VID_HTTP_BASE_URL} ${VID_SCALEOUT_ENDPOINT} ${VALID_SCALEOUT_REQ_FILEPATH} ${VALID_SCALEOUT_RESP_FILEPATH} ${jsessionIdCookie} |
| 28 | Dictionaries Should Be Equal ${soExpectedJsonResp} ${soResponse.json()['entity']} |
| 29 | [Teardown] Close Browser |