Skip to content

Commit

Permalink
integration: test domain name URLs are rejected before binding
Browse files Browse the repository at this point in the history
  • Loading branch information
Anthony Romano committed Jan 26, 2017
1 parent 54cf031 commit 6357256
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions integration/embed_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ func TestEmbedEtcd(t *testing.T) {
{wpeers: 1, wclients: 1},
{wpeers: 2, wclients: 1},
{wpeers: 1, wclients: 2},
{werr: "expected IP"},
{werr: "expected IP"},
}

urls := newEmbedURLs(10)
Expand All @@ -58,6 +60,10 @@ func TestEmbedEtcd(t *testing.T) {
setupEmbedCfg(&tests[5].cfg, []url.URL{urls[4]}, []url.URL{urls[5], urls[6]})
setupEmbedCfg(&tests[6].cfg, []url.URL{urls[7], urls[8]}, []url.URL{urls[9]})

dnsURL, _ := url.Parse("http://whatever.test:12345")
tests[7].cfg.LCUrls = []url.URL{*dnsURL}
tests[8].cfg.LPUrls = []url.URL{*dnsURL}

dir := path.Join(os.TempDir(), fmt.Sprintf("embed-etcd"))
os.RemoveAll(dir)
defer os.RemoveAll(dir)
Expand Down

0 comments on commit 6357256

Please sign in to comment.