handling locks and update tests. Fail node if network is not initialized

This commit is contained in:
Vishnu kannan
2015-09-25 10:49:18 -07:00
parent cf56f7a8ef
commit 5f4570b764
3 changed files with 11 additions and 9 deletions

View File

@@ -140,7 +140,7 @@ func newTestKubelet(t *testing.T) *TestKubelet {
kubelet.volumeManager = newVolumeManager()
kubelet.containerManager, _ = newContainerManager(fakeContainerMgrMountInt(), mockCadvisor, "", "", "")
kubelet.runtimeState.setNetworkError(nil)
kubelet.runtimeState.setNetworkState(nil)
fakeClock := &util.FakeClock{Time: time.Now()}
kubelet.backOff = util.NewBackOff(time.Second, time.Minute)
kubelet.backOff.Clock = fakeClock
@@ -2996,8 +2996,8 @@ func TestUpdateNodeStatusWithoutContainerRuntime(t *testing.T) {
},
},
}
kubelet.runtimeState = newRuntimeState(time.Duration(0))
kubelet.runtimeState.setNetworkState(nil)
kubelet.updateRuntimeUp()
if err := kubelet.updateNodeStatus(); err != nil {
t.Errorf("unexpected error: %v", err)