Skip to content

Commit

Permalink
don't call reexec.Init from chrootarchive
Browse files Browse the repository at this point in the history
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <[email protected]> (github: unclejack)

Conflicts:
	daemon/graphdriver/aufs/aufs_test.go
		fixed conflict caused by imports
  • Loading branch information
unclejack committed Nov 24, 2014
1 parent 9c01bc2 commit 209deff
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 3 deletions.
5 changes: 5 additions & 0 deletions daemon/graphdriver/aufs/aufs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,18 @@ import (

"github.com/docker/docker/daemon/graphdriver"
"github.com/docker/docker/pkg/archive"
"github.com/docker/docker/pkg/reexec"
)

var (
tmpOuter = path.Join(os.TempDir(), "aufs-tests")
tmp = path.Join(tmpOuter, "aufs")
)

func init() {
reexec.Init()
}

func testInit(dir string, t *testing.T) graphdriver.Driver {
d, err := Init(dir, nil)
if err != nil {
Expand Down
9 changes: 8 additions & 1 deletion daemon/graphdriver/vfs/vfs_test.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
package vfs

import (
"github.com/docker/docker/daemon/graphdriver/graphtest"
"testing"

"github.com/docker/docker/daemon/graphdriver/graphtest"

"github.com/docker/docker/pkg/reexec"
)

func init() {
reexec.Init()
}

// This avoids creating a new driver for each test if all tests are run
// Make sure to put new tests between TestVfsSetup and TestVfsTeardown
func TestVfsSetup(t *testing.T) {
Expand Down
10 changes: 9 additions & 1 deletion graph/pools_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
package graph

import "testing"
import (
"testing"

"github.com/docker/docker/pkg/reexec"
)

func init() {
reexec.Init()
}

func TestPools(t *testing.T) {
s := &TagStore{
Expand Down
5 changes: 5 additions & 0 deletions pkg/chrootarchive/archive_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,13 @@ import (
"testing"

"github.com/docker/docker/pkg/archive"
"github.com/docker/docker/pkg/reexec"
)

func init() {
reexec.Init()
}

func TestChrootTarUntar(t *testing.T) {
tmpdir, err := ioutil.TempDir("", "docker-TestChrootTarUntar")
if err != nil {
Expand Down
1 change: 0 additions & 1 deletion pkg/chrootarchive/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import (
func init() {
reexec.Register("docker-untar", untar)
reexec.Register("docker-applyLayer", applyLayer)
reexec.Init()
}

func fatal(err error) {
Expand Down

0 comments on commit 209deff

Please sign in to comment.