kubernetes/pkg/controller/statefulset/stateful_set_control_test.go

type invariantFunc

func setupController(client clientset.Interface) (*fakeObjectManager, *fakeStatefulSetStatusUpdater, StatefulSetControlInterface) {}

func burst(set *apps.StatefulSet) *apps.StatefulSet {}

func setMinReadySeconds(set *apps.StatefulSet, minReadySeconds int32) *apps.StatefulSet {}

func runTestOverPVCRetentionPolicies(t *testing.T, testName string, testFn func(*testing.T, *apps.StatefulSetPersistentVolumeClaimRetentionPolicy)) {}

func pvcDeletePolicyString(policy *apps.StatefulSetPersistentVolumeClaimRetentionPolicy) string {}

func TestStatefulSetControl(t *testing.T) {}

func CreatesPodsWithPodIndexLabelFeature(t *testing.T, set *apps.StatefulSet, invariants invariantFunc) {}

func CreatesPodsWithoutPodIndexLabelFeature(t *testing.T, set *apps.StatefulSet, invariants invariantFunc) {}

func createPods(t *testing.T, set *apps.StatefulSet, invariants invariantFunc, isPodIndexLabelEnabled bool) {}

func ScalesUp(t *testing.T, set *apps.StatefulSet, invariants invariantFunc) {}

func ScalesDown(t *testing.T, set *apps.StatefulSet, invariants invariantFunc) {}

func ReplacesPods(t *testing.T, set *apps.StatefulSet, invariants invariantFunc) {}

func recreatesPod(t *testing.T, set *apps.StatefulSet, invariants invariantFunc, terminalPhase v1.PodPhase, testDeletePodFailure bool) {}

func RecreatesFailedPod(t *testing.T, set *apps.StatefulSet, invariants invariantFunc) {}

func RecreatesSucceededPod(t *testing.T, set *apps.StatefulSet, invariants invariantFunc) {}

func RecreatesFailedPodWithDeleteFailure(t *testing.T, set *apps.StatefulSet, invariants invariantFunc) {}

func RecreatesSucceededPodWithDeleteFailure(t *testing.T, set *apps.StatefulSet, invariants invariantFunc) {}

func CreatePodFailure(t *testing.T, set *apps.StatefulSet, invariants invariantFunc) {}

func UpdatePodFailure(t *testing.T, set *apps.StatefulSet, invariants invariantFunc) {}

func UpdateSetStatusFailure(t *testing.T, set *apps.StatefulSet, invariants invariantFunc) {}

func NewRevisionDeletePodFailure(t *testing.T, set *apps.StatefulSet, invariants invariantFunc) {}

func emptyInvariants(set *apps.StatefulSet, om *fakeObjectManager) error {}

func TestStatefulSetControlWithStartOrdinal(t *testing.T) {}

func CreatesPodsWithStartOrdinal(t *testing.T, set *apps.StatefulSet, invariants invariantFunc) {}

func RecreatesPVCForPendingPod(t *testing.T, set *apps.StatefulSet, invariants invariantFunc) {}

func TestStatefulSetControlScaleDownDeleteError(t *testing.T) {}

func TestStatefulSetControl_getSetRevisions(t *testing.T) {}

func setupPodManagementPolicy(podManagementPolicy apps.PodManagementPolicyType, set *apps.StatefulSet) *apps.StatefulSet {}

func TestStatefulSetControlRollingUpdateWithMaxUnavailable(t *testing.T) {}

func setupForInvariant(t *testing.T) (*apps.StatefulSet, *fakeObjectManager, StatefulSetControlInterface, intstr.IntOrString, int32) {}

func TestStatefulSetControlRollingUpdateWithMaxUnavailableInOrderedModeVerifyInvariant(t *testing.T) {}

func TestStatefulSetControlRollingUpdate(t *testing.T) {}

func TestStatefulSetControlOnDeleteUpdate(t *testing.T) {}

func TestStatefulSetControlRollingUpdateWithPartition(t *testing.T) {}

func TestStatefulSetHonorRevisionHistoryLimit(t *testing.T) {}

func TestStatefulSetControlLimitsHistory(t *testing.T) {}

func TestStatefulSetControlRollback(t *testing.T) {}

func TestStatefulSetAvailability(t *testing.T) {}

func TestStatefulSetStatusUpdate(t *testing.T) {}

type requestTracker

func (rt *requestTracker) trackParallelRequests() {}

func (rt *requestTracker) incWithOptionalError() error {}

