1
0
mirror of https://github.com/laurivosandi/certidude synced 2024-12-22 16:25:17 +00:00

Attempt to create test users via Travis

This commit is contained in:
Lauri Võsandi 2017-04-25 22:01:18 +03:00
parent 9ff260c2ea
commit a5c776621b
2 changed files with 2 additions and 15 deletions

View File

@ -12,6 +12,8 @@ install:
- pip install --editable .
- pip install codecov pytest-cov click ipaddress humanize falcon simplepam
script:
- useradd adminbot -G sudo -p '$1$PBkf5waA$n9EV6WJ7PS6lyGWkgeTPf1'
- useradd userbot -G users -p '$1$PBkf5waA$n9EV6WJ7PS6lyGWkgeTPf1'
- py.test --cov-report xml --cov=certidude tests/
cache:
directories:

View File

@ -45,21 +45,6 @@ def test_cli_setup_authority():
assert authority.ca_cert.not_valid_before < datetime.now()
assert authority.ca_cert.not_valid_after > datetime.now() + timedelta(days=7000)
try:
pwd.getpwnam("userbot")
except KeyError:
# useradd userbot -G users -p '$1$PBkf5waA$n9EV6WJ7PS6lyGWkgeTPf1'
cmd = "useradd", "userbot", "-G", "users", "-p", "$1$PBkf5waA$n9EV6WJ7PS6lyGWkgeTPf1" # bot
subprocess.call(cmd)
try:
pwd.getpwnam("adminbot")
except KeyError:
# Note: on Fedora use group 'wheel' instead of 'sudo'
# useradd adminbot -G sudo -p '$1$PBkf5waA$n9EV6WJ7PS6lyGWkgeTPf1'
cmd = "useradd", "adminbot", "-G", "sudo", "-p", "$1$PBkf5waA$n9EV6WJ7PS6lyGWkgeTPf1" # bot
subprocess.call(cmd)
usertoken = "Basic dXNlcmJvdDpib3Q="
admintoken = "Basic YWRtaW5ib3Q6Ym90"