Commit b76abf10 authored by Mikaël Cluseau's avatar Mikaël Cluseau

hairpin: fix tests

parent 1ab520a5
...@@ -885,7 +885,7 @@ func TestSyncPodCreateNetAndContainer(t *testing.T) { ...@@ -885,7 +885,7 @@ func TestSyncPodCreateNetAndContainer(t *testing.T) {
runSyncPod(t, dm, fakeDocker, pod, nil) runSyncPod(t, dm, fakeDocker, pod, nil)
verifyCalls(t, fakeDocker, []string{ verifyCalls(t, fakeDocker, []string{
// Create pod infra container. // Create pod infra container.
"create", "start", "inspect_container", "create", "start", "inspect_container", "inspect_container",
// Create container. // Create container.
"create", "start", "inspect_container", "create", "start", "inspect_container",
}) })
...@@ -934,7 +934,7 @@ func TestSyncPodCreatesNetAndContainerPullsImage(t *testing.T) { ...@@ -934,7 +934,7 @@ func TestSyncPodCreatesNetAndContainerPullsImage(t *testing.T) {
verifyCalls(t, fakeDocker, []string{ verifyCalls(t, fakeDocker, []string{
// Create pod infra container. // Create pod infra container.
"create", "start", "inspect_container", "create", "start", "inspect_container", "inspect_container",
// Create container. // Create container.
"create", "start", "inspect_container", "create", "start", "inspect_container",
}) })
...@@ -1027,7 +1027,7 @@ func TestSyncPodDeletesWithNoPodInfraContainer(t *testing.T) { ...@@ -1027,7 +1027,7 @@ func TestSyncPodDeletesWithNoPodInfraContainer(t *testing.T) {
// Kill the container since pod infra container is not running. // Kill the container since pod infra container is not running.
"stop", "stop",
// Create pod infra container. // Create pod infra container.
"create", "start", "inspect_container", "create", "start", "inspect_container", "inspect_container",
// Create container. // Create container.
"create", "start", "inspect_container", "create", "start", "inspect_container",
}) })
...@@ -2093,7 +2093,7 @@ func TestSyncPodWithTerminationLog(t *testing.T) { ...@@ -2093,7 +2093,7 @@ func TestSyncPodWithTerminationLog(t *testing.T) {
runSyncPod(t, dm, fakeDocker, pod, nil) runSyncPod(t, dm, fakeDocker, pod, nil)
verifyCalls(t, fakeDocker, []string{ verifyCalls(t, fakeDocker, []string{
// Create pod infra container. // Create pod infra container.
"create", "start", "inspect_container", "create", "start", "inspect_container", "inspect_container",
// Create container. // Create container.
"create", "start", "inspect_container", "create", "start", "inspect_container",
}) })
...@@ -2132,7 +2132,7 @@ func TestSyncPodWithHostNetwork(t *testing.T) { ...@@ -2132,7 +2132,7 @@ func TestSyncPodWithHostNetwork(t *testing.T) {
verifyCalls(t, fakeDocker, []string{ verifyCalls(t, fakeDocker, []string{
// Create pod infra container. // Create pod infra container.
"create", "start", "inspect_container", "create", "start", "inspect_container", "inspect_container",
// Create container. // Create container.
"create", "start", "inspect_container", "create", "start", "inspect_container",
}) })
......
...@@ -147,6 +147,13 @@ func TestRunOnce(t *testing.T) { ...@@ -147,6 +147,13 @@ func TestRunOnce(t *testing.T) {
State: docker.State{Running: true, Pid: 42}, State: docker.State{Running: true, Pid: 42},
}, },
}, },
{
label: "syncPod",
container: docker.Container{
Config: &docker.Config{Image: "someimage"},
State: docker.State{Running: true, Pid: 42},
},
},
}, },
t: t, t: t,
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment