fixes for the managers tests and added more tasks in Pipfile

This commit is contained in:
Rshad Zhran 2019-08-23 10:43:44 +02:00
parent 76029f99fd
commit adbf200142
3 changed files with 13 additions and 5 deletions

14
Pipfile
View File

@ -20,9 +20,17 @@ agent ="molecule test -s wazuh-agent --destroy=never"
elasticsearch ="molecule test -s elasticsearch --destroy=never" elasticsearch ="molecule test -s elasticsearch --destroy=never"
kibana ="molecule test -s kibana --destroy=never" kibana ="molecule test -s kibana --destroy=never"
# Verify ..
verify ="molecule verify"
verify_worker ="molecule verify -s worker" verify_worker ="molecule verify -s worker"
verify_agent ="molecule verify -s agent"
verify_elasticsearch ="molecule verify -s elasticsearch"
verify_kibana ="molecule verify -s kibana"
# Destroy all the existing containers ' Molecule instances ' # Destroy ..
destroy_elasticsearch ="molecule destroy -s elasticsearch"
destroy_worker ="molecule destroy -s worker"
destroy ="molecule destroy" destroy ="molecule destroy"
destroy_worker ="molecule destroy -s worker"
destroy_agent ="molecule destroy -s agent"
destroy_elasticsearch ="molecule destroy -s elasticsearch"
destroy_kibana ="molecule destroy -s kibana"

View File

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

View File

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