-
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.
Merge pull request #31 from NethServer/tests
Add SSHLibrary to api.resource test file
- Loading branch information
Showing
2 changed files
with
16 additions
and
1 deletion.
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} |
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 |
---|---|---|
@@ -1,5 +1,6 @@ | ||
*** Settings *** | ||
Library SSHLibrary | ||
Resource api.resource | ||
|
||
*** Test Cases *** | ||
Check if dokuwiki is installed correctly | ||
|
@@ -10,7 +11,7 @@ Check if dokuwiki is installed correctly | |
Set Suite Variable ${module_id} ${output.module_id} | ||
|
||
Check if dokuwiki can be configured | ||
${rc} = Execute Command api-cli run module/${module_id}/configure-module --data '{"wiki_name": "mywiki","username":"admin","password":"admin","email":"[email protected]","user_full_name":"Admin","host":"dokuwiki.test.local","http2https": true,"lets_encrypt": false}' | ||
${rc} = Execute Command api-cli run module/${module_id}/configure-module --data '{"wiki_name": "mywiki","username":"admin","password":"admin","email":"[email protected]","user_full_name":"Admin","host":"dokuwiki.test.local","http2https": true,"lets_encrypt": false, "ldap_domain": "domain.com"}' | ||
... return_rc=True return_stdout=False | ||
Should Be Equal As Integers ${rc} 0 | ||
|
||
|