Move to URL based syntax formatting. (#3092)

For command line arguments we are currently following

- <node-1>:/path ... <node-n>:/path

This patch changes this to

- http://<node-1>/path ... http://<node-n>/path
This commit is contained in:
Harshavardhana
2016-10-27 03:30:52 -07:00
committed by GitHub
parent 30dc11a931
commit 9e2d0ac50b
36 changed files with 560 additions and 474 deletions

View File

@@ -17,6 +17,7 @@
package cmd
import (
"net/url"
"reflect"
"testing"
)
@@ -24,16 +25,14 @@ import (
// Validates getAllPeers, fetches all peers based on list of storage endpoints.
func TestGetAllPeers(t *testing.T) {
testCases := []struct {
eps []storageEndPoint
eps []*url.URL
peers []string
}{
{nil, nil},
{[]storageEndPoint{{path: "/mnt/disk1"}}, []string{globalMinioAddr}},
{[]storageEndPoint{{
host: "localhost",
port: 9001,
}}, []string{
globalMinioAddr, "localhost:9001",
{[]*url.URL{nil}, nil},
{[]*url.URL{{Path: "/mnt/disk1"}}, []string{globalMinioAddr, ""}},
{[]*url.URL{{Host: "localhost:9001"}}, []string{globalMinioAddr,
"localhost:9001",
}},
}