Esempio n. 1
0
def dir_cfg():
    return configuration.Directories(
        log="/plots/log",
        tmp=["/var/tmp", "/tmp"],
        dst=["/mnt/dst/00", "/mnt/dst/01", "/mnt/dst/03"],
        tmp_overrides={"/mnt/tmp/04": configuration.TmpOverrides(tmpdir_max_jobs=4)}
    )
Esempio n. 2
0
def test_dst_is_tmp():
    tmp = ['/tmp']
    directories = configuration.Directories(tmp=tmp)

    assert directories.dst_is_tmp()
Esempio n. 3
0
def test_dst_is_dst():
    tmp = ['/tmp']
    dst = ['/dst0', '/dst1']
    directories = configuration.Directories(tmp=tmp, dst=dst)

    assert not directories.dst_is_tmp()
Esempio n. 4
0
def test_get_dst_directories_gets_tmp():
    tmp = ['/tmp']
    directories = configuration.Directories(tmp=tmp)

    assert directories.get_dst_directories() == tmp
Esempio n. 5
0
def test_get_dst_directories_gets_dst():
    tmp = ['/tmp']
    dst = ['/dst0', '/dst1']
    directories = configuration.Directories(tmp=tmp, dst=dst)

    assert directories.get_dst_directories() == dst
Esempio n. 6
0
def dir_cfg() -> configuration.Directories:
    return configuration.Directories(
        tmp=["/var/tmp", "/tmp"],
        dst=["/mnt/dst/00", "/mnt/dst/01", "/mnt/dst/03"])