Add v2 unit tests.

This commit is contained in:
Ben Johnson
2013-10-17 18:11:11 -06:00
parent 088a01f19c
commit dcef04b796
30 changed files with 2745 additions and 54 deletions

View File

@ -2,9 +2,9 @@ package etcd
import (
"fmt"
"net"
"net/url"
"testing"
"net/url"
"net"
)
// To pass this test, we need to create a cluster of 3 machines
@ -19,7 +19,7 @@ func TestSync(t *testing.T) {
t.Fatal("cannot sync machines")
}
for _, m := range c.GetCluster() {
for _, m := range(c.GetCluster()) {
u, err := url.Parse(m)
if err != nil {
t.Fatal(err)
@ -27,7 +27,7 @@ func TestSync(t *testing.T) {
if u.Scheme != "http" {
t.Fatal("scheme must be http")
}
host, _, err := net.SplitHostPort(u.Host)
if err != nil {
t.Fatal(err)

View File

@ -1,3 +1,4 @@
package main
import (