SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.
Go blob-storagecloud-drivedistributed-file-systemdistributed-storageerasure-codingfusehadoop-hdfshdfskuberneteslancelancedbobject-storageposixs3s3-storageseaweedfstiered-file-systemvector-search
package mount
import (
"testing"
"github.com/seaweedfs/go-fuse/v2/fuse"
"github.com/seaweedfs/seaweedfs/weed/pb/filer_pb"
)
func TestLseekReturnsENXIOWhenNoDataFollowsOffset(t *testing.T) {
wfs, fh := newOpenFileHandle(t, 1000)
fh.SetEntry(&filer_pb.Entry{
Name: "file.txt",
Attributes: &filer_pb.FuseAttributes{
FileMode: 0100644,
FileSize: 1000,
Inode: fh.inode,
},
Chunks: []*filer_pb.FileChunk{
{FileId: "data", Offset: 0, Size: 100},
},
})
in := &fuse.LseekIn{
Fh: uint64(fh.fh),
Offset: 100,
Whence: SEEK_DATA,
}
var out fuse.LseekOut
if status := wfs.Lseek(nil, in, &out); status != ENXIO {
t.Fatalf("Lseek(SEEK_DATA) status = %v, want ENXIO", status)
}
}