Beispiel #1
0
def test_bad_role_name():
    with pytest.raises(exc.ContentNameError):
        loaders.RoleLoader(
            content_type=constants.ContentType.ROLE,
            rel_path="roles/bad-name-dashes",
            root="",
        )
Beispiel #2
0
def loader_role_subdirs():
    return loaders.RoleLoader(
        content_type=constants.ContentType.ROLE,
        rel_path="roles/subdir1/subdir2/my_sample_role",
        root=
        "/tmp_placeholder/tmp_placeholder/ansible_collections/my_ns/my_collection",
    )
def loader_role():
    return loaders.RoleLoader(
        content_type=constants.ContentType.ROLE,
        rel_path='roles/my_sample_role',
        root=
        '/tmp_placeholder/tmp_placeholder/ansible_collections/my_ns/my_collection'
    )
Beispiel #4
0
def loader_role():
    return loaders.RoleLoader(
        content_type=constants.ContentType.ROLE,
        rel_path="roles/my_sample_role",
        cfg=SimpleNamespace(run_ansible_lint=True,
                            ansible_local_tmp="~/.ansible/tmp"),
        root=
        "/tmp_placeholder/tmp_placeholder/ansible_collections/my_ns/my_collection",
    )
Beispiel #5
0
def loader_role():
    return loaders.RoleLoader(
        content_type=constants.ContentType.ROLE,
        rel_path='roles/my_sample_role',
        root=None)
Beispiel #6
0
def test_bad_role_name():
    with pytest.raises(exc.ContentNameError):
        loaders.RoleLoader(
            content_type=constants.ContentType.ROLE,
            rel_path='roles/bad-name-dashes',
            root='/tmp/tmpiskt5e2n')