mirror of https://github.com/docker/docs.git
use init function
This commit is contained in:
parent
eee6d3dae9
commit
740a97f1a8
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() {
|
func init() {
|
||||||
|
os.Setenv("TEST", "1")
|
||||||
|
|
||||||
// Hack to run sys init during unit testing
|
// Hack to run sys init during unit testing
|
||||||
if selfPath := utils.SelfPath(); selfPath == "/sbin/init" || selfPath == "/.dockerinit" {
|
if selfPath := utils.SelfPath(); selfPath == "/sbin/init" || selfPath == "/.dockerinit" {
|
||||||
SysInit()
|
SysInit()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue