From 1473e1d0247132e7913a3bd4b1bb1214f7f8ba6b Mon Sep 17 00:00:00 2001 From: Avesh Agarwal Date: Fri, 10 Nov 2017 12:52:20 -0500 Subject: [PATCH] Remove unused test code. --- pkg/descheduler/node/node_test.go | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/pkg/descheduler/node/node_test.go b/pkg/descheduler/node/node_test.go index 08211d04b2..f33bda04d5 100644 --- a/pkg/descheduler/node/node_test.go +++ b/pkg/descheduler/node/node_test.go @@ -17,18 +17,14 @@ limitations under the License. package node import ( - "fmt" "testing" "github.com/kubernetes-incubator/descheduler/test" - "k8s.io/apimachinery/pkg/runtime" - core "k8s.io/client-go/testing" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/fake" ) func TestReadyNodes(t *testing.T) { - fakeClient := &fake.Clientset{} node1 := test.BuildTestNode("node1", 1000, 2000, 9) node1.Status.Conditions = []v1.NodeCondition{{Type: v1.NodeOutOfDisk, Status: v1.ConditionTrue}} node2 := test.BuildTestNode("node2", 1000, 2000, 9) @@ -41,25 +37,6 @@ func TestReadyNodes(t *testing.T) { node6 := test.BuildTestNode("node6", 1000, 2000, 9) node6.Status.Conditions = []v1.NodeCondition{{Type: v1.NodeReady, Status: v1.ConditionFalse}} - fakeClient.Fake.AddReactor("get", "nodes", func(action core.Action) (bool, runtime.Object, error) { - getAction := action.(core.GetAction) - switch getAction.GetName() { - case node1.Name: - return true, node1, nil - case node2.Name: - return true, node2, nil - case node3.Name: - return true, node3, nil - case node4.Name: - return true, node4, nil - case node5.Name: - return true, node5, nil - case node6.Name: - return true, node6, nil - } - return true, nil, fmt.Errorf("Wrong node: %v", getAction.GetName()) - }) - if !IsReady(node1) { t.Errorf("Expected %v to be ready", node1.Name) }