From 9abb61ca2cea1907cab2cec312d6dca6e53a93cd Mon Sep 17 00:00:00 2001 From: Gary Wu Date: Thu, 27 Sep 2018 10:38:50 -0700 Subject: Move CSIT to integration/csit repo To facilite branching of CSIT tests, all CSIT test code and scripts are relocated to the integration/csit repo. Change-Id: I1e4c0eff44691f73f8098b3c52764107f6b8b8df Issue-ID: INT-671 Signed-off-by: Gary Wu --- .../testcase/CommonKeywords/HttpRequest.robot | 37 ++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 tests/holmes/testcase/CommonKeywords/HttpRequest.robot (limited to 'tests/holmes/testcase/CommonKeywords/HttpRequest.robot') diff --git a/tests/holmes/testcase/CommonKeywords/HttpRequest.robot b/tests/holmes/testcase/CommonKeywords/HttpRequest.robot new file mode 100644 index 00000000..45bec5ef --- /dev/null +++ b/tests/holmes/testcase/CommonKeywords/HttpRequest.robot @@ -0,0 +1,37 @@ +*** Settings *** +Library Collections +Library RequestsLibrary +Resource ../RuleMgt/Rule-Keywords.robot + +*** Keywords *** +httpPut + [Arguments] ${restHost} ${restUrl} ${data} + ${headers} create dictionary Content-Type=application/json;charset=utf-8 Accept=application/json + create session microservices ${restHost} ${headers} + log ${data} + ${putResponse} put request microservices ${restUrl} ${data} \ ${EMPTY} + ... ${headers} + log ${putResponse} + [Return] ${putResponse} + +httpGet + [Arguments] ${restHost} ${restUrl} + create session microservices ${restHost} + ${getResponse} get request microservices ${restUrl} + [Return] ${getResponse} + +httpPost + [Arguments] ${restHost} ${restUrl} ${data} + ${headers} create dictionary Content-Type=application/json Accept=application/json + create session microservices ${restHost} ${headers} + log ${data} + ${postResponse} post request microservices ${restUrl} ${data} + Comment log ${postResponse.content} + [Return] ${postResponse} + +httpDelete + [Arguments] ${restHost} ${restUrl} + ${headers} create dictionary Content-Type=application/json Accept=application/json + create session microservices ${restHost} ${headers} + ${deleteResponse} delete request microservices ${restUrl} + [Return] ${deleteResponse} -- cgit 1.2.3-korg