From 2ac270a8ee0ecf5357c541deb6e162b4cc26dd98 Mon Sep 17 00:00:00 2001 From: koblosz Date: Tue, 23 Oct 2018 07:32:30 +0200 Subject: Enhance vid CSIT tests, added for scaleout Issue-ID: VID-323 Change-Id: I31ad377ee766eaf66c848ad802c33e21ea1dfe76 Signed-off-by: Sandra Koblosz --- tests/vid/scaleOut/__init__.robot | 2 ++ tests/vid/scaleOut/scaleout_workflow_test.robot | 32 +++++++++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 tests/vid/scaleOut/__init__.robot create mode 100644 tests/vid/scaleOut/scaleout_workflow_test.robot (limited to 'tests/vid/scaleOut') diff --git a/tests/vid/scaleOut/__init__.robot b/tests/vid/scaleOut/__init__.robot new file mode 100644 index 00000000..540b7cab --- /dev/null +++ b/tests/vid/scaleOut/__init__.robot @@ -0,0 +1,2 @@ +*** Settings *** +Documentation VID - ScaleOut use case diff --git a/tests/vid/scaleOut/scaleout_workflow_test.robot b/tests/vid/scaleOut/scaleout_workflow_test.robot new file mode 100644 index 00000000..3b28c586 --- /dev/null +++ b/tests/vid/scaleOut/scaleout_workflow_test.robot @@ -0,0 +1,32 @@ +*** Settings *** +Library RequestsLibrary +Library OperatingSystem +Library json +Resource ../../common.robot +Resource ../resources/keywords/scaleout_vid_keywords.robot + + +*** Variables *** +${VID_TEST_ASSET_DIR} %{WORKSPACE}/tests/vid/resources/simulators/test_data_assets +${EXPECTED_SO_RESPONSES_FILEPATH} ${VID_TEST_ASSET_DIR}/expected_so_responses.json +${EXPECTED_SO_REQUESTS_FILEPATH} ${VID_TEST_ASSET_DIR}/expected_so_requests.json +${SO_SIMULATOR_BASE_URL} http://${SO_SIMULATOR_IP}:8443 +${VID_HTTP_BASE_URL} http://${VID_IP}:8080 +${VID_SCALEOUT_ENDPOINT} vid/change-management/workflow/ws-test-0310-8 +${VALID_SCALEOUT_REQ_FILEPATH} ${VID_TEST_ASSET_DIR}/vid_scaleout_request.json +${VALID_SCALEOUT_RESP_FILEPATH} ${VID_TEST_ASSET_DIR}/so_action_response.json + + +*** Test Cases *** +Triggering scaleout workflow operation succeeds + Setup Expected Data In SO Simulator ${EXPECTED_SO_RESPONSES_FILEPATH} ${SO_SIMULATOR_BASE_URL} setResponse + ${soExpectedJsonResp}= json_from_file ${VALID_SCALEOUT_RESP_FILEPATH} + ${vidRequest}= json_from_file ${VALID_SCALEOUT_REQ_FILEPATH} + ${headers}= Create Dictionary Content-Type=application/json + ${session}= Create Session alias=vid url=${VID_HTTP_BASE_URL} headers=${headers} + ${resp}= Post Request vid uri=/${VID_SCALEOUT_ENDPOINT} data=${vidRequest} headers=${headers} + Should Be Equal As Strings ${resp.status_code} 200 + Dictionaries Should Be Equal ${soExpectedJsonResp} ${resp.json()['entity']} + + + -- cgit 1.2.3-korg