Files @ 686083d16102
Branch filter:

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

branko
MAR-191: Drop support for Debian 11 Buster from the wsgi_website role:

- Get rid of the workaround that used to cause issues in some of the
previous versions of Debian while at it. This should no longer pose
an issue.
import os

import testinfra.utils.ansible_runner


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


def test_backports_prosody_pinning(host):
    """
    Tests if the backports pin for Prosody has been deployed correctly.
    """

    pin = host.file("/etc/apt/preferences.d/prosody")

    assert pin.is_file
    assert pin.user == "root"
    assert pin.group == "root"
    assert pin.mode == 0o644

    prosody_package = host.package("prosody")
    prosody_modules_package = host.package("prosody-modules")
    lua_ldap_package = host.package("lua-sec")

    assert "bpo" in prosody_package.version
    assert "bpo" in prosody_modules_package.version
    assert "bpo" in lua_ldap_package.version