blob: a7f6c4b98d6ab81425681499bdd04b9b5dcf4f36 [file] [log] [blame]
adam6142bef2018-10-01 10:34:19 +02001*** Settings ***
koblosz2ac270a2018-10-23 07:32:30 +02002Library SeleniumLibrary
3Library RequestsLibrary
4Library OperatingSystem
5Library json
6Resource ../../common.robot
7Resource ../resources/keywords/scaleout_vid_keywords.robot
8
adam6142bef2018-10-01 10:34:19 +02009
10*** Variables ***
koblosz2ac270a2018-10-23 07:32:30 +020011${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
adam6142bef2018-10-01 10:34:19 +020019
20
21*** Test Cases ***
koblosz2ac270a2018-10-23 07:32:30 +020022Triggering 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