func init() { … }
type controllerTest …
const annSkipLocalStore …
type testCall …
const testNamespace …
const mockPluginName …
var novolumes …
var noclaims …
var noevents …
var noerrors …
type volumeReactor …
func newVolumeReactor(ctx context.Context, client *fake.Clientset, ctrl *PersistentVolumeController, fakeVolumeWatch, fakeClaimWatch *watch.FakeWatcher, errors []pvtesting.ReactorError) *volumeReactor { … }
func (r *volumeReactor) waitForIdle() { … }
func (r *volumeReactor) waitTest(test controllerTest) error { … }
func checkEvents(t *testing.T, ctx context.Context, expectedEvents []string, ctrl *PersistentVolumeController) error { … }
func alwaysReady() bool { … }
func newTestController(ctx context.Context, kubeClient clientset.Interface, informerFactory informers.SharedInformerFactory, enableDynamicProvisioning bool) (*PersistentVolumeController, error) { … }
func newVolume(name, capacity, boundToClaimUID, boundToClaimName string, phase v1.PersistentVolumePhase, reclaimPolicy v1.PersistentVolumeReclaimPolicy, class string, annotations ...string) *v1.PersistentVolume { … }
func newExternalProvisionedVolume(name, capacity, boundToClaimUID, boundToClaimName string, phase v1.PersistentVolumePhase, reclaimPolicy v1.PersistentVolumeReclaimPolicy, class string, driverName string, finalizers []string, annotations ...string) *v1.PersistentVolume { … }
func newVolumeWithFinalizers(name, capacity, boundToClaimUID, boundToClaimName string, phase v1.PersistentVolumePhase, reclaimPolicy v1.PersistentVolumeReclaimPolicy, class string, finalizers []string, annotations ...string) *v1.PersistentVolume { … }
func withLabels(labels map[string]string, volumes []*v1.PersistentVolume) []*v1.PersistentVolume { … }
func withLabelSelector(labels map[string]string, claims []*v1.PersistentVolumeClaim) []*v1.PersistentVolumeClaim { … }
func withVolumeVolumeMode(mode *v1.PersistentVolumeMode, volumes []*v1.PersistentVolume) []*v1.PersistentVolume { … }
func withClaimVolumeMode(mode *v1.PersistentVolumeMode, claims []*v1.PersistentVolumeClaim) []*v1.PersistentVolumeClaim { … }
func withExpectedCapacity(capacity string, claims []*v1.PersistentVolumeClaim) []*v1.PersistentVolumeClaim { … }
func withExpectedVAC(vacName *string, claims []*v1.PersistentVolumeClaim) []*v1.PersistentVolumeClaim { … }
func withMessage(message string, volumes []*v1.PersistentVolume) []*v1.PersistentVolume { … }
func newVolumeArray(name, capacity, boundToClaimUID, boundToClaimName string, phase v1.PersistentVolumePhase, reclaimPolicy v1.PersistentVolumeReclaimPolicy, class string, annotations ...string) []*v1.PersistentVolume { … }
func withVolumeDeletionTimestamp(pvs []*v1.PersistentVolume) []*v1.PersistentVolume { … }
func volumesWithFinalizers(pvs []*v1.PersistentVolume, finalizers []string) []*v1.PersistentVolume { … }
func newClaim(name, claimUID, capacity, boundToVolume string, phase v1.PersistentVolumeClaimPhase, class *string, annotations ...string) *v1.PersistentVolumeClaim { … }
func newClaimArray(name, claimUID, capacity, boundToVolume string, phase v1.PersistentVolumeClaimPhase, class *string, annotations ...string) []*v1.PersistentVolumeClaim { … }
func claimWithVAC(vacName *string, claims []*v1.PersistentVolumeClaim) []*v1.PersistentVolumeClaim { … }
func claimWithAnnotation(name, value string, claims []*v1.PersistentVolumeClaim) []*v1.PersistentVolumeClaim { … }
func claimWithDataSource(name, kind, apiGroup string, claims []*v1.PersistentVolumeClaim) []*v1.PersistentVolumeClaim { … }
func annotateClaim(claim *v1.PersistentVolumeClaim, ann map[string]string) *v1.PersistentVolumeClaim { … }
func volumeWithVAC(vacName string, volume *v1.PersistentVolume) *v1.PersistentVolume { … }
func volumesWithVAC(vacName string, volumes []*v1.PersistentVolume) []*v1.PersistentVolume { … }
func volumeWithAnnotation(name, value string, volume *v1.PersistentVolume) *v1.PersistentVolume { … }
func volumesWithAnnotation(name, value string, volumes []*v1.PersistentVolume) []*v1.PersistentVolume { … }
func claimWithAccessMode(modes []v1.PersistentVolumeAccessMode, claims []*v1.PersistentVolumeClaim) []*v1.PersistentVolumeClaim { … }
func testSyncClaim(ctrl *PersistentVolumeController, reactor *pvtesting.VolumeReactor, test controllerTest) error { … }
func testSyncClaimError(ctrl *PersistentVolumeController, reactor *pvtesting.VolumeReactor, test controllerTest) error { … }
func testSyncVolume(ctrl *PersistentVolumeController, reactor *pvtesting.VolumeReactor, test controllerTest) error { … }
type operationType …
const operationDelete …
const operationRecycle …
var classGold …
var classSilver …
var classCopper …
var classEmpty …
var classNonExisting …
var classExternal …
var classExternalWait …
var classUnknownInternal …
var classUnsupportedMountOptions …
var classLarge …
var classWait …
var classCSI …
var modeWait …
func wrapTestWithPluginCalls(expectedRecycleCalls, expectedDeleteCalls []error, expectedProvisionCalls []provisionCall, toWrap testCall) testCall { … }
func wrapTestWithReclaimCalls(operation operationType, expectedOperationCalls []error, toWrap testCall) testCall { … }
func wrapTestWithProvisionCalls(expectedProvisionCalls []provisionCall, toWrap testCall) testCall { … }
type fakeCSINameTranslator …
func (t fakeCSINameTranslator) GetCSINameFromInTreeName(pluginName string) (string, error) { … }
type fakeCSIMigratedPluginManager …
func (t fakeCSIMigratedPluginManager) IsMigrationEnabledForPlugin(pluginName string) bool { … }
func wrapTestWithCSIMigrationProvisionCalls(toWrap testCall) testCall { … }
func wrapTestWithInjectedOperation(ctx context.Context, toWrap testCall, injectBeforeOperation func(ctrl *PersistentVolumeController, reactor *pvtesting.VolumeReactor)) testCall { … }
func evaluateTestResults(ctx context.Context, ctrl *PersistentVolumeController, reactor *pvtesting.VolumeReactor, test controllerTest, t *testing.T) { … }
func runSyncTests(t *testing.T, ctx context.Context, tests []controllerTest, storageClasses []*storage.StorageClass, pods []*v1.Pod) { … }
func runMultisyncTests(t *testing.T, ctx context.Context, tests []controllerTest, storageClasses []*storage.StorageClass, defaultStorageClass string) { … }
type mockVolumePlugin …
type provisionCall …
var _ …
var _ …
var _ …
var _ …
func (plugin *mockVolumePlugin) Init(host volume.VolumeHost) error { … }
func (plugin *mockVolumePlugin) GetPluginName() string { … }
func (plugin *mockVolumePlugin) GetVolumeName(spec *volume.Spec) (string, error) { … }
func (plugin *mockVolumePlugin) CanSupport(spec *volume.Spec) bool { … }
func (plugin *mockVolumePlugin) RequiresRemount(spec *volume.Spec) bool { … }
func (plugin *mockVolumePlugin) SupportsMountOption() bool { … }
func (plugin *mockVolumePlugin) SupportsBulkVolumeVerification() bool { … }
func (plugin *mockVolumePlugin) ConstructVolumeSpec(volumeName, mountPath string) (volume.ReconstructedVolume, error) { … }
func (plugin *mockVolumePlugin) SupportsSELinuxContextMount(spec *volume.Spec) (bool, error) { … }
func (plugin *mockVolumePlugin) NewMounter(spec *volume.Spec, podRef *v1.Pod) (volume.Mounter, error) { … }
func (plugin *mockVolumePlugin) NewUnmounter(name string, podUID types.UID) (volume.Unmounter, error) { … }
func (plugin *mockVolumePlugin) NewProvisioner(logger klog.Logger, options volume.VolumeOptions) (volume.Provisioner, error) { … }
func (plugin *mockVolumePlugin) Provision(selectedNode *v1.Node, allowedTopologies []v1.TopologySelectorTerm) (*v1.PersistentVolume, error) { … }
func (plugin *mockVolumePlugin) NewDeleter(logger klog.Logger, spec *volume.Spec) (volume.Deleter, error) { … }
func (plugin *mockVolumePlugin) Delete() error { … }
func (plugin *mockVolumePlugin) GetPath() string { … }
func (plugin *mockVolumePlugin) GetMetrics() (*volume.Metrics, error) { … }
func (plugin *mockVolumePlugin) Recycle(pvName string, spec *volume.Spec, eventRecorder recyclerclient.RecycleEventRecorder) error { … }