mirror of
https://github.com/clearlinux/docker.git
synced 2026-10-03 15:28:35 +00:00
Moved image name into config. runtime.Create() now receives a single Config parameter
This commit is contained in:
+18
-12
@@ -112,8 +112,9 @@ func TestRuntimeCreate(t *testing.T) {
|
||||
if len(runtime.List()) != 0 {
|
||||
t.Errorf("Expected 0 containers, %v found", len(runtime.List()))
|
||||
}
|
||||
container, err := runtime.Create(GetTestImage(runtime).Id, &Config{
|
||||
Cmd: []string{"ls", "-al"},
|
||||
container, err := runtime.Create(&Config{
|
||||
Image: GetTestImage(runtime).Id,
|
||||
Cmd: []string{"ls", "-al"},
|
||||
},
|
||||
)
|
||||
if err != nil {
|
||||
@@ -158,8 +159,9 @@ func TestDestroy(t *testing.T) {
|
||||
t.Fatal(err)
|
||||
}
|
||||
defer nuke(runtime)
|
||||
container, err := runtime.Create(GetTestImage(runtime).Id, &Config{
|
||||
Cmd: []string{"ls", "-al"},
|
||||
container, err := runtime.Create(&Config{
|
||||
Image: GetTestImage(runtime).Id,
|
||||
Cmd: []string{"ls", "-al"},
|
||||
},
|
||||
)
|
||||
if err != nil {
|
||||
@@ -204,8 +206,9 @@ func TestGet(t *testing.T) {
|
||||
t.Fatal(err)
|
||||
}
|
||||
defer nuke(runtime)
|
||||
container1, err := runtime.Create(GetTestImage(runtime).Id, &Config{
|
||||
Cmd: []string{"ls", "-al"},
|
||||
container1, err := runtime.Create(&Config{
|
||||
Image: GetTestImage(runtime).Id,
|
||||
Cmd: []string{"ls", "-al"},
|
||||
},
|
||||
)
|
||||
if err != nil {
|
||||
@@ -213,8 +216,9 @@ func TestGet(t *testing.T) {
|
||||
}
|
||||
defer runtime.Destroy(container1)
|
||||
|
||||
container2, err := runtime.Create(GetTestImage(runtime).Id, &Config{
|
||||
Cmd: []string{"ls", "-al"},
|
||||
container2, err := runtime.Create(&Config{
|
||||
Image: GetTestImage(runtime).Id,
|
||||
Cmd: []string{"ls", "-al"},
|
||||
},
|
||||
)
|
||||
if err != nil {
|
||||
@@ -222,8 +226,9 @@ func TestGet(t *testing.T) {
|
||||
}
|
||||
defer runtime.Destroy(container2)
|
||||
|
||||
container3, err := runtime.Create(GetTestImage(runtime).Id, &Config{
|
||||
Cmd: []string{"ls", "-al"},
|
||||
container3, err := runtime.Create(&Config{
|
||||
Image: GetTestImage(runtime).Id,
|
||||
Cmd: []string{"ls", "-al"},
|
||||
},
|
||||
)
|
||||
if err != nil {
|
||||
@@ -264,8 +269,9 @@ func TestRestore(t *testing.T) {
|
||||
}
|
||||
|
||||
// Create a container with one instance of docker
|
||||
container1, err := runtime1.Create(GetTestImage(runtime1).Id, &Config{
|
||||
Cmd: []string{"ls", "-al"},
|
||||
container1, err := runtime1.Create(&Config{
|
||||
Image: GetTestImage(runtime1).Id,
|
||||
Cmd: []string{"ls", "-al"},
|
||||
},
|
||||
)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user