mirror of
https://github.com/minio/minio.git
synced 2025-11-09 21:49:46 -05:00
fs: Enable returning ETag along with ListObjects() (#4042)
This is to comply with S3 behavior, we previously removed reading `fs.json` for optimization reasons but we have a reason to believe that providing ETag and using gjson provides needed benefit of not having to deal with unmarshalling overhead of golang stdlib. Fixes #4028
This commit is contained in:
@@ -18,7 +18,6 @@ package cmd
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"testing"
|
||||
)
|
||||
@@ -73,18 +72,6 @@ func TestReadFSMetadata(t *testing.T) {
|
||||
if _, err = fsMeta.ReadFrom(rlk.LockedFile); err != nil {
|
||||
t.Fatal("Unexpected error ", err)
|
||||
}
|
||||
|
||||
// Corrupted fs.json
|
||||
file, err := os.OpenFile(preparePath(fsPath), os.O_APPEND|os.O_WRONLY, 0666)
|
||||
if err != nil {
|
||||
t.Fatal("Unexpected error ", err)
|
||||
}
|
||||
file.Write([]byte{'a'})
|
||||
file.Close()
|
||||
fsMeta = fsMetaV1{}
|
||||
if _, err := fsMeta.ReadFrom(rlk.LockedFile); err == nil {
|
||||
t.Fatal("Should fail", err)
|
||||
}
|
||||
}
|
||||
|
||||
// TestWriteFSMetadata - tests of writeFSMetadata with healthy disk.
|
||||
|
||||
Reference in New Issue
Block a user