add test to resolve http ports
continuous-integration/drone/push Build is failing Details

This commit is contained in:
Robert Kaussow 2019-03-25 13:42:56 +01:00
parent a40b448510
commit 47a910f609
5 changed files with 5 additions and 45 deletions

View File

@ -1,26 +0,0 @@
---
dependency:
name: galaxy
driver:
name: delegated
options:
managed: False
ansible_connection_options:
ansible_connection: local
lint:
name: yamllint
enabled: False
platforms:
- name: instance
provisioner:
name: ansible
lint:
name: ansible-lint
playbooks:
converge: coverage.yml
scenario:
name: default
verifier:
name: testinfra
lint:
name: flake8

View File

@ -1,5 +0,0 @@
---
- name: Converge
hosts: localhost
roles:
- role: xoxys.nginx

View File

@ -1,14 +0,0 @@
import os
import testinfra.utils.ansible_runner
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
def test_hosts_file(host):
f = host.file('/etc/hosts')
assert f.exists
assert f.user == 'root'
assert f.group == 'root'

View File

@ -17,3 +17,8 @@ def test_nginx_running_and_enabled(host):
nginx = host.service("nginx")
assert nginx.is_running
assert nginx.is_enabled
def test_nginx_ports(host):
localhost = host.addr("127.0.0.1")
assert localhost.port(443).is_reachable
assert localhost.port(80).is_reachable