Ejemplo n.º 1
0
def test_listdir_agave(monkeypatch, agave):
    h = agavehelpers.AgaveHelper(agave)
    listing = h.listdir_agave_native('/sample/tacc-cloud/agavehelpers/upload',
                                     storage_system='data-sd2e-community',
                                     recurse=True,
                                     directories=True)
    assert '/sample/tacc-cloud/agavehelpers/upload/transcriptic/hello.txt' in listing
Ejemplo n.º 2
0
def test_listdir(monkeypatch, agave):
    monkeypatch.setenv('CATALOG_STORAGE_SYSTEM', 'virtual_filesystem')
    monkeypatch.setenv('CATALOG_ROOT_DIR',
                       os.path.join(PARENT, 'tests/virtual_filesystem'))
    monkeypatch.setenv('CATALOG_FILES_API_PAGESIZE', '50')
    h = agavehelpers.AgaveHelper(agave)
    listing = h.listdir('/sample/tacc-cloud/agavehelpers/upload',
                        recurse=True,
                        directories=True)
    assert '/sample/tacc-cloud/agavehelpers/upload/transcriptic/hello.txt' in listing
Ejemplo n.º 3
0
def test_listdir_posix(monkeypatch, agave):
    monkeypatch.setenv('CATALOG_STORAGE_SYSTEM', 'virtual_filesystem')
    monkeypatch.setenv('CATALOG_ROOT_DIR',
                       os.path.join(PARENT, 'tests/virtual_filesystem'))
    monkeypatch.setenv('CATALOG_FILES_API_PAGESIZE', '50')
    h = agavehelpers.AgaveHelper(agave)
    listing = h.listdir_agave_posix('/sample/tacc-cloud/agavehelpers/upload',
                                    recurse=True,
                                    storage_system='virtual_filesystem',
                                    directories=True)
    assert '/sample/tacc-cloud/agavehelpers/upload/biofab/abcd' in listing
Ejemplo n.º 4
0
def test_isdir(monkeypatch, agave):
    # monkeypatch.setenv('CATALOG_STORAGE_SYSTEM', 'virtual_filesystem')
    # monkeypatch.setenv('CATALOG_ROOT_DIR', os.path.join(
    #     PARENT, 'tests/virtual_filesystem'))
    # monkeypatch.setenv('CATALOG_FILES_API_PAGESIZE', 50)
    h = agavehelpers.AgaveHelper(agave)
    t_isdir = h.isdir('/sample/tacc-cloud/agavehelpers/upload/transcriptic/')
    assert t_isdir is True
    t_isdir = h.isdir(
        '/sample/tacc-cloud/agavehelpers/upload/transcriptic/hello.txt')
    assert t_isdir is False
Ejemplo n.º 5
0
def test_mapping_other_systems(agave, filename, system, mapped_path):
    h = agavehelpers.AgaveHelper(agave)
    pp = h.mapped_posix_path(filename, storage_system=system)
    assert pp == mapped_path
Ejemplo n.º 6
0
def test_mapped_posix_path(agave, filename, system):
    h = agavehelpers.AgaveHelper(agave)
    target = '/work/projects/SD2E-Community/prod/data/sample/tacc-cloud/123.txt'
    pp = h.mapped_posix_path(filename, storage_system=system)
    assert pp == target