mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-04 15:05:20 +00:00
rename scheduler fake listers
Signed-off-by: Zou Nengren <zouyee1989@gmail.com>
This commit is contained in:
@@ -282,7 +282,7 @@ func TestGenericScheduler(t *testing.T) {
|
||||
prioritizers []priorities.PriorityConfig
|
||||
alwaysCheckAllPredicates bool
|
||||
nodes []string
|
||||
pvcs []*v1.PersistentVolumeClaim
|
||||
pvcs []v1.PersistentVolumeClaim
|
||||
pod *v1.Pod
|
||||
pods []*v1.Pod
|
||||
buildPredMeta bool // build predicates metadata or not
|
||||
@@ -404,7 +404,7 @@ func TestGenericScheduler(t *testing.T) {
|
||||
predicates: map[string]algorithmpredicates.FitPredicate{"true": truePredicate},
|
||||
prioritizers: []priorities.PriorityConfig{{Map: EqualPriorityMap, Weight: 1}},
|
||||
nodes: []string{"machine1", "machine2"},
|
||||
pvcs: []*v1.PersistentVolumeClaim{{ObjectMeta: metav1.ObjectMeta{Name: "existingPVC"}}},
|
||||
pvcs: []v1.PersistentVolumeClaim{{ObjectMeta: metav1.ObjectMeta{Name: "existingPVC"}}},
|
||||
pod: &v1.Pod{
|
||||
ObjectMeta: metav1.ObjectMeta{Name: "ignore", UID: types.UID("ignore")},
|
||||
Spec: v1.PodSpec{
|
||||
@@ -450,7 +450,7 @@ func TestGenericScheduler(t *testing.T) {
|
||||
predicates: map[string]algorithmpredicates.FitPredicate{"true": truePredicate},
|
||||
prioritizers: []priorities.PriorityConfig{{Map: EqualPriorityMap, Weight: 1}},
|
||||
nodes: []string{"machine1", "machine2"},
|
||||
pvcs: []*v1.PersistentVolumeClaim{{ObjectMeta: metav1.ObjectMeta{Name: "existingPVC", DeletionTimestamp: &metav1.Time{}}}},
|
||||
pvcs: []v1.PersistentVolumeClaim{{ObjectMeta: metav1.ObjectMeta{Name: "existingPVC", DeletionTimestamp: &metav1.Time{}}}},
|
||||
pod: &v1.Pod{
|
||||
ObjectMeta: metav1.ObjectMeta{Name: "ignore", UID: types.UID("ignore")},
|
||||
Spec: v1.PodSpec{
|
||||
@@ -654,7 +654,7 @@ func TestGenericScheduler(t *testing.T) {
|
||||
for _, name := range test.nodes {
|
||||
cache.AddNode(&v1.Node{ObjectMeta: metav1.ObjectMeta{Name: name, Labels: map[string]string{"hostname": name}}})
|
||||
}
|
||||
pvcs := []*v1.PersistentVolumeClaim{}
|
||||
pvcs := []v1.PersistentVolumeClaim{}
|
||||
pvcs = append(pvcs, test.pvcs...)
|
||||
|
||||
pvcLister := fakelisters.PersistentVolumeClaimLister(pvcs)
|
||||
|
||||
Reference in New Issue
Block a user