Skip to content

Commit

Permalink
WIP.
Browse files Browse the repository at this point in the history
  • Loading branch information
jonhadfield committed Aug 20, 2016
1 parent a480699 commit 50ea59a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
3 changes: 0 additions & 3 deletions lib/creds/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@
LINUX_CMD_GROUP_ADD = spawn.find_executable("groupadd")
LINUX_CMD_GROUP_DEL = spawn.find_executable("groupdel")
# BSD COMMANDS
BSD_CMD_ADDUSER = spawn.find_executable("adduser")
BSD_CMD_CHPASS = spawn.find_executable("chpass")
BSD_CMD_RMUSER = spawn.find_executable("rmuser")
BSD_CMD_PW = spawn.find_executable("pw")


Expand Down
2 changes: 1 addition & 1 deletion lib/creds/users.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

from creds.constants import (UID_MAX, UID_MIN,
LINUX_CMD_USERADD, LINUX_CMD_USERDEL, LINUX_CMD_USERMOD,
BSD_CMD_ADDUSER, BSD_CMD_CHPASS, BSD_CMD_RMUSER)
BSD_CMD_PW)
from creds.ssh import PublicKey
from creds.ssh import read_authorized_keys
from creds.utils import (get_platform, check_platform, sudo_check)
Expand Down
6 changes: 3 additions & 3 deletions tests/test_plan.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
from creds.users import (Users, User)
from creds.ssh import PublicKey
from creds.utils import (execute_command, sudo_check, get_platform)
from creds.constants import (LINUX_CMD_USERADD, LINUX_CMD_USERMOD, LINUX_CMD_USERDEL, LINUX_CMD_GROUP_ADD, LINUX_CMD_GROUP_DEL,
BSD_CMD_ADDUSER, BSD_CMD_RMUSER, BSD_CMD_CHPASS, BSD_CMD_PW)
from creds.constants import (LINUX_CMD_USERADD, LINUX_CMD_USERMOD, LINUX_CMD_USERDEL,
LINUX_CMD_GROUP_ADD, LINUX_CMD_GROUP_DEL, BSD_CMD_PW)
from external.six import text_type
from .sample_data import PUBLIC_KEYS

Expand Down Expand Up @@ -212,7 +212,7 @@ def create_test_user():
str('{0} {1} -u 59999 -c \"test user gecos\" -m -s /bin/bash testuserx1234'.format(sudo_check(), LINUX_CMD_USERADD)))
elif PLATFORM == 'FreeBSD':
command = shlex.split(
str('{0} {1} -u 59999 -c \"test user gecos\" -m -s /bin/bash testuserx1234'.format(sudo_check(), BSD_CMD_ADDUSER)))
str('{0} {1} useradd -u 59999 -c \"test user gecos\" -m -s /bin/bash testuserx1234'.format(sudo_check(), BSD_CMD_PW)))
assert execute_command(command=command)


Expand Down

0 comments on commit 50ea59a

Please sign in to comment.