diff options
author | 2017-09-04 18:26:10 +0800 | |
---|---|---|
committer | 2017-09-04 18:29:05 +0800 | |
commit | 603b27eec9586eabb2e2d765243a3be0bf15c14c (patch) | |
tree | e516fe2d9371ffdfa983421104e5195b32fa5bdb /test/csit/tests/holmes/testcase/EngineMgt/Engine-Keywords.robot | |
parent | ab395aba7794a7f3739205e80a2cd9c3546b7534 (diff) |
Initial Submission of Holmes CSIT Configurations
Add shell scripts
Add test case implemetations
Change-Id: I94c11e83ee50725bc11ed2a21e16491bbaf26749
Issue-ID: HOLMES-39
Signed-off-by: Guangrong Fu <fu.guangrong@zte.com.cn>
Diffstat (limited to 'test/csit/tests/holmes/testcase/EngineMgt/Engine-Keywords.robot')
-rw-r--r-- | test/csit/tests/holmes/testcase/EngineMgt/Engine-Keywords.robot | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/test/csit/tests/holmes/testcase/EngineMgt/Engine-Keywords.robot b/test/csit/tests/holmes/testcase/EngineMgt/Engine-Keywords.robot new file mode 100644 index 000000000..aac867678 --- /dev/null +++ b/test/csit/tests/holmes/testcase/EngineMgt/Engine-Keywords.robot @@ -0,0 +1,34 @@ +*** Settings *** +Library Collections +Library RequestsLibrary +Resource ../CommonKeywords/HttpRequest.robot +Resource EngineAddr.robot + +*** Keywords *** +deleteEngineRule + [Arguments] ${packageName} ${codeFlag}=1 + [Documentation] ${packageName} :The data type is string! + ${headers} create dictionary Content-Type=application/json + create session microservices ${engineHost} ${headers} + ${deleteUrl} set variable ${engineUrl}/${packageName} + ${deleteResponse} delete request microservices ${deleteUrl} + log ${deleteResponse.content} + run keyword if ${codeFlag}==1 Should be equal as strings ${deleteResponse.status_code} 200 + run keyword if ${codeFlag}!=1 Should be equal as strings ${deleteResponse.status_code} 499 + [Return] ${deleteResponse} + +verifyEngineRule + [Arguments] ${checkContent} ${codeFlag}=1 + ${response} httpPost ${engineHost} ${engineUrl} ${checkContent} + 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 + [Return] ${response} + +deployEngineRule + [Arguments] ${jsonParams} ${codeFlag}=1 + ${response} httpPut ${engineHost} ${engineUrl} ${jsonParams} + 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 + [Return] ${response} |