Skip to content
Snippets Groups Projects
Commit 53415851 authored by Marcel Kolsteren's avatar Marcel Kolsteren
Browse files

fix ibuildthecloud/systemd-docker#16

parent 7d2b14fb
No related branches found
No related tags found
No related merge requests found
...@@ -170,7 +170,7 @@ func lookupNamedContainer(c *Context) error { ...@@ -170,7 +170,7 @@ func lookupNamedContainer(c *Context) error {
}) })
} else { } else {
client, err := getClient(c) client, err := getClient(c)
err = client.StartContainer(container.ID, nil) err = client.StartContainer(container.ID, container.HostConfig)
if err != nil { if err != nil {
return err return err
} }
......
...@@ -338,7 +338,7 @@ func TestNamedContainerNoRm(t *testing.T) { ...@@ -338,7 +338,7 @@ func TestNamedContainerNoRm(t *testing.T) {
deleteTestContainer(t) deleteTestContainer(t)
c, err := mainWithArgs([]string{"--logs", "run", "--name", "systemd-docker-test", "busybox", "echo", "hi"}) c, err := mainWithArgs([]string{"--logs", "run", "--privileged=true", "--name", "systemd-docker-test", "--privileged=true", "busybox", "echo", "hi"})
if err != nil { if err != nil {
t.Fatal(err) t.Fatal(err)
} }
...@@ -352,7 +352,7 @@ func TestNamedContainerNoRm(t *testing.T) { ...@@ -352,7 +352,7 @@ func TestNamedContainerNoRm(t *testing.T) {
t.Fatal("Should not be running") t.Fatal("Should not be running")
} }
c, err = mainWithArgs([]string{"--logs", "run", "--name", "systemd-docker-test", "busybox", "echo", "hi"}) c, err = mainWithArgs([]string{"--logs", "run", "--privileged=true", "--name", "systemd-docker-test", "busybox", "echo", "hi"})
if err != nil { if err != nil {
t.Fatal(err) t.Fatal(err)
} }
...@@ -370,6 +370,10 @@ func TestNamedContainerNoRm(t *testing.T) { ...@@ -370,6 +370,10 @@ func TestNamedContainerNoRm(t *testing.T) {
t.Fatal("Should be the same container", container.ID, container2.ID) t.Fatal("Should be the same container", container.ID, container2.ID)
} }
if !container2.HostConfig.Privileged {
t.Fatal("Container2 is not privileged")
}
deleteTestContainer(t) deleteTestContainer(t)
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment