# Path: nuka/tasks/file.py
# class exists(Task):
# class mkdir(Task):
# class mkdirs(Task):
# class rm(Task):
# class mv(Task):
# class chmod(Task):
# class chown(Task):
# class put(Task):
# class scripts(put):
# class cat(Task):
# class update(Task):
#     def __init__(self, dst=None, **kwargs):
#     def do(self):
#     def diff(self):
#     def __init__(self, dst=None, mod=None, own=None, **kwargs):
#     def do(self):
#     def diff(self):
#     def __init__(self, directories=None, **kwargs):
#     def do(self):
#     def diff(self):
#     def __init__(self, dst=None, **kwargs):
#     def do(self):
#     def diff(self):
#     def __init__(self, src=None, dst=None, **kwargs):
#     def do(self):
#     def diff(self):
#     def __init__(self, dst=None, mod='644', recursive=False, **kwargs):
#     def do(self):
#     def __init__(self, dst=None, own='root:root', recursive=False, **kwargs):
#     def do(self):
#     def __init__(self, files=None, **kwargs):
#     def pre_process(self):
#     def do(self):
#     def diff(self):
#     def do(self):
#     def __init__(self, src=None, **kwargs):
#     def do(self):
#     def __init__(self, dst=None, replaces=None, appends=None, **kwargs):
#     def pre_process(self):
#     def update(self, data):
#     def do(self):
#     def diff(self, dst=None, **kwargs):


from nuka.tasks import file
import pytest
import os
# -*- coding: utf-8 -*-

pytestmark = [
    pytest.mark.skipif(
        'gawel' not in os.getenv('GPG_AGENT_INFO', ''),
        reason='gawel not found in GPG_AGENT_INFO')
]


@pytest.mark.asyncio
async def test_gpg_file(host):
    res = await file.put([dict(src='tests/templates/gpg.txt.gpg',
                               dst='/tmp/gpg.txt')])
    assert bool(res)
    res = await file.cat('/tmp/gpg.txt')
    assert res.content == 'yo {{name}}\n'


@pytest.mark.asyncio
async def test_gpg_template(host):

# Path: nuka/tasks/file.py
# class exists(Task):
# class mkdir(Task):
# class mkdirs(Task):
# class rm(Task):
# class mv(Task):
# class chmod(Task):
# class chown(Task):
# class put(Task):
# class scripts(put):
# class cat(Task):
# class update(Task):
#     def __init__(self, dst=None, **kwargs):
#     def do(self):
#     def diff(self):
#     def __init__(self, dst=None, mod=None, own=None, **kwargs):
#     def do(self):
#     def diff(self):
#     def __init__(self, directories=None, **kwargs):
#     def do(self):
#     def diff(self):
#     def __init__(self, dst=None, **kwargs):
#     def do(self):
#     def diff(self):
#     def __init__(self, src=None, dst=None, **kwargs):
#     def do(self):
#     def diff(self):
#     def __init__(self, dst=None, mod='644', recursive=False, **kwargs):
#     def do(self):
#     def __init__(self, dst=None, own='root:root', recursive=False, **kwargs):
#     def do(self):
#     def __init__(self, files=None, **kwargs):
#     def pre_process(self):
#     def do(self):
#     def diff(self):
#     def do(self):
#     def __init__(self, src=None, **kwargs):
#     def do(self):
#     def __init__(self, dst=None, replaces=None, appends=None, **kwargs):
#     def pre_process(self):
#     def update(self, data):
#     def do(self):
#     def diff(self, dst=None, **kwargs):


# Path: tests/tasks/test_gpg.py
from nuka.tasks import file
import pytest
import os

# -*- coding: utf-8 -*-

pytestmark = [
    pytest.mark.skipif(
        'gawel' not in os.getenv('GPG_AGENT_INFO', ''),
        reason='gawel not found in GPG_AGENT_INFO')
]


@pytest.mark.asyncio
async def test_gpg_file(host):
    res = await file.put([dict(src='tests/templates/gpg.txt.gpg',
                               dst='/tmp/gpg.txt')])
    assert bool(res)
    res = await file.cat('/tmp/gpg.txt')
    assert res.content == 'yo {{name}}\n'


@pytest.mark.asyncio
async def test_gpg_template(host):

    res = await file.put([dict(src='gpg.j2.gpg', dst='/tmp/gpg.j2')],