issue 43 "go fmt" chagnes from "Ryan S. Brown" <sb@ryansb.com>
some basic changes to parse upload url
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
package topology
|
||||
|
||||
import (
|
||||
"code.google.com/p/weed-fs/go/storage"
|
||||
"code.google.com/p/weed-fs/go/glog"
|
||||
"code.google.com/p/weed-fs/go/storage"
|
||||
)
|
||||
|
||||
type NodeId string
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package topology
|
||||
|
||||
import (
|
||||
"code.google.com/p/weed-fs/go/storage"
|
||||
"code.google.com/p/weed-fs/go/glog"
|
||||
"code.google.com/p/weed-fs/go/storage"
|
||||
"math/rand"
|
||||
)
|
||||
|
||||
|
||||
@@ -25,21 +25,21 @@ func TestXYZ(t *testing.T) {
|
||||
t.Error("need to randomly pick 1 node")
|
||||
}
|
||||
|
||||
picked, ret = nl.RandomlyPickN(1, 0, "dc1")
|
||||
if !ret || len(picked) != 1 {
|
||||
t.Error("need to randomly pick 1 node")
|
||||
}
|
||||
if picked[0].Id() != "dc1" {
|
||||
t.Error("need to randomly pick 1 dc1 node")
|
||||
}
|
||||
picked, ret = nl.RandomlyPickN(1, 0, "dc1")
|
||||
if !ret || len(picked) != 1 {
|
||||
t.Error("need to randomly pick 1 node")
|
||||
}
|
||||
if picked[0].Id() != "dc1" {
|
||||
t.Error("need to randomly pick 1 dc1 node")
|
||||
}
|
||||
|
||||
picked, ret = nl.RandomlyPickN(2, 0, "dc1")
|
||||
if !ret || len(picked) != 2 {
|
||||
t.Error("need to randomly pick 1 node")
|
||||
}
|
||||
if picked[0].Id() != "dc1" {
|
||||
t.Error("need to randomly pick 2 with one dc1 node")
|
||||
}
|
||||
picked, ret = nl.RandomlyPickN(2, 0, "dc1")
|
||||
if !ret || len(picked) != 2 {
|
||||
t.Error("need to randomly pick 1 node")
|
||||
}
|
||||
if picked[0].Id() != "dc1" {
|
||||
t.Error("need to randomly pick 2 with one dc1 node")
|
||||
}
|
||||
|
||||
picked, ret = nl.RandomlyPickN(4, 0, "")
|
||||
if !ret || len(picked) != 4 {
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
package topology
|
||||
|
||||
import (
|
||||
"code.google.com/p/weed-fs/go/glog"
|
||||
"code.google.com/p/weed-fs/go/sequence"
|
||||
"code.google.com/p/weed-fs/go/storage"
|
||||
"errors"
|
||||
"io/ioutil"
|
||||
"code.google.com/p/weed-fs/go/glog"
|
||||
"math/rand"
|
||||
)
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
package topology
|
||||
|
||||
import (
|
||||
"code.google.com/p/weed-fs/go/glog"
|
||||
"code.google.com/p/weed-fs/go/storage"
|
||||
"code.google.com/p/weed-fs/go/util"
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"code.google.com/p/weed-fs/go/glog"
|
||||
"net/url"
|
||||
"time"
|
||||
)
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package topology
|
||||
|
||||
import (
|
||||
"code.google.com/p/weed-fs/go/storage"
|
||||
"code.google.com/p/weed-fs/go/glog"
|
||||
"code.google.com/p/weed-fs/go/storage"
|
||||
"math/rand"
|
||||
"time"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user