Move VolumeZone predicate to its Filter plugin
Signed-off-by: Zou Nengren <zouyee1989@gmail.com>
This commit is contained in:
@@ -156,7 +156,9 @@ func TestSingleZone(t *testing.T) {
|
||||
node := &schedulernodeinfo.NodeInfo{}
|
||||
node.SetNode(test.Node)
|
||||
p := &VolumeZone{
|
||||
predicate: predicates.NewVolumeZonePredicate(pvLister, pvcLister, nil),
|
||||
pvLister,
|
||||
pvcLister,
|
||||
nil,
|
||||
}
|
||||
gotStatus := p.Filter(context.Background(), nil, test.Pod, node)
|
||||
if !reflect.DeepEqual(gotStatus, test.wantStatus) {
|
||||
@@ -241,7 +243,9 @@ func TestMultiZone(t *testing.T) {
|
||||
node := &schedulernodeinfo.NodeInfo{}
|
||||
node.SetNode(test.Node)
|
||||
p := &VolumeZone{
|
||||
predicate: predicates.NewVolumeZonePredicate(pvLister, pvcLister, nil),
|
||||
pvLister,
|
||||
pvcLister,
|
||||
nil,
|
||||
}
|
||||
gotStatus := p.Filter(context.Background(), nil, test.Pod, node)
|
||||
if !reflect.DeepEqual(gotStatus, test.wantStatus) {
|
||||
@@ -348,7 +352,9 @@ func TestWithBinding(t *testing.T) {
|
||||
node := &schedulernodeinfo.NodeInfo{}
|
||||
node.SetNode(test.Node)
|
||||
p := &VolumeZone{
|
||||
predicate: predicates.NewVolumeZonePredicate(pvLister, pvcLister, scLister),
|
||||
pvLister,
|
||||
pvcLister,
|
||||
scLister,
|
||||
}
|
||||
gotStatus := p.Filter(context.Background(), nil, test.Pod, node)
|
||||
if !reflect.DeepEqual(gotStatus, test.wantStatus) {
|
||||
|
Reference in New Issue
Block a user