Commit 9219a762 authored by Guoliang Wang's avatar Guoliang Wang

remove unused code of (pkg/scheduler)

parent e6688fc6
...@@ -409,7 +409,6 @@ func TestZoneSelectorSpreadPriority(t *testing.T) { ...@@ -409,7 +409,6 @@ func TestZoneSelectorSpreadPriority(t *testing.T) {
tests := []struct { tests := []struct {
pod *v1.Pod pod *v1.Pod
pods []*v1.Pod pods []*v1.Pod
nodes []string
rcs []*v1.ReplicationController rcs []*v1.ReplicationController
rss []*extensions.ReplicaSet rss []*extensions.ReplicaSet
services []*v1.Service services []*v1.Service
......
...@@ -27,7 +27,6 @@ go_test( ...@@ -27,7 +27,6 @@ go_test(
"//vendor/k8s.io/api/apps/v1beta1:go_default_library", "//vendor/k8s.io/api/apps/v1beta1:go_default_library",
"//vendor/k8s.io/api/core/v1:go_default_library", "//vendor/k8s.io/api/core/v1:go_default_library",
"//vendor/k8s.io/api/extensions/v1beta1:go_default_library", "//vendor/k8s.io/api/extensions/v1beta1:go_default_library",
"//vendor/k8s.io/api/policy/v1beta1:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/api/resource:go_default_library", "//vendor/k8s.io/apimachinery/pkg/api/resource:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/types:go_default_library", "//vendor/k8s.io/apimachinery/pkg/types:go_default_library",
......
...@@ -635,7 +635,6 @@ func TestInvalidateCachedPredicateItemOfAllNodes(t *testing.T) { ...@@ -635,7 +635,6 @@ func TestInvalidateCachedPredicateItemOfAllNodes(t *testing.T) {
tests := []struct { tests := []struct {
podName string podName string
nodeName string nodeName string
predicateKey string
equivalenceHashForUpdatePredicate uint64 equivalenceHashForUpdatePredicate uint64
cachedItem predicateItemType cachedItem predicateItemType
}{ }{
...@@ -707,7 +706,6 @@ func TestInvalidateAllCachedPredicateItemOfNode(t *testing.T) { ...@@ -707,7 +706,6 @@ func TestInvalidateAllCachedPredicateItemOfNode(t *testing.T) {
tests := []struct { tests := []struct {
podName string podName string
nodeName string nodeName string
predicateKey string
equivalenceHashForUpdatePredicate uint64 equivalenceHashForUpdatePredicate uint64
cachedItem predicateItemType cachedItem predicateItemType
}{ }{
......
...@@ -22,7 +22,6 @@ import ( ...@@ -22,7 +22,6 @@ import (
"time" "time"
"k8s.io/api/core/v1" "k8s.io/api/core/v1"
policy "k8s.io/api/policy/v1beta1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/util/wait" "k8s.io/apimachinery/pkg/util/wait"
"k8s.io/kubernetes/pkg/scheduler/algorithm" "k8s.io/kubernetes/pkg/scheduler/algorithm"
...@@ -117,7 +116,6 @@ type FakeExtender struct { ...@@ -117,7 +116,6 @@ type FakeExtender struct {
// Cached node information for fake extender // Cached node information for fake extender
cachedNodeNameToInfo map[string]*schedulercache.NodeInfo cachedNodeNameToInfo map[string]*schedulercache.NodeInfo
cachedPDBs []*policy.PodDisruptionBudget
} }
func (f *FakeExtender) IsIgnorable() bool { func (f *FakeExtender) IsIgnorable() bool {
...@@ -332,15 +330,13 @@ var _ algorithm.SchedulerExtender = &FakeExtender{} ...@@ -332,15 +330,13 @@ var _ algorithm.SchedulerExtender = &FakeExtender{}
func TestGenericSchedulerWithExtenders(t *testing.T) { func TestGenericSchedulerWithExtenders(t *testing.T) {
tests := []struct { tests := []struct {
name string name string
predicates map[string]algorithm.FitPredicate predicates map[string]algorithm.FitPredicate
prioritizers []algorithm.PriorityConfig prioritizers []algorithm.PriorityConfig
extenders []FakeExtender extenders []FakeExtender
extenderPredicates []fitPredicate nodes []string
extenderPrioritizers []priorityConfig expectedHost string
nodes []string expectsErr bool
expectedHost string
expectsErr bool
}{ }{
{ {
predicates: map[string]algorithm.FitPredicate{"true": truePredicate}, predicates: map[string]algorithm.FitPredicate{"true": truePredicate},
......
...@@ -517,7 +517,6 @@ func TestUpdatePod(t *testing.T) { ...@@ -517,7 +517,6 @@ func TestUpdatePod(t *testing.T) {
makeBasePod(t, nodeName, "test", "200m", "1Ki", "", []v1.ContainerPort{{HostIP: "127.0.0.1", HostPort: 8080, Protocol: "TCP"}}), makeBasePod(t, nodeName, "test", "200m", "1Ki", "", []v1.ContainerPort{{HostIP: "127.0.0.1", HostPort: 8080, Protocol: "TCP"}}),
} }
tests := []struct { tests := []struct {
podsToAssume []*v1.Pod
podsToAdd []*v1.Pod podsToAdd []*v1.Pod
podsToUpdate []*v1.Pod podsToUpdate []*v1.Pod
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment