generated from NethServer/ns8-kickstart
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
35 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,21 @@ | ||
*** Settings *** | ||
Library SSHLibrary | ||
Resource ./api.resource | ||
|
||
*** Test Cases *** | ||
Setup internal user provider | ||
${response} = Run task cluster/add-internal-provider {"image":"openldap","node":1} | ||
Set Global Variable ${openldap_module_id} ${response['module_id']} | ||
Set Global Variable ${users_domain} domain.ns8.local | ||
Run task module/${openldap_module_id}/configure-module {"domain":"${users_domain}","admuser":"admin","admpass":"Nethesis,1234","provision":"new-domain"} | ||
|
||
Check if mail is installed correctly | ||
${output} ${rc} = Execute Command add-module mail | ||
... return_rc=True | ||
Should Be Equal As Integers ${rc} 0 | ||
&{output} = Evaluate ${output} | ||
Set Global Variable ${mail_module_id} ${output.module_id} | ||
Set Global Variable ${mail_domain} ns8.local | ||
Set Global Variable ${mail_hostname} mail.ns8.local | ||
Run task module/${mail_module_id}/configure-module {"hostname":"${mail_hostname}","user_domain":"${users_domain}","mail_domain":"${mail_domain}"} | ||
... decode_json=False rc_expected=0 |
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} |