Implemented tests.

This commit is contained in:
Lucas 2020-04-07 04:36:53 -04:00
parent b8614e06c4
commit b8622472c2
2 changed files with 10 additions and 4 deletions

View File

@ -3,7 +3,6 @@
hosts: all
become: true
vars:
d: ${VERIFIER_NAME}
acme_sh_domains: []
roles:
- role: cloudflare-acme

View File

@ -6,9 +6,16 @@ testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
def test_motd_file_exist(host):
def test_temporary_files_deleted(host):
f = host.file('/tmp/acme.sh')
assert not f.exists
# def test_motd_file_work(host):
# host.run_test('/etc/profile.d/motd.sh')
# def test_cert_created(host):
# f = host.file('/tmp/acme_test/test_role.justereseau.com.pem')
# assert f.exists
# def test_key_created(host):
# f = host.file('/tmp/acme_test/test_role.justereseau.com.key')
# assert f.exists