From 78a21b77b2ab4412197e8c2bfdfdfb81774dc154 Mon Sep 17 00:00:00 2001 From: boucher Date: Wed, 29 Apr 2015 08:14:54 -0700 Subject: [PATCH] Fix formatting issues, and missing test methods. Docker-DCO-1.1-Signed-off-by: Ross Boucher (github: boucher) --- container_linux_test.go | 7 +++++++ nsinit/checkpoint.go | 4 ++-- process_linux.go | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/container_linux_test.go b/container_linux_test.go index b05733e5..95130a44 100644 --- a/container_linux_test.go +++ b/container_linux_test.go @@ -74,6 +74,13 @@ func (m *mockProcess) signal(_ os.Signal) error { return nil } +func (p *mockProcess) externalDescriptors() []string { + return []string{} +} + +func (p *mockProcess) setExternalDescriptors(newFds []string) { +} + func TestGetContainerPids(t *testing.T) { container := &linuxContainer{ id: "myid", diff --git a/nsinit/checkpoint.go b/nsinit/checkpoint.go index a68d3e68..794e7571 100644 --- a/nsinit/checkpoint.go +++ b/nsinit/checkpoint.go @@ -2,10 +2,10 @@ package main import ( "fmt" - "strconv" - "strings" "github.com/codegangsta/cli" "github.com/docker/libcontainer" + "strconv" + "strings" ) var checkpointCommand = cli.Command{ diff --git a/process_linux.go b/process_linux.go index cee1705f..4a448c22 100644 --- a/process_linux.go +++ b/process_linux.go @@ -189,7 +189,7 @@ func (p *initProcess) start() error { if err != nil { return newSystemError(err) } - p.setExternalDescriptors(fds); + p.setExternalDescriptors(fds) // Do this before syncing with child so that no children // can escape the cgroup