adapted testinfra tests for the worker

This commit is contained in:
Rshad Zhran 2019-08-22 16:48:02 +02:00
parent 38d954aeaa
commit 3249fd86ed
2 changed files with 4 additions and 2 deletions

View File

@ -20,6 +20,8 @@ agent ="molecule test -s wazuh-agent --destroy=never"
elasticsearch ="molecule test -s elasticsearch --destroy=never"
kibana ="molecule test -s kibana --destroy=never"
verify_worker ="molecule verify -s worker"
# Destroy all the existing containers ' Molecule instances '
destroy_elasticsearch ="molecule destroy -s elasticsearch"
destroy_worker ="molecule destroy -s worker"

View File

@ -73,10 +73,10 @@ def test_open_ports(host):
"""Test if the main port is open and the agent-auth is not open."""
distribution = host.system_info.distribution.lower()
if distribution == 'ubuntu':
assert host.socket("tcp://0.0.0.0:1515").is_listening
assert host.socket("tcp://0.0.0.0:1516").is_listening
assert host.socket("tcp://0.0.0.0:1514").is_listening
elif distribution == 'centos':
assert host.socket("tcp://127.0.0.1:1515").is_listening
assert host.socket("tcp://127.0.0.1:1516").is_listening
assert host.socket("tcp://127.0.0.1:1514").is_listening