Files @ bc60f4771dd4
Branch filter:

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

branko
MAR-151: Test removal of backports pin for lua-ldap (for Stretch -> Buster upgrades).
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