kubernetes/pkg/scheduler/framework/plugins/volumebinding/binder_test.go

var provisioner

var unboundPVC

var unboundPVC2

var preboundPVC

var preboundPVCNode1a

var boundPVC

var boundPVCNode1a

var immediateUnboundPVC

var immediateBoundPVC

var provisionedPVC

var provisionedPVC2

var provisionedPVCHigherVersion

var provisionedPVCBound

var noProvisionerPVC

var topoMismatchPVC

var selectedNodePVC

var boundMigrationPVC

var provMigrationPVCBound

var conflictingGenericPVC

var correctGenericPVC

var pvBoundGeneric

var pvNode1a

var pvNode1b

var pvNode1c

var pvNode2

var pvBound

var pvNode1aBound

var pvNode1bBound

var pvNode1bBoundHigherVersion

var pvBoundImmediate

var pvBoundImmediateNode2

var migrationPVBound

var migrationPVBoundToUnbound

var nonmigrationPVBoundToUnbound

var waitClass

var immediateClass

var waitClassWithProvisioner

var topoMismatchClass

var node1

var node2

var node1NoLabels

var node1Zone1

var node1Zone2

var csiNode1Migrated

var csiNode1NotMigrated

var nodeLabelKey

var nodeLabelValue

var zone1Labels

type testEnv

func newTestBinder(t *testing.T, ctx context.Context) *testEnv {}

func (env *testEnv) initNodes(cachedNodes []*v1.Node) {}

func (env *testEnv) initCSINodes(cachedCSINodes []*storagev1.CSINode) {}

func (env *testEnv) addCSIDriver(csiDriver *storagev1.CSIDriver) {}

func (env *testEnv) addCSIStorageCapacities(capacities []*storagev1.CSIStorageCapacity) {}

func (env *testEnv) initClaims(cachedPVCs []*v1.PersistentVolumeClaim, apiPVCs []*v1.PersistentVolumeClaim) {}

func (env *testEnv) initVolumes(cachedPVs []*v1.PersistentVolume, apiPVs []*v1.PersistentVolume) {}

func (env *testEnv) updateVolumes(ctx context.Context, pvs []*v1.PersistentVolume) error {}

func (env *testEnv) updateClaims(ctx context.Context, pvcs []*v1.PersistentVolumeClaim) error {}

func (env *testEnv) deleteVolumes(pvs []*v1.PersistentVolume) {}

func (env *testEnv) deleteClaims(pvcs []*v1.PersistentVolumeClaim) {}

func (env *testEnv) assumeVolumes(t *testing.T, node string, pod *v1.Pod, bindings []*BindingInfo, provisionings []*v1.PersistentVolumeClaim) {}

func (env *testEnv) validatePodCache(t *testing.T, node string, pod *v1.Pod, podVolumes *PodVolumes, expectedBindings []*BindingInfo, expectedProvisionings []*v1.PersistentVolumeClaim) {}

func (env *testEnv) validateAssume(t *testing.T, pod *v1.Pod, bindings []*BindingInfo, provisionings []*v1.PersistentVolumeClaim) {}

func (env *testEnv) validateCacheRestored(t *testing.T, pod *v1.Pod, bindings []*BindingInfo, provisionings []*v1.PersistentVolumeClaim) {}

func (env *testEnv) validateBind(
	t *testing.T,
	pod *v1.Pod,
	expectedPVs []*v1.PersistentVolume,
	expectedAPIPVs []*v1.PersistentVolume) {}

func (env *testEnv) validateProvision(
	t *testing.T,
	pod *v1.Pod,
	expectedPVCs []*v1.PersistentVolumeClaim,
	expectedAPIPVCs []*v1.PersistentVolumeClaim) {}

const pvcUnbound

const pvcPrebound

const pvcBound

const pvcSelectedNode

func makeGenericEphemeralPVC(volumeName string, owned bool) *v1.PersistentVolumeClaim {}

func makeTestPVC(name, size, node string, pvcBoundState int, pvName, resourceVersion string, className *string) *v1.PersistentVolumeClaim {}

func makeTestPV(name, node, capacity, version string, boundToPVC *v1.PersistentVolumeClaim, className string) *v1.PersistentVolume {}

func makeTestPVForCSIMigration(labels map[string]string, pvc *v1.PersistentVolumeClaim, migrationEnabled bool) *v1.PersistentVolume {}

func pvcSetSelectedNode(pvc *v1.PersistentVolumeClaim, node string) *v1.PersistentVolumeClaim {}

func pvcSetEmptyAnnotations(pvc *v1.PersistentVolumeClaim) *v1.PersistentVolumeClaim {}

func pvRemoveClaimUID(pv *v1.PersistentVolume) *v1.PersistentVolume {}

func makeCSINode(name, migratedPlugin string) *storagev1.CSINode {}

func makeCSIDriver(name string, storageCapacity bool) *storagev1.CSIDriver {}

func makeCapacity(name, storageClassName string, node *v1.Node, capacityStr, maximumVolumeSizeStr string) *storagev1.CSIStorageCapacity {}

func makeBinding(pvc *v1.PersistentVolumeClaim, pv *v1.PersistentVolume) *BindingInfo {}

func addProvisionAnn(pvc *v1.PersistentVolumeClaim) *v1.PersistentVolumeClaim {}

// reasonNames pretty-prints a list of reasons with variable names in
// case of a test failure because that is easier to read than the full
// strings.
func reasonNames(reasons ConflictReasons) string {}

func checkReasons(t *testing.T, actual, expected ConflictReasons) {}

// findPodVolumes gets and finds volumes for given pod and node
func findPodVolumes(logger klog.Logger, binder SchedulerVolumeBinder, pod *v1.Pod, node *v1.Node) (*PodVolumes, ConflictReasons, error) {}

func TestFindPodVolumesWithoutProvisioning(t *testing.T) {}

func TestFindPodVolumesWithProvisioning(t *testing.T) {}

// TestFindPodVolumesWithCSIMigration aims to test the node affinity check procedure that's
// done in FindPodVolumes. In order to reach this code path, the given PVCs must be bound to a PV.
func TestFindPodVolumesWithCSIMigration(t *testing.T) {}

func TestAssumePodVolumes(t *testing.T) {}

func TestRevertAssumedPodVolumes(t *testing.T) {}

func TestBindAPIUpdate(t *testing.T) {}

func TestCheckBindings(t *testing.T) {}

func TestCheckBindingsWithCSIMigration(t *testing.T) {}

func TestBindPodVolumes(t *testing.T) {}

func TestFindAssumeVolumes(t *testing.T) {}

// TestCapacity covers different scenarios involving CSIStorageCapacity objects.
// Scenarios without those are covered by TestFindPodVolumesWithProvisioning.
func TestCapacity(t *testing.T) {}