Пример #1
0
def test_scenarios_with_base_molecule_config(mocker):
    ansible = Ansible("tests/fixtures/collection")
    base_configs = [os.path.join(ansible.directory, "molecule.yml")]
    ansible.options = mocker.Mock()
    ansible.options.ignore_paths = []
    ansible.options.molecule_config_files = base_configs
    assert ansible.molecule_config_files() == base_configs
Пример #2
0
def test_scenarios_with_global_molecule_config(mocker):
    ansible = Ansible("tests/fixtures/not_collection")
    global_config = [
        os.path.join(ansible.directory, ".config/molecule/config.yml")
    ]
    ansible.options = mocker.Mock()
    ansible.options.ignore_paths = []
    ansible.options.molecule_config_files = []
    assert ansible.molecule_config_files() == global_config