Browse Source

pad: transition from molecule to pytest

keep-around/be27015c20574507418ba259d6bbe1783e6a264b
Loïc Dachary 1 year ago
committed by Loic Dachary
parent
commit
6e7063812e
Signed by: dachary GPG Key ID: 992D23B392F9E4F2
  1. 0
      inventory/group_vars/pad-service-group.yml
  2. 14
      molecule/pad/conftest.py
  3. 1
      molecule/pad/create.yml
  4. 1
      molecule/pad/destroy.yml
  5. 14
      molecule/pad/pad-playbook.yml
  6. 2
      molecule/pad/tests/test_icinga.py
  7. 2
      tox.ini

0
inventory/group_vars/pad-group.yml → inventory/group_vars/pad-service-group.yml

14
molecule/pad/conftest.py

@ -0,0 +1,14 @@
def pytest_addoption(parser):
parser.addoption(
"--enough-hosts",
action="store",
default="bind-host,icinga-host,website-host",
help="list of hosts"
)
parser.addoption(
"--enough-service-directory",
action="store",
default="pad",
help="service directory"
)

1
molecule/pad/create.yml

@ -1 +0,0 @@
../infrastructure/create.yml

1
molecule/pad/destroy.yml

@ -1 +0,0 @@
../infrastructure/destroy.yml

14
molecule/pad/pad-playbook.yml

@ -18,13 +18,6 @@
roles:
- role: pad
- role: monitor_http_vhost
http_vhost_https: true
http_vhost_name: Pad
http_vhost_fqdn: "{{ pad_vhost_fqdn }}"
http_vhost_uri: "/"
http_vhost_string: "Etherpad"
- role: enough-nginx
vars:
enough_nginx_reverse_proxy: 127.0.0.1:9001
@ -34,3 +27,10 @@
vars:
certificate_fqdn: "{{ pad_vhost_fqdn }}"
certificate_installer: nginx
- role: monitor_http_vhost
http_vhost_https: true
http_vhost_name: Pad
http_vhost_fqdn: "{{ pad_vhost_fqdn }}"
http_vhost_uri: "/"
http_vhost_string: "Etherpad"

2
molecule/pad/tests/test_icinga.py

@ -1,6 +1,6 @@
from tests.icinga_helper import IcingaHelper
testinfra_hosts = ['icinga-host']
testinfra_hosts = ['ansible://icinga-host']
class TestChecks(IcingaHelper):

2
tox.ini

@ -19,7 +19,7 @@ commands = coverage run --source=enough {envbindir}/py.test -vvv --durations 10
[testenv:flake8]
commands = flake8 {posargs}
[testenv:{infrastructure,bind,authorized_keys,backup,certificate,postfix,icinga,openvpn,wekan,misc}]
[testenv:{infrastructure,bind,authorized_keys,backup,certificate,postfix,icinga,openvpn,wekan,misc,pad}]
passenv =
ENOUGH_API_TOKEN
PYTEST_ADDOPTS

Loading…
Cancel
Save