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:
parent
9ff260c2ea
commit
a5c776621b
@ -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:
|
||||
|
@ -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"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user