Пример #1
0
def test_find_files_searches_subdirectories(tmpdir):
    tmpdir.join('agents', 'special', 'agent_test').write_binary(b'hello',
                                                                ensure=True)

    result = mkp.find_files(str(tmpdir))

    assert result['agents'] == ['special/agent_test']
Пример #2
0
def test_find_files_searches_all_directories(tmpdir):
    for directory in DIRECTORIES:
        tmpdir.join(directory, 'test').write_binary(b'Foo', ensure=True)

    result = mkp.find_files(str(tmpdir))
    for directory in DIRECTORIES:
        assert result[directory] == ['test']
Пример #3
0
def test_find_files_searches_all_directories(tmpdir):
    for directory in DIRECTORIES:
        tmpdir.join(directory, 'test').write_binary(b'Foo', ensure=True)

    result = mkp.find_files(str(tmpdir))
    for directory in DIRECTORIES:
        assert result[directory] == ['test']
Пример #4
0
def test_find_files_ignores_hidden_files_and_dirs(tmpdir):
    tmpdir.join('agents', '.hidden').write_binary(b'hello', ensure=True)
    tmpdir.join('agents', 'test~').write_binary(b'hello', ensure=True)
    tmpdir.join('agents', '.hidden_dir', 'visible_file').write_binary(b'hello', ensure=True)

    result = mkp.find_files(str(tmpdir))

    assert result['agents'] == []
Пример #5
0
def test_find_files_ignores_hidden_files_and_dirs(tmpdir):
    tmpdir.join('agents', '.hidden').write_binary(b'hello', ensure=True)
    tmpdir.join('agents', 'test~').write_binary(b'hello', ensure=True)
    tmpdir.join('agents', '.hidden_dir',
                'visible_file').write_binary(b'hello', ensure=True)

    result = mkp.find_files(str(tmpdir))

    assert result['agents'] == []
Пример #6
0
def test_find_files_searches_subdirectories(tmpdir):
    tmpdir.join('agents', 'special', 'agent_test').write_binary(b'hello', ensure=True)

    result = mkp.find_files(str(tmpdir))

    assert result['agents'] == ['special/agent_test']
Пример #7
0
import mkp

NAME = "checkmk-telegram"
VERSION = '1.0.0'

info = {
    'author': 'Bruno Thienel',
    'description': 'A notifcation plugin for telegram.',
    'download_url': 'https://github.com/BrunoTh/checkmk-telegram',
    'files': mkp.find_files(''),
    'name': 'checkmk-telegram',
    'title': 'Telegram Notifications',
    'version': VERSION,
    'version.min_required': '2.0.0',
}

mkp.pack_to_file(info, '', '%s-%s.mkp' % (NAME, VERSION))