mirror of
https://github.com/containous/traefik.git
synced 2024-12-22 13:34:03 +03:00
Move Suite definition to their respective file
This commit is contained in:
parent
bb1ecdd3c9
commit
50f09c8e4d
@ -9,6 +9,13 @@ import (
|
|||||||
check "gopkg.in/check.v1"
|
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) {
|
func (s *ConsulSuite) TestSimpleConfiguration(c *check.C) {
|
||||||
cmd := exec.Command(traefikBinary, "--configFile=fixtures/consul/simple.toml")
|
cmd := exec.Command(traefikBinary, "--configFile=fixtures/consul/simple.toml")
|
||||||
err := cmd.Start()
|
err := cmd.Start()
|
||||||
|
@ -9,6 +9,13 @@ import (
|
|||||||
check "gopkg.in/check.v1"
|
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) {
|
func (s *EtcdSuite) TestSimpleConfiguration(c *check.C) {
|
||||||
cmd := exec.Command(traefikBinary, "--configFile=fixtures/etcd/simple.toml")
|
cmd := exec.Command(traefikBinary, "--configFile=fixtures/etcd/simple.toml")
|
||||||
err := cmd.Start()
|
err := cmd.Start()
|
||||||
|
@ -9,6 +9,15 @@ import (
|
|||||||
check "gopkg.in/check.v1"
|
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) {
|
func (s *FileSuite) TestSimpleConfiguration(c *check.C) {
|
||||||
cmd := exec.Command(traefikBinary, "--configFile=fixtures/file/simple.toml")
|
cmd := exec.Command(traefikBinary, "--configFile=fixtures/file/simple.toml")
|
||||||
err := cmd.Start()
|
err := cmd.Start()
|
||||||
|
@ -35,36 +35,6 @@ func init() {
|
|||||||
|
|
||||||
var traefikBinary = "../dist/traefik"
|
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 {
|
type BaseSuite struct {
|
||||||
composeProject *project.Project
|
composeProject *project.Project
|
||||||
listenChan chan project.Event
|
listenChan chan project.Event
|
||||||
|
@ -9,6 +9,13 @@ import (
|
|||||||
check "gopkg.in/check.v1"
|
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) {
|
func (s *MarathonSuite) TestSimpleConfiguration(c *check.C) {
|
||||||
cmd := exec.Command(traefikBinary, "--configFile=fixtures/marathon/simple.toml")
|
cmd := exec.Command(traefikBinary, "--configFile=fixtures/marathon/simple.toml")
|
||||||
err := cmd.Start()
|
err := cmd.Start()
|
||||||
|
Loading…
Reference in New Issue
Block a user