Test for and fix crash with nil client in kubelet.

Added test that fails before fix.
Fixed use of nil pointer.
This commit is contained in:
Eric Tune
2015-01-16 13:39:31 -08:00
parent ee0ba6c922
commit 98bdd3f7c4
4 changed files with 18 additions and 4 deletions

View File

@@ -24,7 +24,7 @@ import (
)
// ListWatch knows how to list and watch a set of apiserver resources. It satisfies the ListerWatcher interface.
// It is a convenience function for users of NewReflector, etc.
// It is a convenience function for users of NewReflector, etc. Client must not be nil.
type ListWatch struct {
Client *client.Client
FieldSelector labels.Selector