Esempio n. 1
0
def test_get_filesystem_s3(shutdown_only):
    root = "bucket/foo/bar"
    with simulate_storage("s3", root) as s3_uri:
        ray.init(storage=s3_uri)
        fs, prefix = storage.get_filesystem()
        assert path_eq(prefix, root), prefix
        assert isinstance(fs, pyarrow.fs.S3FileSystem), fs
Esempio n. 2
0
 def check():
     storage.get_filesystem()  # Crash since the valid file is deleted.
Esempio n. 3
0
 def check():
     fs, prefix = storage.get_filesystem()
     assert fs is not None
     return "ok"
Esempio n. 4
0
def test_get_custom_filesystem(shutdown_only, tmp_path):
    ray.init(storage=os.path.join("custom://ray.test.test_storage_custom_fs",
                                  str(tmp_path)))
    fs, prefix = storage.get_filesystem()
    assert path_eq(prefix, tmp_path), prefix
    assert isinstance(fs, pyarrow.fs.LocalFileSystem), fs
Esempio n. 5
0
def test_get_filesystem_local(shutdown_only, tmp_path):
    path = os.path.join(str(tmp_path), "foo/bar")
    ray.init(storage=path)
    fs, prefix = storage.get_filesystem()
    assert path_eq(path, prefix), (path, prefix)
    assert isinstance(fs, pyarrow.fs.LocalFileSystem), fs