diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index 2d3e4549..5521b59c 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -476,199 +476,199 @@ }, { "ImportPath": "k8s.io/apimachinery/pkg/api/equality", - "Rev": "90cdcb76c44bf1fcf0aa82aeea7f614c034cbd4b" + "Rev": "9496c30d9f9382f60f820cb392433abcabd2f47a" }, { "ImportPath": "k8s.io/apimachinery/pkg/api/errors", - "Rev": "90cdcb76c44bf1fcf0aa82aeea7f614c034cbd4b" + "Rev": "9496c30d9f9382f60f820cb392433abcabd2f47a" }, { "ImportPath": "k8s.io/apimachinery/pkg/api/meta", - "Rev": "90cdcb76c44bf1fcf0aa82aeea7f614c034cbd4b" + "Rev": "9496c30d9f9382f60f820cb392433abcabd2f47a" }, { "ImportPath": "k8s.io/apimachinery/pkg/api/resource", - "Rev": "90cdcb76c44bf1fcf0aa82aeea7f614c034cbd4b" + "Rev": "9496c30d9f9382f60f820cb392433abcabd2f47a" }, { "ImportPath": "k8s.io/apimachinery/pkg/apimachinery", - "Rev": "90cdcb76c44bf1fcf0aa82aeea7f614c034cbd4b" + "Rev": "9496c30d9f9382f60f820cb392433abcabd2f47a" }, { "ImportPath": "k8s.io/apimachinery/pkg/apimachinery/registered", - "Rev": "90cdcb76c44bf1fcf0aa82aeea7f614c034cbd4b" + "Rev": "9496c30d9f9382f60f820cb392433abcabd2f47a" }, { "ImportPath": "k8s.io/apimachinery/pkg/apis/meta/internalversion", - "Rev": "90cdcb76c44bf1fcf0aa82aeea7f614c034cbd4b" + "Rev": "9496c30d9f9382f60f820cb392433abcabd2f47a" }, { "ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1", - "Rev": "90cdcb76c44bf1fcf0aa82aeea7f614c034cbd4b" + "Rev": "9496c30d9f9382f60f820cb392433abcabd2f47a" }, { "ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured", - "Rev": "90cdcb76c44bf1fcf0aa82aeea7f614c034cbd4b" + "Rev": "9496c30d9f9382f60f820cb392433abcabd2f47a" }, { "ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1alpha1", - "Rev": "90cdcb76c44bf1fcf0aa82aeea7f614c034cbd4b" + "Rev": "9496c30d9f9382f60f820cb392433abcabd2f47a" }, { "ImportPath": "k8s.io/apimachinery/pkg/conversion", - "Rev": "90cdcb76c44bf1fcf0aa82aeea7f614c034cbd4b" + "Rev": "9496c30d9f9382f60f820cb392433abcabd2f47a" }, { "ImportPath": "k8s.io/apimachinery/pkg/conversion/queryparams", - "Rev": "90cdcb76c44bf1fcf0aa82aeea7f614c034cbd4b" + "Rev": "9496c30d9f9382f60f820cb392433abcabd2f47a" }, { "ImportPath": "k8s.io/apimachinery/pkg/conversion/unstructured", - "Rev": "90cdcb76c44bf1fcf0aa82aeea7f614c034cbd4b" + "Rev": "9496c30d9f9382f60f820cb392433abcabd2f47a" }, { "ImportPath": "k8s.io/apimachinery/pkg/fields", - "Rev": "90cdcb76c44bf1fcf0aa82aeea7f614c034cbd4b" + "Rev": "9496c30d9f9382f60f820cb392433abcabd2f47a" }, { "ImportPath": "k8s.io/apimachinery/pkg/labels", - "Rev": "90cdcb76c44bf1fcf0aa82aeea7f614c034cbd4b" + "Rev": "9496c30d9f9382f60f820cb392433abcabd2f47a" }, { "ImportPath": "k8s.io/apimachinery/pkg/runtime", - "Rev": "90cdcb76c44bf1fcf0aa82aeea7f614c034cbd4b" + "Rev": "9496c30d9f9382f60f820cb392433abcabd2f47a" }, { "ImportPath": "k8s.io/apimachinery/pkg/runtime/schema", - "Rev": "90cdcb76c44bf1fcf0aa82aeea7f614c034cbd4b" + "Rev": "9496c30d9f9382f60f820cb392433abcabd2f47a" }, { "ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer", - "Rev": "90cdcb76c44bf1fcf0aa82aeea7f614c034cbd4b" + "Rev": "9496c30d9f9382f60f820cb392433abcabd2f47a" }, { "ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/json", - "Rev": "90cdcb76c44bf1fcf0aa82aeea7f614c034cbd4b" + "Rev": "9496c30d9f9382f60f820cb392433abcabd2f47a" }, { "ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/protobuf", - "Rev": "90cdcb76c44bf1fcf0aa82aeea7f614c034cbd4b" + "Rev": "9496c30d9f9382f60f820cb392433abcabd2f47a" }, { "ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/recognizer", - "Rev": "90cdcb76c44bf1fcf0aa82aeea7f614c034cbd4b" + "Rev": "9496c30d9f9382f60f820cb392433abcabd2f47a" }, { "ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/streaming", - "Rev": "90cdcb76c44bf1fcf0aa82aeea7f614c034cbd4b" + "Rev": "9496c30d9f9382f60f820cb392433abcabd2f47a" }, { "ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/versioning", - "Rev": "90cdcb76c44bf1fcf0aa82aeea7f614c034cbd4b" + "Rev": "9496c30d9f9382f60f820cb392433abcabd2f47a" }, { "ImportPath": "k8s.io/apimachinery/pkg/selection", - "Rev": "90cdcb76c44bf1fcf0aa82aeea7f614c034cbd4b" + "Rev": "9496c30d9f9382f60f820cb392433abcabd2f47a" }, { "ImportPath": "k8s.io/apimachinery/pkg/types", - "Rev": "90cdcb76c44bf1fcf0aa82aeea7f614c034cbd4b" + "Rev": "9496c30d9f9382f60f820cb392433abcabd2f47a" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/cache", - "Rev": "90cdcb76c44bf1fcf0aa82aeea7f614c034cbd4b" + "Rev": "9496c30d9f9382f60f820cb392433abcabd2f47a" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/clock", - "Rev": "90cdcb76c44bf1fcf0aa82aeea7f614c034cbd4b" + "Rev": "9496c30d9f9382f60f820cb392433abcabd2f47a" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/diff", - "Rev": "90cdcb76c44bf1fcf0aa82aeea7f614c034cbd4b" + "Rev": "9496c30d9f9382f60f820cb392433abcabd2f47a" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/errors", - "Rev": "90cdcb76c44bf1fcf0aa82aeea7f614c034cbd4b" + "Rev": "9496c30d9f9382f60f820cb392433abcabd2f47a" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/framer", - "Rev": "90cdcb76c44bf1fcf0aa82aeea7f614c034cbd4b" + "Rev": "9496c30d9f9382f60f820cb392433abcabd2f47a" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/httpstream", - "Rev": "90cdcb76c44bf1fcf0aa82aeea7f614c034cbd4b" + "Rev": "9496c30d9f9382f60f820cb392433abcabd2f47a" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/httpstream/spdy", - "Rev": "90cdcb76c44bf1fcf0aa82aeea7f614c034cbd4b" + "Rev": "9496c30d9f9382f60f820cb392433abcabd2f47a" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/intstr", - "Rev": "90cdcb76c44bf1fcf0aa82aeea7f614c034cbd4b" + "Rev": "9496c30d9f9382f60f820cb392433abcabd2f47a" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/json", - "Rev": "90cdcb76c44bf1fcf0aa82aeea7f614c034cbd4b" + "Rev": "9496c30d9f9382f60f820cb392433abcabd2f47a" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/mergepatch", - "Rev": "90cdcb76c44bf1fcf0aa82aeea7f614c034cbd4b" + "Rev": "9496c30d9f9382f60f820cb392433abcabd2f47a" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/net", - "Rev": "90cdcb76c44bf1fcf0aa82aeea7f614c034cbd4b" + "Rev": "9496c30d9f9382f60f820cb392433abcabd2f47a" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/remotecommand", - "Rev": "90cdcb76c44bf1fcf0aa82aeea7f614c034cbd4b" + "Rev": "9496c30d9f9382f60f820cb392433abcabd2f47a" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/runtime", - "Rev": "90cdcb76c44bf1fcf0aa82aeea7f614c034cbd4b" + "Rev": "9496c30d9f9382f60f820cb392433abcabd2f47a" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/sets", - "Rev": "90cdcb76c44bf1fcf0aa82aeea7f614c034cbd4b" + "Rev": "9496c30d9f9382f60f820cb392433abcabd2f47a" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/strategicpatch", - "Rev": "90cdcb76c44bf1fcf0aa82aeea7f614c034cbd4b" + "Rev": "9496c30d9f9382f60f820cb392433abcabd2f47a" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/validation", - "Rev": "90cdcb76c44bf1fcf0aa82aeea7f614c034cbd4b" + "Rev": "9496c30d9f9382f60f820cb392433abcabd2f47a" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/validation/field", - "Rev": "90cdcb76c44bf1fcf0aa82aeea7f614c034cbd4b" + "Rev": "9496c30d9f9382f60f820cb392433abcabd2f47a" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/wait", - "Rev": "90cdcb76c44bf1fcf0aa82aeea7f614c034cbd4b" + "Rev": "9496c30d9f9382f60f820cb392433abcabd2f47a" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/yaml", - "Rev": "90cdcb76c44bf1fcf0aa82aeea7f614c034cbd4b" + "Rev": "9496c30d9f9382f60f820cb392433abcabd2f47a" }, { "ImportPath": "k8s.io/apimachinery/pkg/version", - "Rev": "90cdcb76c44bf1fcf0aa82aeea7f614c034cbd4b" + "Rev": "9496c30d9f9382f60f820cb392433abcabd2f47a" }, { "ImportPath": "k8s.io/apimachinery/pkg/watch", - "Rev": "90cdcb76c44bf1fcf0aa82aeea7f614c034cbd4b" + "Rev": "9496c30d9f9382f60f820cb392433abcabd2f47a" }, { "ImportPath": "k8s.io/apimachinery/third_party/forked/golang/json", - "Rev": "90cdcb76c44bf1fcf0aa82aeea7f614c034cbd4b" + "Rev": "9496c30d9f9382f60f820cb392433abcabd2f47a" }, { "ImportPath": "k8s.io/apimachinery/third_party/forked/golang/netutil", - "Rev": "90cdcb76c44bf1fcf0aa82aeea7f614c034cbd4b" + "Rev": "9496c30d9f9382f60f820cb392433abcabd2f47a" }, { "ImportPath": "k8s.io/apimachinery/third_party/forked/golang/reflect", - "Rev": "90cdcb76c44bf1fcf0aa82aeea7f614c034cbd4b" + "Rev": "9496c30d9f9382f60f820cb392433abcabd2f47a" }, { "ImportPath": "k8s.io/kube-openapi/pkg/common", diff --git a/tools/cache/index_test.go b/tools/cache/index_test.go index 7e378508..ecc104c0 100644 --- a/tools/cache/index_test.go +++ b/tools/cache/index_test.go @@ -77,6 +77,11 @@ func TestMultiIndexKeys(t *testing.T) { if len(erniePods) != 2 { t.Errorf("Expected 2 pods but got %v", len(erniePods)) } + for _, erniePod := range erniePods { + if erniePod.(*v1.Pod).Name != "one" && erniePod.(*v1.Pod).Name != "tre" { + t.Errorf("Expected only 'one' or 'tre' but got %s", erniePod.(*v1.Pod).Name) + } + } bertPods, err := index.ByIndex("byUser", "bert") if err != nil { @@ -85,6 +90,11 @@ func TestMultiIndexKeys(t *testing.T) { if len(bertPods) != 2 { t.Errorf("Expected 2 pods but got %v", len(bertPods)) } + for _, bertPod := range bertPods { + if bertPod.(*v1.Pod).Name != "one" && bertPod.(*v1.Pod).Name != "two" { + t.Errorf("Expected only 'one' or 'two' but got %s", bertPod.(*v1.Pod).Name) + } + } oscarPods, err := index.ByIndex("byUser", "oscar") if err != nil { @@ -93,6 +103,11 @@ func TestMultiIndexKeys(t *testing.T) { if len(oscarPods) != 1 { t.Errorf("Expected 1 pods but got %v", len(erniePods)) } + for _, oscarPod := range oscarPods { + if oscarPod.(*v1.Pod).Name != "two" { + t.Errorf("Expected only 'two' but got %s", oscarPod.(*v1.Pod).Name) + } + } ernieAndBertKeys, err := index.Index("byUser", pod1) if err != nil { @@ -101,6 +116,11 @@ func TestMultiIndexKeys(t *testing.T) { if len(ernieAndBertKeys) != 3 { t.Errorf("Expected 3 pods but got %v", len(ernieAndBertKeys)) } + for _, ernieAndBertKey := range ernieAndBertKeys { + if ernieAndBertKey.(*v1.Pod).Name != "one" && ernieAndBertKey.(*v1.Pod).Name != "two" && ernieAndBertKey.(*v1.Pod).Name != "tre" { + t.Errorf("Expected only 'one', 'two' or 'tre' but got %s", ernieAndBertKey.(*v1.Pod).Name) + } + } index.Delete(pod3) erniePods, err = index.ByIndex("byUser", "ernie") @@ -110,6 +130,12 @@ func TestMultiIndexKeys(t *testing.T) { if len(erniePods) != 1 { t.Errorf("Expected 1 pods but got %v", len(erniePods)) } + for _, erniePod := range erniePods { + if erniePod.(*v1.Pod).Name != "one" { + t.Errorf("Expected only 'one' but got %s", erniePod.(*v1.Pod).Name) + } + } + elmoPods, err := index.ByIndex("byUser", "elmo") if err != nil { t.Errorf("unexpected error: %v", err) @@ -128,5 +154,10 @@ func TestMultiIndexKeys(t *testing.T) { if len(bertPods) != 1 { t.Errorf("Expected 1 pods but got %v", len(bertPods)) } + for _, bertPod := range bertPods { + if bertPod.(*v1.Pod).Name != "one" { + t.Errorf("Expected only 'one' but got %s", bertPod.(*v1.Pod).Name) + } + } }