# UsersManageApi - Integrated Tests Output
## All Tests Output
```bash=
=== RUN Test_SudoersVerify
CreateOrUpdate - Sudoers - Given that user not exist in the operating system,
Updating Sudo Enable using Method 'CreateOrUpdate'
Should verify sudoers
User Should Exist In System : ✔
User Should Be In Sudoers : ✔
2 total assertions
CreateOrUpdate - Sudoers - Given that user exist in the operating system,
Updating Sudo Disable using Method 'CreateOrUpdate'
Should verify user existence and sudoers
User Should Not Be In Sudoers : ✔
3 total assertions
DropOnExist - Sudoers - Given that user exist in the operating system,
Deleting using Method 'DropOnExist'
Should verify user existence and sudoers
User Should Not Exist In System : ✔
User Should Not Be In Sudoers : ✔
5 total assertions
--- PASS: Test_SudoersVerify (0.15s)
=== RUN Test_UserErrorVerify
Drop/Delete - Given that user not exist in the operating system,
Delete non exist using - Method 'Drop' or 'Delete'
Should give a specific error. ✔
6 total assertions
DropOnExist - Given that user not exist in the operating system,
Delete non exist using - Method 'DropOnExist'
Should not give an error. ✔
7 total assertions
CreateOrUpdate - Given that user not exist in the operating system,
Create using - Method 'CreateOrUpdate'
Should not give an error. ✔
8 total assertions
Create - Given that user exists in the operating system,
Create using - Method 'Create'
Should give a specific error. ✔
9 total assertions
Drop - Given that user exist in the operating system,
Delete using - Method 'Drop'
Should not give an error. ✔
10 total assertions
Update - Given that user not exist in the operating system,
Update using - Method 'Update'
Should give a specific error. ✔
11 total assertions
UpdateOrSkipOnNonExist - Given that user not exist in the operating system,
Update using - Method 'UpdateOrSkipOnNonExist'
Should not give an error. ✔
12 total assertions
DeleteOrSkipOnNonExist - Given that user not exist in the operating system,
Delete non exist using - Method 'DeleteOrSkipOnNonExist'
Should not give an error. ✔
13 total assertions
DropOrSkipOnNonExist - Given that user not exist in the operating system,
Delete non exist using - Method 'DropOrSkipOnNonExist'
Should not give an error. ✔
14 total assertions
UpdateOnExist - Given that user not exist in the operating system,
Update using - Method 'UpdateOnExist'
Should not give an error. ✔
15 total assertions
DropOnExist - Given that user not exist in the operating system,
Delete non exist using - Method 'DropOnExist'
Should not give an error. ✔
16 total assertions
--- PASS: Test_UserErrorVerify (0.25s)
=== RUN Test_UserNameChangeVerify
Given that users exist
Renaming should not give errors ✔
17 total assertions
Given that users do not exist
Renaming should give errors ✔
18 total assertions
Given that some users exist and some do not
Renaming should rename for existing users and give errors for non-existent ones ✔
19 total assertions
--- PASS: Test_UserNameChangeVerify (0.25s)
=== RUN Test_UserParamsVerify
CreateOrUpdate - Given that user not exist in the operating system,
Creating using Method 'Create' Or 'CreateOrUpdate'
Should verify user existence, homedir, sudoers and groups
User Should Exist In System : ✔
Home Directory Should Be : /home/loki ✔
Home Directory Permission Should Match : ✔
User Should Be In Sudoers : ✔
User Should Be Part Of Group : loki1 ✔
User Should Be Part Of Group : loki2 ✔
25 total assertions
Update - Given that user exist in the operating system,
Updating using Method 'Update'
Should verify homedir, sudoers and groups
Home Directory Should Be : /home/lokixx ✔
Home Directory Permission Should Match : ✔
User Should Be In Sudoers : ✔
User Should Be Part Of Group : loki1 ✔
User Should Be Part Of Group : loki2 ✔
User Should Be Part Of Group : lokigroupt ✔
31 total assertions
Delete - Given that user exist in the operating system,
Removing using Method 'Delete'
Should verify user existence, sudoers and groups
User Should Not Exist In System : ✔
User Should Not Be In Sudoers : ✔
User Should Not Be Part Of Group : loki1 ✔
User Should Not Be Part Of Group : loki2 ✔
User Should Not Be Part Of Group : lokigroupt ✔
36 total assertions
--- PASS: Test_UserParamsVerify (0.45s)
=== RUN Test_TestUserManageByNamesVerify
CreateOrUpdate - Groups / Shell - IsCreateGroupOnNonExist - Given that some users may exist and some may not exist in the operating system,
Creating Or Updating using Method 'CreateOrUpdate'
Should verify users created, added to groups, added to sudoers, shell changed and password set
usergroup1 Should Exist In System ✔
usergroup2 Should Exist In System ✔
userw Should Exist In System ✔
userw Should Be In Sudoers : ✔
userwShould Be Part Of Group : usergroup1 ✔
userwShould Be Part Of Group : usergroup2 ✔
userw Shell Should Be : /bin/bash ✔
userw Should have password set ✔
userz Should Exist In System ✔
userz Should Be In Sudoers : ✔
userzShould Be Part Of Group : usergroup1 ✔
userzShould Be Part Of Group : usergroup2 ✔
userz Shell Should Be : /bin/bash ✔
userz Should have password set ✔
50 total assertions
DropOnExist - Given that some users may exist and some may not exist in the operating system,
Deleting using Method 'DropOnExist'
Should verify users do not exist in system, is not part of groups and sudoers
userwShould Not Exist In System : ✔
userw Should Not Be In Sudoers : ✔
userwShould Not Be Part Of Group : usergroup1 ✔
userwShould Not Be Part Of Group : usergroup2 ✔
userzShould Not Exist In System : ✔
userz Should Not Be In Sudoers : ✔
userzShould Not Be Part Of Group : usergroup1 ✔
userzShould Not Be Part Of Group : usergroup2 ✔
58 total assertions
--- PASS: Test_TestUserManageByNamesVerify (0.59s)
PASS
ok gitlab.com/evatix-go/osacl/tests/integratedtests/usersmanageapitests 1.699s
```
## Individual Tests Output
### Sudoers Verify
```bash=
=== RUN Test_SudoersVerify
CreateOrUpdate - Sudoers - Given that user not exist in the operating system,
Updating Sudo Enable using Method 'CreateOrUpdate'
Should verify sudoers
User Should Exist In System : ✔
User Should Be In Sudoers : ✔
2 total assertions
CreateOrUpdate - Sudoers - Given that user exist in the operating system,
Updating Sudo Disable using Method 'CreateOrUpdate'
Should verify user existence and sudoers
User Should Not Be In Sudoers : ✔
3 total assertions
DropOnExist - Sudoers - Given that user exist in the operating system,
Deleting using Method 'DropOnExist'
Should verify user existence and sudoers
User Should Not Exist In System : ✔
User Should Not Be In Sudoers : ✔
5 total assertions
--- PASS: Test_SudoersVerify (0.15s)
```
### User Error Verify
```bash=
=== RUN Test_UserErrorVerify
Drop/Delete - Given that user not exist in the operating system,
Delete non exist using - Method 'Drop' or 'Delete'
Should give a specific error. ✔
6 total assertions
DropOnExist - Given that user not exist in the operating system,
Delete non exist using - Method 'DropOnExist'
Should not give an error. ✔
7 total assertions
CreateOrUpdate - Given that user not exist in the operating system,
Create using - Method 'CreateOrUpdate'
Should not give an error. ✔
8 total assertions
Create - Given that user exists in the operating system,
Create using - Method 'Create'
Should give a specific error. ✔
9 total assertions
Drop - Given that user exist in the operating system,
Delete using - Method 'Drop'
Should not give an error. ✔
10 total assertions
Update - Given that user not exist in the operating system,
Update using - Method 'Update'
Should give a specific error. ✔
11 total assertions
UpdateOrSkipOnNonExist - Given that user not exist in the operating system,
Update using - Method 'UpdateOrSkipOnNonExist'
Should not give an error. ✔
12 total assertions
DeleteOrSkipOnNonExist - Given that user not exist in the operating system,
Delete non exist using - Method 'DeleteOrSkipOnNonExist'
Should not give an error. ✔
13 total assertions
DropOrSkipOnNonExist - Given that user not exist in the operating system,
Delete non exist using - Method 'DropOrSkipOnNonExist'
Should not give an error. ✔
14 total assertions
UpdateOnExist - Given that user not exist in the operating system,
Update using - Method 'UpdateOnExist'
Should not give an error. ✔
15 total assertions
DropOnExist - Given that user not exist in the operating system,
Delete non exist using - Method 'DropOnExist'
Should not give an error. ✔
16 total assertions
--- PASS: Test_UserErrorVerify (0.25s)
```
### Name Change Verify
```bash=
=== RUN Test_UserNameChangeVerify
Given that users exist
Renaming should not give errors ✔
17 total assertions
Given that users do not exist
Renaming should give errors ✔
18 total assertions
Given that some users exist and some do not
Renaming should rename for existing users and give errors for non-existent ones ✔
19 total assertions
--- PASS: Test_UserNameChangeVerify (0.25s)
```
### User Params Verify
```bash=
=== RUN Test_UserParamsVerify
CreateOrUpdate - Given that user not exist in the operating system,
Creating using Method 'Create' Or 'CreateOrUpdate'
Should verify user existence, homedir, sudoers and groups
User Should Exist In System : ✔
Home Directory Should Be : /home/loki ✔
Home Directory Permission Should Match : ✔
User Should Be In Sudoers : ✔
User Should Be Part Of Group : loki1 ✔
User Should Be Part Of Group : loki2 ✔
25 total assertions
Update - Given that user exist in the operating system,
Updating using Method 'Update'
Should verify homedir, sudoers and groups
Home Directory Should Be : /home/lokixx ✔
Home Directory Permission Should Match : ✔
User Should Be In Sudoers : ✔
User Should Be Part Of Group : loki1 ✔
User Should Be Part Of Group : loki2 ✔
User Should Be Part Of Group : lokigroupt ✔
31 total assertions
Delete - Given that user exist in the operating system,
Removing using Method 'Delete'
Should verify user existence, sudoers and groups
User Should Not Exist In System : ✔
User Should Not Be In Sudoers : ✔
User Should Not Be Part Of Group : loki1 ✔
User Should Not Be Part Of Group : loki2 ✔
User Should Not Be Part Of Group : lokigroupt ✔
36 total assertions
--- PASS: Test_UserParamsVerify (0.45s)
```
### User Manage By Names Verify
```bash=
=== RUN Test_TestUserManageByNamesVerify
CreateOrUpdate - Groups / Shell - IsCreateGroupOnNonExist - Given that some users may exist and some may not exist in the operating system,
Creating Or Updating using Method 'CreateOrUpdate'
Should verify users created, added to groups, added to sudoers, shell changed and password set
usergroup1 Should Exist In System ✔
usergroup2 Should Exist In System ✔
userw Should Exist In System ✔
userw Should Be In Sudoers : ✔
userwShould Be Part Of Group : usergroup1 ✔
userwShould Be Part Of Group : usergroup2 ✔
userw Shell Should Be : /bin/bash ✔
userw Should have password set ✔
userz Should Exist In System ✔
userz Should Be In Sudoers : ✔
userzShould Be Part Of Group : usergroup1 ✔
userzShould Be Part Of Group : usergroup2 ✔
userz Shell Should Be : /bin/bash ✔
userz Should have password set ✔
50 total assertions
DropOnExist - Given that some users may exist and some may not exist in the operating system,
Deleting using Method 'DropOnExist'
Should verify users do not exist in system, is not part of groups and sudoers
userwShould Not Exist In System : ✔
userw Should Not Be In Sudoers : ✔
userwShould Not Be Part Of Group : usergroup1 ✔
userwShould Not Be Part Of Group : usergroup2 ✔
userzShould Not Exist In System : ✔
userz Should Not Be In Sudoers : ✔
userzShould Not Be Part Of Group : usergroup1 ✔
userzShould Not Be Part Of Group : usergroup2 ✔
58 total assertions
--- PASS: Test_TestUserManageByNamesVerify (0.59s)
```
## V2 - Test Output - (Message Updated)
```bash=
=== RUN Test_SudoersVerify
CreateOrUpdate - Sudoers - Given that user not exist in the operating system,
Updating Sudo Enable using Method 'CreateOrUpdate'
Should verify sudoers
userab Created : User Should Exist In System ✔
userab Added To Sudoers : User Should Be In Sudoers ✔
2 total assertions
CreateOrUpdate - Sudoers - Given that user exist in the operating system,
Updating Sudo Disable using Method 'CreateOrUpdate'
Should verify user existence and sudoers
userab Removed From Sudoers : User Should Not Be In Sudoers ✔
3 total assertions
DropOnExist - Sudoers - Given that user exist in the operating system,
Deleting using Method 'DropOnExist'
Should verify user existence and sudoers
userab Removed : User Should Not Exist In System ✔
userab Removed From Sudoers : User Should Not Be In Sudoers ✔
5 total assertions
--- PASS: Test_SudoersVerify (0.15s)
=== RUN Test_UserErrorVerify
Drop/Delete - Given that user not exist in the operating system,
Delete non exist using - Method 'Drop' or 'Delete'
Should give a specific error. ✔
6 total assertions
DropOnExist - Given that user not exist in the operating system,
Delete non exist using - Method 'DropOnExist'
Should not give an error. ✔
7 total assertions
CreateOrUpdate - Given that user not exist in the operating system,
Create using - Method 'CreateOrUpdate'
Should not give an error. ✔
8 total assertions
Create - Given that user exists in the operating system,
Create using - Method 'Create'
Should give a specific error. ✔
9 total assertions
Drop - Given that user exist in the operating system,
Delete using - Method 'Drop'
Should not give an error. ✔
10 total assertions
Update - Given that user not exist in the operating system,
Update using - Method 'Update'
Should give a specific error. ✔
11 total assertions
UpdateOrSkipOnNonExist - Given that user not exist in the operating system,
Update using - Method 'UpdateOrSkipOnNonExist'
Should not give an error. ✔
12 total assertions
DeleteOrSkipOnNonExist - Given that user not exist in the operating system,
Delete non exist using - Method 'DeleteOrSkipOnNonExist'
Should not give an error. ✔
13 total assertions
DropOrSkipOnNonExist - Given that user not exist in the operating system,
Delete non exist using - Method 'DropOrSkipOnNonExist'
Should not give an error. ✔
14 total assertions
UpdateOnExist - Given that user not exist in the operating system,
Update using - Method 'UpdateOnExist'
Should not give an error. ✔
15 total assertions
DropOnExist - Given that user not exist in the operating system,
Delete non exist using - Method 'DropOnExist'
Should not give an error. ✔
16 total assertions
--- PASS: Test_UserErrorVerify (0.21s)
=== RUN Test_UserNameChangeVerify
Given that users exist
Renaming should not give errors ✔
17 total assertions
Given that users do not exist
Renaming should give errors ✔
18 total assertions
Given that some users exist and some do not
Renaming should rename for existing users and give errors for non-existent ones ✔
19 total assertions
--- PASS: Test_UserNameChangeVerify (0.21s)
=== RUN Test_UserParamsVerify
CreateOrUpdate - Given that user not exist in the operating system,
Creating using Method 'Create' Or 'CreateOrUpdate'
Should verify user existence, homedir, sudoers and groups
loki Created : User Should Exist In System ✔
Home Directory Should Be : /home/loki ✔
Home Directory Permission Should Match ✔
loki Added To Sudoers : User Should Be In Sudoers ✔
loki Added To Group : User Should Be Part Of Group : loki1 ✔
loki Added To Group : User Should Be Part Of Group : loki2 ✔
25 total assertions
Update - Given that user exist in the operating system,
Updating using Method 'Update'
Should verify homedir, sudoers and groups
Home Directory Should Be : /home/lokixx ✔
Home Directory Permission Should Match ✔
loki Added To Sudoers : User Should Be In Sudoers ✔
loki Added To Group : User Should Be Part Of Group : loki1 ✔
loki Added To Group : User Should Be Part Of Group : loki2 ✔
loki Added To Group : User Should Be Part Of Group : lokigroupt ✔
31 total assertions
Delete - Given that user exist in the operating system,
Removing using Method 'Delete'
Should verify user existence, sudoers and groups
loki Removed : User Should Not Exist In System ✔
loki Removed From Sudoers : User Should Not Be In Sudoers ✔
loki Removed From Group : User Should Not Be Part Of Group : loki1 ✔
loki Removed From Group : User Should Not Be Part Of Group : loki2 ✔
loki Removed From Group : User Should Not Be Part Of Group : lokigroupt ✔
36 total assertions
--- PASS: Test_UserParamsVerify (0.44s)
=== RUN Test_TestUserManageByNamesVerify
CreateOrUpdate - Groups / Shell - IsCreateGroupOnNonExist - Given that some users may exist and some may not exist in the operating system,
Creating Or Updating using Method 'CreateOrUpdate'
Should verify users created, added to groups, added to sudoers, shell changed and password set
usergroup1 Added To System : Group Should Exist In System ✔
usergroup2 Added To System : Group Should Exist In System ✔
userw Created : User Should Exist In System ✔
userw Added To Sudoers : User Should Be In Sudoers ✔
userw Added To Group : Should Be Part Of Group : usergroup1 ✔
userw Added To Group : Should Be Part Of Group : usergroup2 ✔
userw Shell Should Be : /bin/bash ✔
userw Should have password set ✔
userz Created : User Should Exist In System ✔
userz Added To Sudoers : User Should Be In Sudoers ✔
userz Added To Group : Should Be Part Of Group : usergroup1 ✔
userz Added To Group : Should Be Part Of Group : usergroup2 ✔
userz Shell Should Be : /bin/bash ✔
userz Should have password set ✔
50 total assertions
DropOnExist - Given that some users may exist and some may not exist in the operating system,
Deleting using Method 'DropOnExist'
Should verify users do not exist in system, is not part of groups and sudoers
userw Removed : User Should Not Exist In System ✔
userw Removed From Sudoers : Should Not Be In Sudoers ✔
userw Removed From Group : Should Not Be Part Of Group : usergroup1 ✔
userw Removed From Group : Should Not Be Part Of Group : usergroup2 ✔
userz Removed : User Should Not Exist In System ✔
userz Removed From Sudoers : Should Not Be In Sudoers ✔
userz Removed From Group : Should Not Be Part Of Group : usergroup1 ✔
userz Removed From Group : Should Not Be Part Of Group : usergroup2 ✔
58 total assertions
--- PASS: Test_TestUserManageByNamesVerify (0.64s)
PASS
ok gitlab.com/evatix-go/osacl/tests/integratedtests/usersmanageapitests 1.648s
```