mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
use init function
This commit is contained in:
parent
eee6d3dae9
commit
740a97f1a8
2 changed files with 2 additions and 10 deletions
10
a_test.go
10
a_test.go
|
@ -1,10 +0,0 @@
|
|||
package docker
|
||||
|
||||
import (
|
||||
"os"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func Test(t *testing.T) {
|
||||
os.Setenv("TEST", "1")
|
||||
}
|
|
@ -72,6 +72,8 @@ func layerArchive(tarfile string) (io.Reader, error) {
|
|||
}
|
||||
|
||||
func init() {
|
||||
os.Setenv("TEST", "1")
|
||||
|
||||
// Hack to run sys init during unit testing
|
||||
if selfPath := utils.SelfPath(); selfPath == "/sbin/init" || selfPath == "/.dockerinit" {
|
||||
SysInit()
|
||||
|
|
Loading…
Add table
Reference in a new issue