removing discovery_test since it breaks on any host without en0

This commit is contained in:
Adam Frank 2018-05-09 20:05:01 +00:00
parent aa1136244d
commit b288401646
1 changed files with 0 additions and 37 deletions

View File

@ -1,37 +0,0 @@
package etcd_tools
import (
"fmt"
"testing"
"time"
)
func TestLocalIPs(t *testing.T) {
cli, err := NewLocalClient()
if err != nil {
t.Fatal(err)
}
defer cli.Close()
hosts, err := Discover(cli, "snafu")
if err != nil {
t.Fatal(err)
}
if len(hosts) != 0 {
fmt.Printf("Discover returned %v", hosts)
t.Fatal("Expected empty discovery")
}
d := NewDiscovery(cli, "snafu", s5)
err = d.Announce("en0", 8080, 5)
if err != nil {
t.Fatal(err)
}
time.Sleep(17 * time.Second)
hosts, err = Discover(cli, "snafu")
if err != nil {
t.Fatal(err)
}
fmt.Printf("Discover returned %v\n", hosts)
if len(hosts) != 1 {
t.Fatal("Expected 1 discovery result")
}
}