Commit 40e46bbb authored by Yifan Gu's avatar Yifan Gu

kubelet: Remove newTestKubeletWithFakeRuntime() and other depreciated functions.

This cleans up the kubelet tests. Almost no docker specified tests now.
parent 91e198cb
......@@ -18,6 +18,8 @@ package kubelet
import (
"fmt"
"reflect"
"sort"
"testing"
"time"
......@@ -73,6 +75,20 @@ func makeContainerDetailMap(funcs ...func(map[string]*docker.Container)) map[str
return m
}
func verifyStringArrayEqualsAnyOrder(t *testing.T, actual, expected []string) {
act := make([]string, len(actual))
exp := make([]string, len(expected))
copy(act, actual)
copy(exp, expected)
sort.StringSlice(act).Sort()
sort.StringSlice(exp).Sort()
if !reflect.DeepEqual(exp, act) {
t.Errorf("Expected(sorted): %#v, Actual(sorted): %#v", exp, act)
}
}
func TestGarbageCollectZeroMaxContainers(t *testing.T) {
gc, fakeDocker := newTestContainerGC(t, time.Minute, 1, 0)
fakeDocker.ContainerList = []docker.APIContainers{
......
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