From 7d5ac856c506896ca95527d41cb80df3fdcba02c Mon Sep 17 00:00:00 2001 From: Eric Tune Date: Wed, 7 Jan 2015 13:12:29 -0800 Subject: [PATCH] Make Reflector helpers reusable. Scheduler uses Reflector from pkg/client/cache. It defines some helper classes. I'd like to use those helpers with pkg/client/cache in kube-proxy and kubelet too. --- hack/test-go.sh | 4 +- pkg/client/cache/listwatch.go | 52 ++++++++ pkg/client/cache/listwatch_test.go | 123 +++++++++++++++++++ plugin/pkg/scheduler/factory/factory.go | 64 +++------- plugin/pkg/scheduler/factory/factory_test.go | 97 --------------- 5 files changed, 196 insertions(+), 144 deletions(-) create mode 100644 pkg/client/cache/listwatch.go create mode 100644 pkg/client/cache/listwatch_test.go diff --git a/hack/test-go.sh b/hack/test-go.sh index e82a70edebb..f04af50915e 100755 --- a/hack/test-go.sh +++ b/hack/test-go.sh @@ -44,9 +44,9 @@ kube::test::find_pkgs() { } # -covermode=atomic becomes default with -race in Go >=1.3 -KUBE_COVER=${KUBE_COVER:--cover -covermode=atomic} +KUBE_COVER="" #${KUBE_COVER:--cover -covermode=atomic} KUBE_TIMEOUT=${KUBE_TIMEOUT:--timeout 120s} -KUBE_RACE=${KUBE_RACE:--race} +KUBE_RACE="" #${KUBE_RACE:--race} kube::test::usage() { kube::log::usage_from_stdin <