-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Add SSHLibrary to api.resource test file
- Loading branch information
Showing
1 changed file
with
14 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
*** Settings *** | ||
Library SSHLibrary | ||
|
||
*** Keywords *** | ||
Run task | ||
[Arguments] ${action} ${input} ${decode_json}=${TRUE} ${rc_expected}=0 | ||
${stdout} ${stderr} ${rc} = Execute Command api-cli run ${action} --data '${input}' return_stdout=True return_stderr=True return_rc=True | ||
Should Be Equal As Integers ${rc_expected} ${rc} Run task ${action} failed!${\n}${stderr} | ||
IF ${decode_json} and len($stdout) > 0 | ||
${response} = Evaluate json.loads('''${stdout}''') modules=json | ||
ELSE | ||
${response} = Set Variable ${stdout} | ||
END | ||
[Return] ${response} |