Ignore non-avaiable volumes in findMatchingVolume: update tests
- Use VolumeAvaiable instead of empty or pending phase in tests - Add a test case to verify findMatchingVolume will not choose non-avaiable PVs if it's not pre-bind - Add a test case to verify syncClaim will not choose non-avaibalbe PVs if it's not pre-bind
This commit is contained in:
@@ -494,6 +494,9 @@ func makeTestPV(name, node, capacity, version string, boundToPVC *v1.PersistentV
|
||||
},
|
||||
StorageClassName: className,
|
||||
},
|
||||
Status: v1.PersistentVolumeStatus{
|
||||
Phase: v1.VolumeAvailable,
|
||||
},
|
||||
}
|
||||
if node != "" {
|
||||
pv.Spec.NodeAffinity = getVolumeNodeAffinity(nodeLabelKey, node)
|
||||
|
Reference in New Issue
Block a user