Add test for csar validation get result using execution id.

Signed-off-by: Bartosz Gardziejewski <bartosz.gardziejewski@nokia.com>
Change-Id: Ie58b355f534d871b72f2b81efcf10d3a0e9cc662
Issue-ID: VNFSDK-659
diff --git a/tests/vnfsdk-refrepo/resources/vnfsdk_keywords.robot b/tests/vnfsdk-refrepo/resources/vnfsdk_keywords.robot
index 1bdcf71..11bb601 100644
--- a/tests/vnfsdk-refrepo/resources/vnfsdk_keywords.robot
+++ b/tests/vnfsdk-refrepo/resources/vnfsdk_keywords.robot
@@ -1,4 +1,6 @@
 *** Settings ***
+Resource          ./vnfsdk_properties.robot
+
 Library           OperatingSystem
 Library           Process
 Library           String
@@ -6,10 +8,18 @@
 Library           RequestsLibrary
 Library           json
 
-*** Variables ***
-${base_url}=    http://${REFREPO_IP}:8702/onapapi/vnfsdk-marketplace/v1
+*** Keywords ***
 
-${csarpath}=    ${SCRIPTS}/../tests/vnfsdk-refrepo/csar
+Validate CSAR usign Post request
+    [Documentation]    Perform POST Request to vnfsdk marketplace with CSAR and execution options, in order to perfvorm CSAR validation
+    [Arguments]    ${csar_name}  ${execution_json}
+    ${response}=   Run   curl -s --location --request POST '${base_url}/vtp/executions' --header 'Content-Type: multipart/form-data' --header 'Accept: application/json' --form 'file=@${csarpath}/${csar_name}' --form 'executions=${execution_json}'
+    ${response}=    String.Replace String    ${response}    \\n   ${SPACE}
+    [Return]     ${response}
 
-${csar_valid_no_security}=  valid_no_security.csar
-${execute_no_security_csar_validation}=  [{"scenario": "onap-dublin","testSuiteName": "validation","testCaseName": "csar-validate","parameters": {"csar": "file://${csar_valid_no_security}","pnf":"true"}}]
+Get validation result using GET request
+    [Documentation]    Perform GET request to vnfsdk marketplace with request id or execution id, in order to get that request/execution result
+    [Arguments]    ${requestId}
+    ${response}=   Run   curl -s --location --request GET '${base_url}/vtp/executions?requestId=${requestId}' --header 'Accept: application/json'
+    ${response}=    String.Replace String    ${response}    \\n   ${SPACE}
+    [Return]     ${response}