From 50f09c8e4da7ea07979d23c847f659bb84301ba5 Mon Sep 17 00:00:00 2001 From: Vincent Demeester Date: Sun, 27 Mar 2016 16:27:56 +0200 Subject: [PATCH] Move Suite definition to their respective file --- integration/consul_test.go | 7 +++++++ integration/etcd_test.go | 7 +++++++ integration/file_test.go | 9 +++++++++ integration/integration_test.go | 30 ------------------------------ integration/marathon_test.go | 7 +++++++ 5 files changed, 30 insertions(+), 30 deletions(-) diff --git a/integration/consul_test.go b/integration/consul_test.go index a59247adb..beb619f55 100644 --- a/integration/consul_test.go +++ b/integration/consul_test.go @@ -9,6 +9,13 @@ import ( check "gopkg.in/check.v1" ) +// Consul test suites (using libcompose) +type ConsulSuite struct{ BaseSuite } + +func (s *ConsulSuite) SetUpSuite(c *check.C) { + s.createComposeProject(c, "consul") +} + func (s *ConsulSuite) TestSimpleConfiguration(c *check.C) { cmd := exec.Command(traefikBinary, "--configFile=fixtures/consul/simple.toml") err := cmd.Start() diff --git a/integration/etcd_test.go b/integration/etcd_test.go index 8352cc511..6307bc233 100644 --- a/integration/etcd_test.go +++ b/integration/etcd_test.go @@ -9,6 +9,13 @@ import ( check "gopkg.in/check.v1" ) +// Etcd test suites (using libcompose) +type EtcdSuite struct{ BaseSuite } + +func (s *EtcdSuite) SetUpSuite(c *check.C) { + s.createComposeProject(c, "etcd") +} + func (s *EtcdSuite) TestSimpleConfiguration(c *check.C) { cmd := exec.Command(traefikBinary, "--configFile=fixtures/etcd/simple.toml") err := cmd.Start() diff --git a/integration/file_test.go b/integration/file_test.go index 8d32dae63..6eb937ac7 100644 --- a/integration/file_test.go +++ b/integration/file_test.go @@ -9,6 +9,15 @@ import ( check "gopkg.in/check.v1" ) +// File test suites +type FileSuite struct{ BaseSuite } + +func (s *FileSuite) SetUpSuite(c *check.C) { + s.createComposeProject(c, "file") + + s.composeProject.Start() +} + func (s *FileSuite) TestSimpleConfiguration(c *check.C) { cmd := exec.Command(traefikBinary, "--configFile=fixtures/file/simple.toml") err := cmd.Start() diff --git a/integration/integration_test.go b/integration/integration_test.go index f0c7580e1..20e50b4d9 100644 --- a/integration/integration_test.go +++ b/integration/integration_test.go @@ -35,36 +35,6 @@ func init() { var traefikBinary = "../dist/traefik" -// File test suites -type FileSuite struct{ BaseSuite } - -func (s *FileSuite) SetUpSuite(c *check.C) { - s.createComposeProject(c, "file") - - s.composeProject.Up() -} - -// Consul test suites (using libcompose) -type ConsulSuite struct{ BaseSuite } - -func (s *ConsulSuite) SetUpSuite(c *check.C) { - s.createComposeProject(c, "consul") -} - -// Etcd test suites (using libcompose) -type EtcdSuite struct{ BaseSuite } - -func (s *EtcdSuite) SetUpSuite(c *check.C) { - s.createComposeProject(c, "etcd") -} - -// Marathon test suites (using libcompose) -type MarathonSuite struct{ BaseSuite } - -func (s *MarathonSuite) SetUpSuite(c *check.C) { - s.createComposeProject(c, "marathon") -} - type BaseSuite struct { composeProject *project.Project listenChan chan project.Event diff --git a/integration/marathon_test.go b/integration/marathon_test.go index 40a42ffd6..82232696e 100644 --- a/integration/marathon_test.go +++ b/integration/marathon_test.go @@ -9,6 +9,13 @@ import ( check "gopkg.in/check.v1" ) +// Marathon test suites (using libcompose) +type MarathonSuite struct{ BaseSuite } + +func (s *MarathonSuite) SetUpSuite(c *check.C) { + s.createComposeProject(c, "marathon") +} + func (s *MarathonSuite) TestSimpleConfiguration(c *check.C) { cmd := exec.Command(traefikBinary, "--configFile=fixtures/marathon/simple.toml") err := cmd.Start()