コード例 #1
0
def test_state_files(tmpdir):
    efs_config = 'fs-deadbeef.mount.dir.12345'
    tmpdir.join(efs_config).write('')

    stunnel_config = 'stunnel-config.fs-deadbeef.mount.dir.12345'
    tmpdir.join(stunnel_config).write('')

    state_files = watchdog.get_state_files(str(tmpdir))

    assert 1 == len(state_files)
    assert 'mount.dir.12345' in state_files
コード例 #2
0
ファイル: test_get_state_files.py プロジェクト: aws/efs-utils
def test_state_files(tmpdir):
    efs_config = "fs-deadbeef.mount.dir.12345"
    tmpdir.join(efs_config).write("")

    stunnel_config = "stunnel-config.fs-deadbeef.mount.dir.12345"
    tmpdir.join(stunnel_config).write("")

    state_files = watchdog.get_state_files(str(tmpdir))

    assert 1 == len(state_files)
    assert "mount.dir.12345" in state_files
コード例 #3
0
def test_no_state_files(tmpdir):
    tmpdir.join('~fs-deadbeef.mount.dir.12345').write('')

    state_files = watchdog.get_state_files(str(tmpdir))

    assert {} == state_files
コード例 #4
0
def test_empty_dir(tmpdir):
    state_files = watchdog.get_state_files(str(tmpdir))

    assert {} == state_files
コード例 #5
0
def test_non_existent_dir(tmpdir):
    state_files = watchdog.get_state_files(str(tmpdir.join('new-dir')))

    assert {} == state_files