Skip to content

Conversation

@ikerexxe
Copy link
Collaborator

Expand the system test framework to provide python bindings for passwd, chpasswd, gpasswd, chgpasswd and vipw binaries. Also include at least one test case example for each of them. Additional changes has been made to the way we generate the test environment (a.k.a. containers) so that it contains everything needed to run these tests.

@ikerexxe
Copy link
Collaborator Author

This PR depends on #1340 as it contains several changes that are included there too.

@ikerexxe
Copy link
Collaborator Author

I need to dedicate some time to fix those CI issues

Expose shadow's password regex pattern in a function.

Signed-off-by: Iker Pedrosa <[email protected]>
…teractive mode

This is the transformation to Python of the test located in
`tests/passwd/18_passwd_root_change_password_user/passwd.test`,
which checks that `passwd` is able to change a user's password running
as root in interactive mode.

Signed-off-by: Iker Pedrosa <[email protected]>
Temporary workaround to create the chpasswd PAM service file. Fedora
will soon provide this service file and we'll be able to remove the
workaround.

Signed-off-by: Iker Pedrosa <[email protected]>
…nteractive

This is the transformation to Python of the test located in
`tests/usertools/chpasswd/02_chpasswd_multiple_users/chpasswd.test`,
which checks that `chpasswd` is able to change the password of multiple
users in batch.

Signed-off-by: Iker Pedrosa <[email protected]>
…oot user

This is the transformation to Python of the test located in
`tests/grouptools/gpasswd/31_gpasswd_add_user_to_group/gpasswd.test`,
which checks that `gpasswd` is able to add a user to a group membership
running as root.

Signed-off-by: Iker Pedrosa <[email protected]>
This is the transformation to Python of the test located in
`tests/grouptools/gpasswd/50_gpasswd_change_admin_list/gpasswd.test`,
which checks that `gpasswd` is able to add a user as a group
administrator.

Signed-off-by: Iker Pedrosa <[email protected]>
… interactive

This is the transformation to Python of the test located in
`tests/grouptools/chgpasswd/02_chgpasswd_multiple_groups/chgpasswd.test`,
which checks that `chgpasswd` is able to change the password of multiple
groups in batch.

Signed-off-by: Iker Pedrosa <[email protected]>
* Run vipw on passwd file and add a user
* Run vipw on shadow file and add a user
* Run vipw on group file and add a group
* Run vipw on gshadow file and add a group

Signed-off-by: Iker Pedrosa <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant