kubelet: Remove newTestKubeletWithFakeRuntime() and other depreciated functions.
This cleans up the kubelet tests. Almost no docker specified tests now.
This commit is contained in:
@@ -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{
|
||||
|
Reference in New Issue
Block a user