func newRequestTracker(requests int, err error, after int) requestTracker {}

type fakeObjectManager

func newFakeObjectManager(informerFactory informers.SharedInformerFactory) *fakeObjectManager {}

func (om *fakeObjectManager) CreatePod(ctx context.Context, pod *v1.Pod) error {}

func (om *fakeObjectManager) GetPod(namespace, podName string) (*v1.Pod, error) {}

func (om *fakeObjectManager) UpdatePod(pod *v1.Pod) error {}

func (om *fakeObjectManager) DeletePod(pod *v1.Pod) error {}

func (om *fakeObjectManager) CreateClaim(claim *v1.PersistentVolumeClaim) error {}

func (om *fakeObjectManager) GetClaim(namespace, claimName string) (*v1.PersistentVolumeClaim, error) {}

func (om *fakeObjectManager) UpdateClaim(claim *v1.PersistentVolumeClaim) error {}

func (om *fakeObjectManager) SetCreateStatefulPodError(err error, after int) {}

func (om *fakeObjectManager) SetUpdateStatefulPodError(err error, after int) {}

func (om *fakeObjectManager) SetDeleteStatefulPodError(err error, after int) {}

func findPodByOrdinal(pods []*v1.Pod, ordinal int) *v1.Pod {}

func (om *fakeObjectManager) setPodPending(set *apps.StatefulSet, ordinal int) ([]*v1.Pod, error) {}

func (om *fakeObjectManager) setPodRunning(set *apps.StatefulSet, ordinal int) ([]*v1.Pod, error) {}

func (om *fakeObjectManager) setPodReady(set *apps.StatefulSet, ordinal int) ([]*v1.Pod, error) {}

func (om *fakeObjectManager) setPodAvailable(set *apps.StatefulSet, ordinal int, lastTransitionTime time.Time) ([]*v1.Pod, error) {}

func (om *fakeObjectManager) addTerminatingPod(set *apps.StatefulSet, ordinal int) ([]*v1.Pod, error) {}

func (om *fakeObjectManager) setPodTerminated(set *apps.StatefulSet, ordinal int) ([]*v1.Pod, error) {}

var _

type fakeStatefulSetStatusUpdater

func newFakeStatefulSetStatusUpdater(setInformer appsinformers.StatefulSetInformer) *fakeStatefulSetStatusUpdater {}

func (ssu *fakeStatefulSetStatusUpdater) UpdateStatefulSetStatus(ctx context.Context, set *apps.StatefulSet, status *apps.StatefulSetStatus) error {}

func (ssu *fakeStatefulSetStatusUpdater) SetUpdateStatefulSetStatusError(err error, after int) {}

var _

func assertMonotonicInvariants(set *apps.StatefulSet, om *fakeObjectManager) error {}

func assertBurstInvariants(set *apps.StatefulSet, om *fakeObjectManager) error {}

func assertUpdateInvariants(set *apps.StatefulSet, om *fakeObjectManager) error {}

func checkClaimInvarients(set *apps.StatefulSet, pod *v1.Pod, claim *v1.PersistentVolumeClaim) error {}

func fakeResourceVersion(object interface{}

func TestParallelScale(t *testing.T) {}

func parallelScale(t *testing.T, set *apps.StatefulSet, replicas, desiredReplicas int32, expectedMinParallelRequests int, invariants invariantFunc) {}

func parallelScaleUpStatefulSetControl(set *apps.StatefulSet,
	ssc StatefulSetControlInterface,
	om *fakeObjectManager,
	invariants invariantFunc) error {}

func parallelScaleDownStatefulSetControl(set *apps.StatefulSet, ssc StatefulSetControlInterface, om *fakeObjectManager, invariants invariantFunc) error {}

func scaleUpStatefulSetControl(set *apps.StatefulSet,
	ssc StatefulSetControlInterface,
	om *fakeObjectManager,
	invariants invariantFunc) error {}

func scaleDownStatefulSetControl(set *apps.StatefulSet, ssc StatefulSetControlInterface, om *fakeObjectManager, invariants invariantFunc) error {}

func updateComplete(set *apps.StatefulSet, pods []*v1.Pod) bool {}

func updateStatefulSetControl(set *apps.StatefulSet,
	ssc StatefulSetControlInterface,
	om *fakeObjectManager,
	invariants invariantFunc) error {}

func newRevisionOrDie(set *apps.StatefulSet, revision int64) *apps.ControllerRevision {}

func isOrHasInternalError(err error) bool {}