diff --git a/.travis.yml b/.travis.yml index 46085b2..02ec647 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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: diff --git a/tests/test_cli.py b/tests/test_cli.py index 50bce54..f7c6e08 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -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"