mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00:00
Move Container to its own package.
So other packages don't need to import the daemon package when they want to use this struct. Signed-off-by: David Calavera <david.calavera@gmail.com> Signed-off-by: Tibor Vass <tibor@docker.com>
This commit is contained in:
committed by
Tibor Vass
parent
33ab2bb52c
commit
6bb0d1816a
@@ -5,6 +5,7 @@ import (
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
"github.com/docker/docker/container"
|
||||
"github.com/docker/docker/runconfig"
|
||||
)
|
||||
|
||||
@@ -18,19 +19,19 @@ func TestContainerDoubleDelete(t *testing.T) {
|
||||
repository: tmp,
|
||||
root: tmp,
|
||||
}
|
||||
daemon.containers = &contStore{s: make(map[string]*Container)}
|
||||
daemon.containers = &contStore{s: make(map[string]*container.Container)}
|
||||
|
||||
container := &Container{
|
||||
CommonContainer: CommonContainer{
|
||||
container := &container.Container{
|
||||
CommonContainer: container.CommonContainer{
|
||||
ID: "test",
|
||||
State: NewState(),
|
||||
State: container.NewState(),
|
||||
Config: &runconfig.Config{},
|
||||
},
|
||||
}
|
||||
daemon.containers.Add(container.ID, container)
|
||||
|
||||
// Mark the container as having a delete in progress
|
||||
if err := container.setRemovalInProgress(); err != nil {
|
||||
if err := container.SetRemovalInProgress(); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user