add functional Option type to Kubelet, add SetNodeStatus Option, migrate node statue update funcs to slice of callbacks

This commit is contained in:
James DeFelice
2016-02-19 01:54:48 +00:00
parent b36e046fc8
commit 6c09689c60
3 changed files with 45 additions and 6 deletions

View File

@@ -191,6 +191,7 @@ func newTestKubelet(t *testing.T) *TestKubelet {
// Relist period does not affect the tests.
kubelet.pleg = pleg.NewGenericPLEG(fakeRuntime, 100, time.Hour, nil)
kubelet.clock = fakeClock
kubelet.setNodeStatusFuncs = kubelet.defaultNodeStatusFuncs()
return &TestKubelet{kubelet, fakeRuntime, mockCadvisor, fakeKubeClient, fakeMirrorClient, fakeClock}
}