diff --git a/integration/consul_test.go b/integration/consul_test.go index d456acbc8..4da3ff271 100644 --- a/integration/consul_test.go +++ b/integration/consul_test.go @@ -63,12 +63,6 @@ func (s *ConsulSuite) TestSimpleConfiguration(c *check.C) { file := s.adaptFile(c, "fixtures/consul/simple.toml", struct{ ConsulAddress string }{address}) defer os.Remove(file) - cmd, display := s.traefikCmd(withConfigFile(file)) - defer display(c) - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer cmd.Process.Kill() - data := map[string]string{ "traefik/http/routers/Router0/entryPoints/0": "web", "traefik/http/routers/Router0/middlewares/0": "compressor", @@ -120,8 +114,16 @@ func (s *ConsulSuite) TestSimpleConfiguration(c *check.C) { c.Assert(err, checker.IsNil) } + cmd, display := s.traefikCmd(withConfigFile(file)) + defer display(c) + err := cmd.Start() + c.Assert(err, checker.IsNil) + defer cmd.Process.Kill() + // wait for traefik - err = try.GetRequest("http://127.0.0.1:8080/api/rawdata", time.Second, try.BodyContains("@consul")) + err = try.GetRequest("http://127.0.0.1:8080/api/rawdata", 2*time.Second, + try.BodyContains(`"striper@consul":`, `"compressor@consul":`, `"srvcA@consul":`, `"srvcB@consul":`), + ) c.Assert(err, checker.IsNil) resp, err := http.Get("http://127.0.0.1:8080/api/rawdata") diff --git a/integration/etcd_test.go b/integration/etcd_test.go index 2cafd949a..79c6a663f 100644 --- a/integration/etcd_test.go +++ b/integration/etcd_test.go @@ -63,12 +63,6 @@ func (s *EtcdSuite) TestSimpleConfiguration(c *check.C) { file := s.adaptFile(c, "fixtures/etcd/simple.toml", struct{ EtcdAddress string }{address}) defer os.Remove(file) - cmd, display := s.traefikCmd(withConfigFile(file)) - defer display(c) - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer cmd.Process.Kill() - data := map[string]string{ "traefik/http/routers/Router0/entryPoints/0": "web", "traefik/http/routers/Router0/middlewares/0": "compressor", @@ -120,8 +114,16 @@ func (s *EtcdSuite) TestSimpleConfiguration(c *check.C) { c.Assert(err, checker.IsNil) } + cmd, display := s.traefikCmd(withConfigFile(file)) + defer display(c) + err := cmd.Start() + c.Assert(err, checker.IsNil) + defer cmd.Process.Kill() + // wait for traefik - err = try.GetRequest("http://127.0.0.1:8080/api/rawdata", time.Second, try.BodyContains("@etcd")) + err = try.GetRequest("http://127.0.0.1:8080/api/rawdata", 2*time.Second, + try.BodyContains(`"striper@etcd":`, `"compressor@etcd":`, `"srvcA@etcd":`, `"srvcB@etcd":`), + ) c.Assert(err, checker.IsNil) resp, err := http.Get("http://127.0.0.1:8080/api/rawdata") diff --git a/integration/redis_test.go b/integration/redis_test.go index 7c9e6044b..6c2f4bcfa 100644 --- a/integration/redis_test.go +++ b/integration/redis_test.go @@ -63,12 +63,6 @@ func (s *RedisSuite) TestSimpleConfiguration(c *check.C) { file := s.adaptFile(c, "fixtures/redis/simple.toml", struct{ RedisAddress string }{address}) defer os.Remove(file) - cmd, display := s.traefikCmd(withConfigFile(file)) - defer display(c) - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer cmd.Process.Kill() - data := map[string]string{ "traefik/http/routers/Router0/entryPoints/0": "web", "traefik/http/routers/Router0/middlewares/0": "compressor", @@ -120,8 +114,16 @@ func (s *RedisSuite) TestSimpleConfiguration(c *check.C) { c.Assert(err, checker.IsNil) } + cmd, display := s.traefikCmd(withConfigFile(file)) + defer display(c) + err := cmd.Start() + c.Assert(err, checker.IsNil) + defer cmd.Process.Kill() + // wait for traefik - err = try.GetRequest("http://127.0.0.1:8080/api/rawdata", time.Second, try.BodyContains("@redis")) + err = try.GetRequest("http://127.0.0.1:8080/api/rawdata", 2*time.Second, + try.BodyContains(`"striper@redis":`, `"compressor@redis":`, `"srvcA@redis":`, `"srvcB@redis":`), + ) c.Assert(err, checker.IsNil) resp, err := http.Get("http://127.0.0.1:8080/api/rawdata") diff --git a/integration/zk_test.go b/integration/zk_test.go index a9544b22d..422ad1d80 100644 --- a/integration/zk_test.go +++ b/integration/zk_test.go @@ -121,7 +121,9 @@ func (s *ZookeeperSuite) TestSimpleConfiguration(c *check.C) { defer cmd.Process.Kill() // wait for traefik - err = try.GetRequest("http://127.0.0.1:8080/api/rawdata", time.Second, try.BodyContains("@zookeeper")) + err = try.GetRequest("http://127.0.0.1:8080/api/rawdata", 2*time.Second, + try.BodyContains(`"striper@zookeeper":`, `"compressor@zookeeper":`, `"srvcA@zookeeper":`, `"srvcB@zookeeper":`), + ) c.Assert(err, checker.IsNil) resp, err := http.Get("http://127.0.0.1:8080/api/rawdata")