Skip to content

Commit

Permalink
Merge pull request kubernetes#6378 from yujuhong/docker_manager
Browse files Browse the repository at this point in the history
RFC: Kubelet: a step towards to better encapsulation of docker functions
  • Loading branch information
dchen1107 committed Apr 2, 2015
2 parents bac5cd3 + d01bc66 commit 67c1678
Show file tree
Hide file tree
Showing 8 changed files with 546 additions and 524 deletions.
401 changes: 41 additions & 360 deletions pkg/kubelet/dockertools/docker.go

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion pkg/kubelet/dockertools/docker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import (
"testing"

"github.com/GoogleCloudPlatform/kubernetes/pkg/api"
"github.com/GoogleCloudPlatform/kubernetes/pkg/client/record"
"github.com/GoogleCloudPlatform/kubernetes/pkg/credentialprovider"
"github.com/GoogleCloudPlatform/kubernetes/pkg/types"
"github.com/GoogleCloudPlatform/kubernetes/pkg/util"
Expand Down Expand Up @@ -394,6 +395,8 @@ func TestIsImagePresent(t *testing.T) {

func TestGetRunningContainers(t *testing.T) {
fakeDocker := &FakeDockerClient{}
fakeRecorder := &record.FakeRecorder{}
containerManager := NewDockerManager(fakeDocker, fakeRecorder)
tests := []struct {
containers map[string]*docker.Container
inputIDs []string
Expand Down Expand Up @@ -476,7 +479,7 @@ func TestGetRunningContainers(t *testing.T) {
for _, test := range tests {
fakeDocker.ContainerMap = test.containers
fakeDocker.Err = test.err
if results, err := GetRunningContainers(fakeDocker, test.inputIDs); err == nil {
if results, err := containerManager.GetRunningContainers(test.inputIDs); err == nil {
resultIDs := []string{}
for _, result := range results {
resultIDs = append(resultIDs, result.ID)
Expand Down
Loading

0 comments on commit 67c1678

Please sign in to comment.