docker: changed OOM killed error message

This commit is contained in:
Jonathan Ballet 2017-10-27 20:30:52 +02:00
parent 12615bde9c
commit 5429d1c656
2 changed files with 2 additions and 2 deletions

View File

@ -1613,7 +1613,7 @@ func (h *DockerHandle) run() {
if ierr != nil {
h.logger.Printf("[ERR] driver.docker: failed to inspect container %s: %v", h.containerID, ierr)
} else if container.State.OOMKilled {
werr = fmt.Errorf("Docker container killed by OOM killer")
werr = fmt.Errorf("OOM Killed")
}
close(h.doneCh)

View File

@ -1793,7 +1793,7 @@ func TestDockerDriver_OOMKilled(t *testing.T) {
t.Fatalf("expected error, but container exited successfull")
}
if !strings.Contains(res.Err.Error(), "killed by OOM killer") {
if res.Err.Error() != "OOM Killed" {
t.Fatalf("not killed by OOM killer: %s", res.Err)
}