mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-09-19 01:17:56 +08:00
directory structure change to work with glide
glide has its own requirements. My previous workaround caused me some code checkin errors. Need to fix this.
This commit is contained in:
23
weed/storage/volume_info_test.go
Normal file
23
weed/storage/volume_info_test.go
Normal file
@@ -0,0 +1,23 @@
|
||||
package storage
|
||||
|
||||
import "testing"
|
||||
|
||||
func TestSortVolumeInfos(t *testing.T) {
|
||||
vis := []*VolumeInfo{
|
||||
&VolumeInfo{
|
||||
Id: 2,
|
||||
},
|
||||
&VolumeInfo{
|
||||
Id: 1,
|
||||
},
|
||||
&VolumeInfo{
|
||||
Id: 3,
|
||||
},
|
||||
}
|
||||
sortVolumeInfos(vis)
|
||||
for i := 0; i < len(vis); i++ {
|
||||
if vis[i].Id != VolumeId(i+1) {
|
||||
t.Fatal()
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user