merge branch 'pr-1661'
Ensure container tests do not write on the host LGTMs: @hqhq @cyphar Closes #1661
This commit is contained in:
commit
e8149af291
|
@ -4,6 +4,7 @@ package libcontainer
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"io/ioutil"
|
||||||
"os"
|
"os"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
|
@ -281,7 +282,15 @@ func TestGetContainerStateAfterUpdate(t *testing.T) {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
rootDir, err := ioutil.TempDir("", "TestGetContainerStateAfterUpdate")
|
||||||
|
if err != nil {
|
||||||
|
t.Fatal(err)
|
||||||
|
}
|
||||||
|
defer os.RemoveAll(rootDir)
|
||||||
|
|
||||||
container := &linuxContainer{
|
container := &linuxContainer{
|
||||||
|
root: rootDir,
|
||||||
id: "myid",
|
id: "myid",
|
||||||
config: &configs.Config{
|
config: &configs.Config{
|
||||||
Namespaces: []configs.Namespace{
|
Namespaces: []configs.Namespace{
|
||||||
|
|
Loading…
Reference in New Issue