kubernetes/test/integration/volumescheduling/volume_binding_test.go

type testConfig

var deletePeriod

var deleteOption

var modeWait

var modeImmediate

var classWait

var classImmediate

var classDynamic

var classTopoMismatch

var sharedClasses

const node1

const node2

const podLimit

const volsPerPod

const nodeAffinityLabelKey

const provisionerPluginName

type testPV

type testPVC

func TestVolumeBinding(t *testing.T) {}

// TestVolumeBindingRescheduling tests scheduler will retry scheduling when needed.
func TestVolumeBindingRescheduling(t *testing.T) {}

// TestVolumeBindingStress creates <podLimit> pods, each with <volsPerPod> unbound or prebound PVCs.
// PVs are precreated.
func TestVolumeBindingStress(t *testing.T) {}

// Like TestVolumeBindingStress but with scheduler resync. In real cluster,
// scheduler will schedule failed pod frequently due to various events, e.g.
// service/node update events.
// This is useful to detect possible race conditions.
func TestVolumeBindingStressWithSchedulerResync(t *testing.T) {}

// Like TestVolumeBindingStress but with fast dynamic provisioning
func TestVolumeBindingDynamicStressFast(t *testing.T) {}

// Like TestVolumeBindingStress but with slow dynamic provisioning
func TestVolumeBindingDynamicStressSlow(t *testing.T) {}

func testVolumeBindingStress(t *testing.T, schedulerResyncPeriod time.Duration, dynamic bool, provisionDelaySeconds int) {}

func testVolumeBindingWithAffinity(t *testing.T, anti bool, numNodes, numPods, numPVsFirstNode int) {}

func TestVolumeBindingWithAntiAffinity(t *testing.T) {}

func TestVolumeBindingWithAffinity(t *testing.T) {}

func TestPVAffinityConflict(t *testing.T) {}

func TestVolumeProvision(t *testing.T) {}

// TestCapacity covers different scenarios involving CSIStorageCapacity objects.
func TestCapacity(t *testing.T) {}

// TestRescheduleProvisioning validate that PV controller will remove
// selectedNode annotation from a claim to reschedule volume provision
// on provision failure.
func TestRescheduleProvisioning(t *testing.T) {}

func setupCluster(t *testing.T, nsName string, numberOfNodes int, resyncPeriod time.Duration, provisionDelaySeconds int) *testConfig {}

func initPVController(t *testing.T, testCtx *testutil.TestContext, provisionDelaySeconds int) (*persistentvolume.PersistentVolumeController, informers.SharedInformerFactory, error) {}

func deleteTestObjects(client clientset.Interface, ns string, option metav1.DeleteOptions) {}

func makeStorageClass(name string, mode *storagev1.VolumeBindingMode) *storagev1.StorageClass {}

func makeDynamicProvisionerStorageClass(name string, mode *storagev1.VolumeBindingMode, allowedTopologies []v1.TopologySelectorTerm) *storagev1.StorageClass {}

func makePV(name, scName, pvcName, ns, node string) *v1.PersistentVolume {}

func makePVC(name, ns string, scName *string, volumeName string) *v1.PersistentVolumeClaim {}

func makePod(name, ns string, pvcs []string) *v1.Pod {}

// makeNode creates a node with the name "node-<index>"
func makeNode(index int) *v1.Node {}

func validatePVCPhase(t *testing.T, client clientset.Interface, pvcName string, ns string, phase v1.PersistentVolumeClaimPhase, isProvisioned bool) {}

func validateProvisionAnn(claim *v1.PersistentVolumeClaim, volIsProvisioned bool) error {}

func waitForProvisionAnn(client clientset.Interface, pvc *v1.PersistentVolumeClaim, annShouldExist bool) error {}

func validatePVPhase(t *testing.T, client clientset.Interface, pvName string, phase v1.PersistentVolumePhase) {}

func waitForPVPhase(client clientset.Interface, pvName string, phase v1.PersistentVolumePhase) error {}

func waitForPVCBound(client clientset.Interface, pvc *v1.PersistentVolumeClaim) error {}

func markNodeAffinity(pod *v1.Pod, node string) {}

func markNodeSelector(pod *v1.Pod, node string) {}