Regularize the DELETE Http Call 17/14017/1
authorGuangrong Fu <fu.guangrong@zte.com.cn>
Thu, 21 Sep 2017 02:00:46 +0000 (10:00 +0800)
committerGuangrong Fu <fu.guangrong@zte.com.cn>
Thu, 21 Sep 2017 02:00:46 +0000 (10:00 +0800)
Invoke the API using path params.

Change-Id: If61045cc4fcebe2de105c504b2cfdbb841d144d9
Issue-ID: HOLMES-64
Signed-off-by: Guangrong Fu <fu.guangrong@zte.com.cn>
test/csit/tests/holmes/testcase/CommonKeywords/HttpRequest.robot
test/csit/tests/holmes/testcase/RuleMgt/Rule-Keywords.robot
test/csit/tests/holmes/testcase/RuleMgt/Rule-Mgt.robot

index 5b84174..45bec5e 100644 (file)
@@ -30,8 +30,8 @@ httpPost
     [Return]    ${postResponse}
 
 httpDelete
-    [Arguments]    ${restHost}    ${restUrl}    ${data}
+    [Arguments]    ${restHost}    ${restUrl}
     ${headers}    create dictionary    Content-Type=application/json    Accept=application/json
     create session    microservices    ${restHost}    ${headers}
-    ${deleteResponse}    delete request    microservices    ${restUrl}    ${data}
+    ${deleteResponse}    delete request    microservices    ${restUrl}
     [Return]    ${deleteResponse}
index 03f8409..182737f 100644 (file)
@@ -72,8 +72,8 @@ modifyRule
     [Return]    ${response}
 
 deleteRule
-    [Arguments]    ${jsonParam}    ${codeFlag}=1
-    ${response}    httpDelete    ${ruleMgtHost}    ${ruleMgtUrl}    ${jsonParam}
+    [Arguments]    ${ruleId}    ${codeFlag}=1
+    ${response}    httpDelete    ${ruleMgtHost}    ${ruleMgtUrl}/${ruleId}
     log    ${response.content}
     run keyword if    ${codeFlag}==1    Should be equal as strings    ${response.status_code}    200
     run keyword if    ${codeFlag}!=1    Should be equal as strings    ${response.status_code}    499
index 03ee708..ad2a540 100644 (file)
@@ -120,8 +120,8 @@ modify_rule_with_description
 delete_existing_rule
     [Documentation]    Delete an existing rule.
     should not be empty    ${RULEID}
-    deleteRule    {"ruleid":"${RULEID}"}
+    deleteRule    ${RULEID}
 
 delete_non_existing_rule
     [Documentation]    Delete a non-existing rule.
-    deleteRule    {"ruleid":"${RULEID}"}    -1
+    deleteRule    ${RULEID}    -1