refactor molecule tests for python
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
parent
20b94d8e6c
commit
0514e2d8ce
@ -1,9 +1,7 @@
|
|||||||
---
|
---
|
||||||
- name: Converge
|
- name: Converge
|
||||||
hosts: all
|
hosts: all
|
||||||
vars:
|
|
||||||
certbot_packages_extra:
|
|
||||||
- epel-release
|
|
||||||
|
|
||||||
roles:
|
roles:
|
||||||
|
- role: xoxys.python3
|
||||||
- role: xoxys.certbot
|
- role: xoxys.certbot
|
||||||
|
5
molecule/centos7/requirements.yml
Normal file
5
molecule/centos7/requirements.yml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
- src: https://gitea.rknet.org/ansible/xoxys.python3.git
|
||||||
|
name: xoxys.python3
|
||||||
|
scm: git
|
||||||
|
version: master
|
@ -10,5 +10,11 @@ testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
|||||||
|
|
||||||
|
|
||||||
def test_certbot_is_installed(host):
|
def test_certbot_is_installed(host):
|
||||||
certbot = host.package("certbot")
|
pkg = host.pip_package.get_packages(pip_path="pip3")
|
||||||
assert certbot.is_installed
|
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
|
||||||
|
Loading…
Reference in New Issue
Block a user