Skip to content

Commit 84c344d

Browse files
authored
Merge pull request #992 from xiekeyang/master
move util function
2 parents 6df383c + 2fcbb5a commit 84c344d

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

libcontainer/integration/exec_test.go

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -199,17 +199,6 @@ func testRlimit(t *testing.T, userns bool) {
199199
}
200200
}
201201

202-
func newTestRoot() (string, error) {
203-
dir, err := ioutil.TempDir("", "libcontainer")
204-
if err != nil {
205-
return "", err
206-
}
207-
if err := os.MkdirAll(dir, 0700); err != nil {
208-
return "", err
209-
}
210-
return dir, nil
211-
}
212-
213202
func TestEnter(t *testing.T) {
214203
if testing.Short() {
215204
return

libcontainer/integration/utils_test.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,17 @@ func waitProcess(p *libcontainer.Process, t *testing.T) {
6565
}
6666
}
6767

68+
func newTestRoot() (string, error) {
69+
dir, err := ioutil.TempDir("", "libcontainer")
70+
if err != nil {
71+
return "", err
72+
}
73+
if err := os.MkdirAll(dir, 0700); err != nil {
74+
return "", err
75+
}
76+
return dir, nil
77+
}
78+
6879
// newRootfs creates a new tmp directory and copies the busybox root filesystem
6980
func newRootfs() (string, error) {
7081
dir, err := ioutil.TempDir("", "")

0 commit comments

Comments
 (0)