diff options
Diffstat (limited to 'daemon/execdriver/native/configuration/parse_test.go')
-rw-r--r-- | daemon/execdriver/native/configuration/parse_test.go | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/daemon/execdriver/native/configuration/parse_test.go b/daemon/execdriver/native/configuration/parse_test.go index c561f5e2d3..0401d7b37e 100644 --- a/daemon/execdriver/native/configuration/parse_test.go +++ b/daemon/execdriver/native/configuration/parse_test.go @@ -3,7 +3,7 @@ package configuration import ( "testing" - "github.com/docker/libcontainer" + "github.com/docker/libcontainer/security/capabilities" "github.com/dotcloud/docker/daemon/execdriver/native/template" ) @@ -25,14 +25,14 @@ func TestSetReadonlyRootFs(t *testing.T) { } ) - if container.ReadonlyFs { + if container.MountConfig.ReadonlyFs { t.Fatal("container should not have a readonly rootfs by default") } if err := ParseConfiguration(container, nil, opts); err != nil { t.Fatal(err) } - if !container.ReadonlyFs { + if !container.MountConfig.ReadonlyFs { t.Fatal("container should have a readonly rootfs") } } @@ -84,8 +84,9 @@ func TestAppArmorProfile(t *testing.T) { if err := ParseConfiguration(container, nil, opts); err != nil { t.Fatal(err) } - if expected := "koye-the-protector"; container.Context["apparmor_profile"] != expected { - t.Fatalf("expected profile %s got %s", expected, container.Context["apparmor_profile"]) + + if expected := "koye-the-protector"; container.AppArmorProfile != expected { + t.Fatalf("expected profile %s got %s", expected, container.AppArmorProfile) } } @@ -165,7 +166,7 @@ func TestDropCap(t *testing.T) { } ) // enabled all caps like in privileged mode - container.Capabilities = libcontainer.GetAllCapabilities() + container.Capabilities = capabilities.GetAllCapabilities() if err := ParseConfiguration(container, nil, opts); err != nil { t.Fatal(err) } |