Files @ c2f446ec7e2a
Branch filter:

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

branko
MAR-158: Update default TLS ciphers configuration in the mail_server role:

- Updated the default value for parameter mail_server_tls_ciphers.
- Updated tests, making them explicitly test for enabled and disabled
ciphers.
- Refactored tests for TLS to use nmap ssl-enum-ciphers script for
listing available TLS versions and ciphers.
- Install nmap as part of preparation step.
- Updated role reference documentation.
import os

import testinfra.utils.ansible_runner


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


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 == ''


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 == ''