Skip to content

Commit cd3d87f

Browse files
committed
tests: add user domain admin checks
1 parent f072506 commit cd3d87f

3 files changed

+11
-1
lines changed

tests/00_nethvoice_install_dependencies.robot

+3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@ Setup internal user provider
77
${response} = Run task cluster/add-internal-provider {"image":"openldap","node":1}
88
Set Global Variable ${openldap_module_id} ${response['module_id']}
99
Set Global Variable ${users_domain} domain.ns8.local
10+
Set Global Variable ${nv_domain_admin} nethvoice1-adm
11+
Set Global Variable ${nv_domain_admin_password} Nethesis,1234
1012
Run task module/${openldap_module_id}/configure-module {"domain":"${users_domain}","admuser":"admin","admpass":"Nethesis,1234","provision":"new-domain"}
13+
Run task module/${openldap_module_id}/add-user {"user":"${nv_domain_admin}","password":"${nv_domain_admin_password}","display_name":"NethVoice Admin","locked":false, "groups": ["domain admins"]}
1114

1215
Check if nethvoice-proxy is installed correctly
1316
Run task cluster/alter-repository {"name": "default", "status": true, "testing": true}

tests/10_nethvoice_actions/10_configure_integrations.robot

+3-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Resource ../api.resource
55
*** Test Cases ***
66
Check if nethvoice can be configured correctly
77
${response} = Run task module/${module_id}/configure-module
8-
... {"nethvoice_host": "voice.ns8.local", "nethcti_ui_host": "cti.ns8.local", "user_domain": "${users_domain}", "reports_international_prefix": "+39", "lets_encrypt": false}
8+
... {"nethvoice_host": "voice.ns8.local", "nethcti_ui_host": "cti.ns8.local", "user_domain": "${users_domain}", "reports_international_prefix": "+39", "nethvoice_adm_username": "${nv_domain_admin}", "nethvoice_adm_password": "${nv_domain_admin_password}", "lets_encrypt": false}
99
... decode_json=False
1010

1111
Check if nethvoice is configured as expected
@@ -14,6 +14,8 @@ Check if nethvoice is configured as expected
1414
Should Be Equal As Strings ${response['nethcti_ui_host']} cti.ns8.local
1515
Should Be Equal As Strings ${response['user_domain']} ${users_domain}
1616
Should Be Equal As Strings ${response['reports_international_prefix']} +39
17+
Should Be Equal As Strings ${response['nethvoice_adm_username']} ${nv_domain_admin}
18+
Should Be Equal As Strings ${response['nethvoice_adm_password']} ${nv_domain_admin_password}
1719
Should Be Equal As Strings ${response['lets_encrypt']} False
1820

1921
Check if the password can be changed

tests/99_nethvoice_remove-modules.robot

+5
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,10 @@ Check if nethvoice is removed correctly
1313
... return_rc=True return_stdout=False
1414
Should Be Equal As Integers ${rc} 0
1515

16+
Check if the nethvoice user domain admin is removed correctly
17+
${response} = Run task cluster/get-domain-user
18+
... {"domain":"${users_domain}", "user":"${nv_domain_admin}"}
19+
... rc_expected=2 decode_json=False
20+
1621
Remove internal domain
1722
Run task cluster/remove-internal-domain {"domain":"${users_domain}"}

0 commit comments

Comments
 (0)