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:
parent
408ef0f5b7
commit
d68389dc52
2 changed files with 28 additions and 0 deletions
|
@ -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",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue