| 1 |
--- |
| 2 |
ansible_connection: httpapi |
| 3 |
|
| 4 |
tests_single_run: |
| 5 |
- name: test_case_sr_01 |
| 6 |
description: Configure users |
| 7 |
state: merged |
| 8 |
task_condition_type: action |
| 9 |
input: |
| 10 |
- name: user1 |
| 11 |
role: admin |
| 12 |
password: User@Dell |
| 13 |
update_password: always |
| 14 |
- name: user2 |
| 15 |
role: operator |
| 16 |
password: User@Dell |
| 17 |
update_password: always |
| 18 |
- name: user2 |
| 19 |
role: operator |
| 20 |
password: User@Dell |
| 21 |
update_password: on_create |
| 22 |
- name: test_case_sr_02 |
| 23 |
description: Validate users creation |
| 24 |
state: merged |
| 25 |
task_condition_type: idempotent |
| 26 |
input: |
| 27 |
- name: user1 |
| 28 |
role: admin |
| 29 |
password: User@Dell |
| 30 |
update_password: on_create |
| 31 |
- name: user2 |
| 32 |
role: operator |
| 33 |
password: User@Dell |
| 34 |
update_password: on_create |
| 35 |
- name: user2 |
| 36 |
role: operator |
| 37 |
password: User@Dell |
| 38 |
update_password: on_create |
| 39 |
|
| 40 |
sonic_users_tests: |
| 41 |
- name: test_case_01 |
| 42 |
description: Configure users |
| 43 |
state: merged |
| 44 |
input: |
| 45 |
- name: user1 |
| 46 |
role: admin |
| 47 |
password: User@Dell |
| 48 |
update_password: on_create |
| 49 |
- name: user2 |
| 50 |
role: operator |
| 51 |
password: User@Dell |
| 52 |
update_password: on_create |
| 53 |
- name: user3 |
| 54 |
role: admin |
| 55 |
password: User@Dell |
| 56 |
update_password: on_create |
| 57 |
- name: test_case_02 |
| 58 |
description: Update user roles |
| 59 |
state: merged |
| 60 |
input: |
| 61 |
- name: user1 |
| 62 |
role: operator |
| 63 |
password: User@Dell |
| 64 |
update_password: on_create |
| 65 |
- name: user2 |
| 66 |
role: admin |
| 67 |
password: User@Dell |
| 68 |
update_password: on_create |
| 69 |
- name: test_case_03 |
| 70 |
description: Replace user roles |
| 71 |
state: replaced |
| 72 |
input: |
| 73 |
- name: user2 |
| 74 |
role: secadmin |
| 75 |
password: User@Dell |
| 76 |
update_password: on_create |
| 77 |
- name: user3 |
| 78 |
role: netadmin |
| 79 |
password: User@Dell |
| 80 |
update_password: on_create |
| 81 |
- name: test_case_04 |
| 82 |
description: Override users configuration with existing user |
| 83 |
state: overridden |
| 84 |
input: |
| 85 |
- name: user2 |
| 86 |
role: secadmin |
| 87 |
password: User@Dell |
| 88 |
update_password: on_create |
| 89 |
- name: test_case_05 |
| 90 |
description: Override users configuration |
| 91 |
state: overridden |
| 92 |
input: |
| 93 |
- name: user4 |
| 94 |
role: admin |
| 95 |
password: User@Dell |
| 96 |
update_password: on_create |
| 97 |
- name: user5 |
| 98 |
role: operator |
| 99 |
password: User@Dell |
| 100 |
update_password: on_create |
| 101 |
- name: test_case_06 |
| 102 |
description: Configure users sshkey |
| 103 |
state: merged |
| 104 |
input: |
| 105 |
- name: user5 |
| 106 |
ssh_key: >- |
| 107 |
ssh-rsa |
| 108 |
AAAAB3NzaC1yc2EAAAADAQABAAAAgQDHD2TJqQ/Fve+fG5i6heOJH55wgbEf+7kTtUGBUtNttQ9OXgBRrA2h2GKSyUNlyfaVijBrcr2MKwhSASvk58WnEqZhfmmhRDsdNVXPlMQuDBheIlCaXyOh+URJZCfmfeERSVO7kjRhqMmbHlpTbMDHdFgYEvHGcrHMwIZyZ6KbBw== |
| 109 |
- name: test_case_07 |
| 110 |
description: Delete user |
| 111 |
state: deleted |
| 112 |
input: |
| 113 |
- name: user4 |
| 114 |
- name: user5 |
| 115 |
ssh_key: >- |
| 116 |
ssh-rsa |
| 117 |
AAAAB3NzaC1yc2EAAAADAQABAAAAgQDHD2TJqQ/Fve+fG5i6heOJH55wgbEf+7kTtUGBUtNttQ9OXgBRrA2h2GKSyUNlyfaVijBrcr2MKwhSASvk58WnEqZhfmmhRDsdNVXPlMQuDBheIlCaXyOh+URJZCfmfeERSVO7kjRhqMmbHlpTbMDHdFgYEvHGcrHMwIZyZ6KbBw== |
| 118 |
- name: test_case_08 |
| 119 |
description: Delete all users configurations |
| 120 |
state: deleted |
| 121 |
input: [] |