Minor changes
This commit is contained in:
parent
bb14ec70bd
commit
17ad5153b8
38 changed files with 93 additions and 182 deletions
|
@ -28,7 +28,7 @@ func (s *SimpleSuite) TestInvalidConfigShouldFail(c *check.C) {
|
|||
actual := output.String()
|
||||
|
||||
if !strings.Contains(actual, expected) {
|
||||
return fmt.Errorf("Got %s, wanted %s", actual, expected)
|
||||
return fmt.Errorf("got %s, wanted %s", actual, expected)
|
||||
}
|
||||
|
||||
return nil
|
||||
|
@ -72,7 +72,7 @@ func (s *SimpleSuite) TestDefaultEntryPoints(c *check.C) {
|
|||
actual := output.String()
|
||||
|
||||
if !strings.Contains(actual, expected) {
|
||||
return fmt.Errorf("Got %s, wanted %s", actual, expected)
|
||||
return fmt.Errorf("got %s, wanted %s", actual, expected)
|
||||
}
|
||||
|
||||
return nil
|
||||
|
@ -93,10 +93,10 @@ func (s *SimpleSuite) TestPrintHelp(c *check.C) {
|
|||
actual := output.String()
|
||||
|
||||
if strings.Contains(actual, notExpected) {
|
||||
return fmt.Errorf("Got %s", actual)
|
||||
return fmt.Errorf("got %s", actual)
|
||||
}
|
||||
if !strings.Contains(actual, expected) {
|
||||
return fmt.Errorf("Got %s, wanted %s", actual, expected)
|
||||
return fmt.Errorf("got %s, wanted %s", actual, expected)
|
||||
}
|
||||
|
||||
return nil
|
||||
|
|
|
@ -501,7 +501,7 @@ func (s *ConsulCatalogSuite) TestRefreshConfigPortChange(c *check.C) {
|
|||
}
|
||||
|
||||
func (s *ConsulCatalogSuite) TestRetryWithConsulServer(c *check.C) {
|
||||
//Scale consul to 0 to be able to start traefik before and test retry
|
||||
// Scale consul to 0 to be able to start traefik before and test retry
|
||||
s.composeProject.Scale(c, "consul", 0)
|
||||
|
||||
cmd, display := s.traefikCmd(
|
||||
|
@ -547,7 +547,7 @@ func (s *ConsulCatalogSuite) TestRetryWithConsulServer(c *check.C) {
|
|||
}
|
||||
|
||||
func (s *ConsulCatalogSuite) TestServiceWithMultipleHealthCheck(c *check.C) {
|
||||
//Scale consul to 0 to be able to start traefik before and test retry
|
||||
// Scale consul to 0 to be able to start traefik before and test retry
|
||||
s.composeProject.Scale(c, "consul", 0)
|
||||
|
||||
cmd, display := s.traefikCmd(
|
||||
|
|
|
@ -282,7 +282,7 @@ func (s *ConsulSuite) TestGlobalConfiguration(c *check.C) {
|
|||
err = try.GetRequest("http://127.0.0.1:8080/api/providers", 60*time.Second, try.BodyContains("Path:/test"))
|
||||
c.Assert(err, checker.IsNil)
|
||||
|
||||
//check
|
||||
// check
|
||||
req, err := http.NewRequest(http.MethodGet, "http://127.0.0.1:8001/", nil)
|
||||
c.Assert(err, checker.IsNil)
|
||||
req.Host = "test.localhost"
|
||||
|
@ -469,7 +469,7 @@ func datastoreContains(datastore *cluster.Datastore, expectedValue string) func(
|
|||
return func() error {
|
||||
kvStruct := datastore.Get().(*TestStruct)
|
||||
if kvStruct.String != expectedValue {
|
||||
return fmt.Errorf("Got %s, wanted %s", kvStruct.String, expectedValue)
|
||||
return fmt.Errorf("got %s, wanted %s", kvStruct.String, expectedValue)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
|
|
@ -41,7 +41,7 @@ func (s *DockerComposeSuite) TestComposeScale(c *check.C) {
|
|||
|
||||
s.composeProject.Scale(c, composeService, serviceCount)
|
||||
|
||||
file := s.adaptFileForHost(c, "fixtures/docker/simple.toml")
|
||||
file := s.adaptFileForHost(c, "fixtures/docker/minimal.toml")
|
||||
defer os.Remove(file)
|
||||
|
||||
cmd, display := s.traefikCmd(withConfigFile(file))
|
||||
|
|
|
@ -49,7 +49,7 @@ func (s *ErrorPagesSuite) TestSimpleConfiguration(c *check.C) {
|
|||
|
||||
func (s *ErrorPagesSuite) TestErrorPage(c *check.C) {
|
||||
|
||||
//error.toml contains a mis-configuration of the backend host
|
||||
// error.toml contains a mis-configuration of the backend host
|
||||
file := s.adaptFile(c, "fixtures/error_pages/error.toml", struct {
|
||||
Server1 string
|
||||
Server2 string
|
||||
|
|
|
@ -280,7 +280,7 @@ func (s *Etcd3Suite) TestGlobalConfiguration(c *check.C) {
|
|||
err = try.GetRequest("http://127.0.0.1:8080/api/providers", 60*time.Second, try.BodyContains("Path:/test"))
|
||||
c.Assert(err, checker.IsNil)
|
||||
|
||||
//check
|
||||
// check
|
||||
req, err := http.NewRequest(http.MethodGet, "http://127.0.0.1:8001/", nil)
|
||||
c.Assert(err, checker.IsNil)
|
||||
req.Host = "test.localhost"
|
||||
|
@ -298,7 +298,7 @@ func (s *Etcd3Suite) TestCertificatesContentWithSNIConfigHandshake(c *check.C) {
|
|||
"--etcd.useAPIV3=true")
|
||||
defer display(c)
|
||||
|
||||
//Copy the contents of the certificate files into ETCD
|
||||
// Copy the contents of the certificate files into ETCD
|
||||
snitestComCert, err := ioutil.ReadFile("fixtures/https/snitest.com.cert")
|
||||
c.Assert(err, checker.IsNil)
|
||||
snitestComKey, err := ioutil.ReadFile("fixtures/https/snitest.com.key")
|
||||
|
@ -376,7 +376,7 @@ func (s *Etcd3Suite) TestCertificatesContentWithSNIConfigHandshake(c *check.C) {
|
|||
err = try.GetRequest("http://127.0.0.1:8080/api/providers", 60*time.Second, try.BodyContains("Host:snitest.org"))
|
||||
c.Assert(err, checker.IsNil)
|
||||
|
||||
//check
|
||||
// check
|
||||
tlsConfig := &tls.Config{
|
||||
InsecureSkipVerify: true,
|
||||
ServerName: "snitest.com",
|
||||
|
@ -406,7 +406,7 @@ func (s *Etcd3Suite) TestCommandStoreConfig(c *check.C) {
|
|||
// wait for traefik finish without error
|
||||
cmd.Wait()
|
||||
|
||||
//CHECK
|
||||
// CHECK
|
||||
checkmap := map[string]string{
|
||||
"/traefik/loglevel": "DEBUG",
|
||||
"/traefik/defaultentrypoints/0": "http",
|
||||
|
|
14
integration/fixtures/docker/minimal.toml
Normal file
14
integration/fixtures/docker/minimal.toml
Normal file
|
@ -0,0 +1,14 @@
|
|||
defaultEntryPoints = ["http"]
|
||||
|
||||
logLevel = "DEBUG"
|
||||
|
||||
[entryPoints]
|
||||
[entryPoints.http]
|
||||
address = ":8000"
|
||||
|
||||
[api]
|
||||
|
||||
[docker]
|
||||
endpoint = "{{.DockerHost}}"
|
||||
domain = "docker.localhost"
|
||||
exposedByDefault = false
|
|
@ -9,9 +9,6 @@ logLevel = "DEBUG"
|
|||
[api]
|
||||
|
||||
[docker]
|
||||
|
||||
# It's dynamagic !
|
||||
endpoint = "{{.DockerHost}}"
|
||||
|
||||
domain = "docker.localhost"
|
||||
exposedByDefault = true
|
||||
|
|
|
@ -194,7 +194,7 @@ func (s *HealthCheckSuite) TestPortOverload(c *check.C) {
|
|||
c.Assert(err, checker.IsNil)
|
||||
frontendHealthReq.Host = "test.localhost"
|
||||
|
||||
//We test bad gateway because we use an invalid port for the backend
|
||||
// We test bad gateway because we use an invalid port for the backend
|
||||
err = try.Request(frontendHealthReq, 500*time.Millisecond, try.StatusCodeIs(http.StatusBadGateway))
|
||||
c.Assert(err, checker.IsNil)
|
||||
|
||||
|
|
|
@ -123,7 +123,7 @@ func (s *LogRotationSuite) TestTraefikLogRotation(c *check.C) {
|
|||
// If more log entries are output on startup
|
||||
c.Assert(lineCount, checker.GreaterOrEqualThan, 5)
|
||||
|
||||
//Verify traefik.log output as expected
|
||||
// Verify traefik.log output as expected
|
||||
lineCount = verifyLogLines(c, traefikTestLogFile, lineCount, false)
|
||||
c.Assert(lineCount, checker.GreaterOrEqualThan, 7)
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ import (
|
|||
|
||||
"github.com/containous/traefik/integration/try"
|
||||
"github.com/containous/traefik/provider/label"
|
||||
marathon "github.com/gambol99/go-marathon"
|
||||
"github.com/gambol99/go-marathon"
|
||||
"github.com/go-check/check"
|
||||
checker "github.com/vdemeester/shakers"
|
||||
)
|
||||
|
|
|
@ -2,3 +2,4 @@ whoami1:
|
|||
image: emilevauge/whoami
|
||||
labels:
|
||||
- traefik.frontend.rule=PathPrefix:/whoami
|
||||
- traefik.enable=true
|
|
@ -82,7 +82,7 @@ func HasBody() ResponseCondition {
|
|||
}
|
||||
|
||||
if len(body) == 0 {
|
||||
return errors.New("Response doesn't have body content")
|
||||
return errors.New("response doesn't have body content")
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
|
|
@ -279,7 +279,7 @@ func (s *WebsocketSuite) TestSSLTermination(c *check.C) {
|
|||
err = try.GetRequest("http://127.0.0.1:8080/api/providers", 10*time.Second, try.BodyContains("127.0.0.1"))
|
||||
c.Assert(err, checker.IsNil)
|
||||
|
||||
//Add client self-signed cert
|
||||
// Add client self-signed cert
|
||||
roots := x509.NewCertPool()
|
||||
certContent, err := ioutil.ReadFile("./resources/tls/local.cert")
|
||||
c.Assert(err, checker.IsNil)
|
||||
|
@ -487,7 +487,7 @@ func (s *WebsocketSuite) TestSSLhttp2(c *check.C) {
|
|||
err = try.GetRequest("http://127.0.0.1:8080/api/providers", 10*time.Second, try.BodyContains("127.0.0.1"))
|
||||
c.Assert(err, checker.IsNil)
|
||||
|
||||
//Add client self-signed cert
|
||||
// Add client self-signed cert
|
||||
roots := x509.NewCertPool()
|
||||
certContent, err := ioutil.ReadFile("./resources/tls/local.cert")
|
||||
c.Assert(err, checker.IsNil)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue