Skip to content

test_apparmor.py failure on Focal #5636

@kushaldas

Description

@kushaldas

Description

Steps to Reproduce

  • molecule test -s libvirt-staging-focal

Expected Behavior

  • tests should pass

Actual Behavior

    _________ test_apparmor_enforced[ansible://app-staging-/sbin/dhclient] _________
    [gw0] linux -- Python 3.7.3 /root/code/securedrop/.venv/bin/python3

    host = <testinfra.host.Host ansible://app-staging>
    aa_enforced = '/sbin/dhclient'

        @pytest.mark.parametrize('aa_enforced', sdvars.apparmor_enforce)
        def test_apparmor_enforced(host, aa_enforced):
            awk = ("awk '/[0-9]+ profiles.*enforce./"
                   "{flag=1;next}/^[0-9]+.*/{flag=0}flag'")
            with host.sudo():
                c = host.check_output("aa-status | {}".format(awk))
    >           assert aa_enforced in c
    E           AssertionError: assert '/sbin/dhclient' in '   /usr/bin/man\n   /usr/lib/NetworkManager/nm-dhcp-client.action\n   /usr/lib/NetworkManager/nm-dhcp-helper\n   /usr...bin/dhclient\n   lsb_release\n  
 man_filter\n   man_groff\n   nvidia_modprobe\n   nvidia_modprobe//kmod\n   system_tor'

    ../testinfra/app/test_apparmor.py:102: AssertionError

Comments

Most probably the dhclient path has changed in Focal.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions