Closed
Description
SUMMARY
In the testing pipeline, we have several tests across the roles that look at what version was installed. Right now we're hard-coding the version based on the distribution rather than looking at the variable that is being set as part of the testing pipeline. Need to update the test logic to look at the version that we're telling it to (via the zabbix_<component>_version
variable and base the version on that insead.
ISSUE TYPE
- Bug Report
COMPONENT NAME
All roles
ACTUAL RESULTS
=================================== FAILURES ===================================
_____________ test_zabbix_package[ansible://zabbix-agent-centos8] ______________
host = <testinfra.host.Host ansible://zabbix-agent-centos8>
zabbix_agent_package = <package zabbix-agent2>
def test_zabbix_package(host, zabbix_agent_package):
assert zabbix_agent_package.is_installed
if host.system_info.distribution == "debian":
if host.system_info.codename in ["bullseye", "focal"]:
assert zabbix_agent_package.version.startswith("1:6.4")
else:
> assert zabbix_agent_package.version.startswith("1:6.0")
E AssertionError: assert False
E + where False = <built-in method startswith of str object at 0x7f46404dbc10>('1:6.0')
E + where <built-in method startswith of str object at 0x7f46404dbc10> = '1:6.4.1-1+debian10'.startswith
E + where '1:6.4.1-1+debian10' = <package zabbix-agent2>.version
molecule/agent2/tests/common/test_agent.py:47: AssertionError
=========================== short test summary info ============