Add MetadataProducerFactory for predicates

Signed-off-by: Aldo Culquicondor <acondor@google.com>
This commit is contained in:
Aldo Culquicondor
2019-11-08 15:38:07 -05:00
parent b2fb0f77ad
commit 6a98c93f3c
34 changed files with 220 additions and 184 deletions

View File

@@ -458,7 +458,8 @@ func TestCSIVolumeCountPredicate(t *testing.T) {
getFakeCSIPVCLister(test.filterName, "csi-sc", test.driverNames...),
getFakeCSIStorageClassLister("csi-sc", test.driverNames[0]))
fits, reasons, err := pred(test.newPod, GetPredicateMetadata(test.newPod, nil), node)
factory := &MetadataProducerFactory{}
fits, reasons, err := pred(test.newPod, factory.GetPredicateMetadata(test.newPod, nil), node)
if err != nil {
t.Errorf("Using allocatable [%s]%s: unexpected error: %v", test.filterName, test.test, err)
}