Files @ 10f53ae8f131
Branch filter:

Location: majic-ansible-roles/roles/backup/molecule/default/tests/test_parameters_optional.py

branko
MAR-218: Enable case-sensitive column name handling for database privileges:

- This will become a new default in the next major release of the
community.mysql collection.
- Gets rid of the Ansible mysql_user module warning.
import os

import testinfra.utils.ansible_runner


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


def test_backup_patterns_content(host):
    """
    Tests if content of file containing backup patterns is correct.
    """

    with host.sudo():

        backup_pattern = host.file('/etc/duply/main/patterns/test')

        assert backup_pattern.content_string == "/etc/hosts\n/etc/ethers\n/var/log\n"


def test_include_content(host):
    """
    Tests if content of assembled include file containing backup patterns is
    correct.
    """

    with host.sudo():

        include = host.file('/etc/duply/main/include')

        assert include.content_string == "/etc/hosts\n/etc/ethers\n/var/log\n"