8000 Update tests used to check version · Issue #947 · ansible-collections/community.zabbix · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Update tests used to check version #947
Closed
@pyrodie18

Description

@pyrodie18
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 ============

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingroleThe issue or pull request is related to Zabbix role

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0