Quorum based listing for XL (#5475)

fixes #5380
This commit is contained in:
Krishna Srinivas
2018-02-01 10:47:49 -08:00
committed by kannappanr
parent b606ba3f81
commit 2afd196c83
3 changed files with 64 additions and 22 deletions

View File

@@ -312,14 +312,17 @@ func TestListDir(t *testing.T) {
if err != nil {
t.Error(err)
}
if len(entries) != 1 {
t.Fatal("Expected the number of entries to be 1")
if len(entries) != 2 {
t.Fatal("Expected the number of entries to be 2")
}
if entries[0] != file1 {
t.Fatal("Expected the entry to be file1")
}
if entries[1] != file2 {
t.Fatal("Expected the entry to be file2")
}
// Remove fsDir1 to test failover.
// Remove fsDir1, list should return entries from fsDir2
err = os.RemoveAll(fsDir1)
if err != nil {
t.Error(err)