Skip to content

Commit

Permalink
osutil: add check for usermod call in TestAddUserWithPasswordForceChange
Browse files Browse the repository at this point in the history
  • Loading branch information
mvo5 committed Oct 10, 2018
1 parent 8a09b12 commit c148b86
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions osutil/user_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,9 @@ func (s *createUserSuite) TestAddUserWithPasswordForceChange(c *check.C) {
c.Check(s.mockAddUser.Calls(), check.DeepEquals, [][]string{
{"adduser", "--force-badname", "--gecos", "my gecos", "--disabled-password", "karl.popper"},
})
c.Check(s.mockUserMod.Calls(), check.DeepEquals, [][]string{
{"usermod", "--password", "$6$salt$hash", "karl.popper"},
})
c.Check(s.mockPasswd.Calls(), check.DeepEquals, [][]string{
{"passwd", "--expire", "karl.popper"},
})
Expand Down

0 comments on commit c148b86

Please sign in to comment.