|
@ -1,7 +1,10 @@ |
|
|
package storage |
|
|
package storage |
|
|
|
|
|
|
|
|
import ( |
|
|
import ( |
|
|
|
|
|
"io/ioutil" |
|
|
"testing" |
|
|
"testing" |
|
|
|
|
|
|
|
|
|
|
|
"github.com/chrislusf/seaweedfs/weed/glog" |
|
|
) |
|
|
) |
|
|
|
|
|
|
|
|
func TestLoadingEcShards(t *testing.T) { |
|
|
func TestLoadingEcShards(t *testing.T) { |
|
@ -14,4 +17,15 @@ func TestLoadingEcShards(t *testing.T) { |
|
|
if len(dl.ecVolumes) != 1 { |
|
|
if len(dl.ecVolumes) != 1 { |
|
|
t.Errorf("loading err") |
|
|
t.Errorf("loading err") |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
fileInfos, err := ioutil.ReadDir(dl.Directory) |
|
|
|
|
|
if err != nil { |
|
|
|
|
|
t.Errorf("listing all ec shards in dir %s: %v", dl.Directory, err) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
glog.V(0).Infof("FileCount %d", len(fileInfos)) |
|
|
|
|
|
for i, fileInfo := range fileInfos { |
|
|
|
|
|
glog.V(0).Infof("file:%d %s size:%d", i, fileInfo.Name(), fileInfo.Size()) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |