1
0
mirror of https://github.com/containous/traefik.git synced 2025-10-14 15:33:19 +03:00

Add support for docker healthcheck

- React to health_status events
- Filter container that have a health status *and* that are not healthy

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
This commit is contained in:
Vincent Demeester
2016-10-03 11:01:37 +02:00
parent 408ef0f5b7
commit d68389dc52
2 changed files with 28 additions and 0 deletions

View File

@@ -569,12 +569,18 @@ func TestDockerGetLabel(t *testing.T) {
}{
{
container: docker.ContainerJSON{
ContainerJSONBase: &docker.ContainerJSONBase{
Name: "foo",
},
Config: &container.Config{},
},
expected: "Label not found:",
},
{
container: docker.ContainerJSON{
ContainerJSONBase: &docker.ContainerJSONBase{
Name: "foo",
},
Config: &container.Config{
Labels: map[string]string{
"foo": "bar",
@@ -608,6 +614,9 @@ func TestDockerGetLabels(t *testing.T) {
}{
{
container: docker.ContainerJSON{
ContainerJSONBase: &docker.ContainerJSONBase{
Name: "foo",
},
Config: &container.Config{},
},
expectedLabels: map[string]string{},
@@ -615,6 +624,9 @@ func TestDockerGetLabels(t *testing.T) {
},
{
container: docker.ContainerJSON{
ContainerJSONBase: &docker.ContainerJSONBase{
Name: "foo",
},
Config: &container.Config{
Labels: map[string]string{
"foo": "fooz",
@@ -628,6 +640,9 @@ func TestDockerGetLabels(t *testing.T) {
},
{
container: docker.ContainerJSON{
ContainerJSONBase: &docker.ContainerJSONBase{
Name: "foo",
},
Config: &container.Config{
Labels: map[string]string{
"foo": "fooz",