Files @ 9ca9c3ada58a
Branch filter:

Location: majic-ansible-roles/roles/xmpp_server/molecule/default/tests/test_default_buster.py

branko
MAR-181: Use Debian-provided Prosody package for testing optional parameter:

- Still properly tests the role, while at the same time making it
possible to use custom apt repository for Debian Buster (due to
Prosody project dropping all repository archives for it).
import os

import testinfra.utils.ansible_runner


testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
    os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('parameters-*-buster64')


def test_lua_ldap_pin_and_version(host):
    """
    Tests if lua-ldap package is not pinned to the backports
    repository.
    """

    pin_configuration_file = host.file("/etc/apt/preferences.d/lua-ldap")
    lua_ldap = host.package("lua-ldap")

    assert not pin_configuration_file.exists
    assert "bpo" not in lua_ldap.version