refactor molecule tests for python
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Robert Kaussow 2020-04-20 23:31:55 +02:00
parent 20b94d8e6c
commit 0514e2d8ce
3 changed files with 14 additions and 5 deletions

View File

@ -1,9 +1,7 @@
---
- name: Converge
hosts: all
vars:
certbot_packages_extra:
- epel-release
roles:
- role: xoxys.python3
- role: xoxys.certbot

View File

@ -0,0 +1,5 @@
---
- src: https://gitea.rknet.org/ansible/xoxys.python3.git
name: xoxys.python3
scm: git
version: master

View File

@ -10,5 +10,11 @@ testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
def test_certbot_is_installed(host):
certbot = host.package("certbot")
assert certbot.is_installed
pkg = host.pip_package.get_packages(pip_path="pip3")
assert "certbot" in pkg
def test_certbot_run(host):
cmd = host.run("certbot --help")
assert "Certbot can obtain and install HTTPS/TLS/SSL certificates." in cmd.stdout
assert cmd.succeeded