func TestSingleLeaseCandidate(t *testing.T) { … }
func TestMultipleLeaseCandidate(t *testing.T) { … }
func TestLeaseSwapIfBetterAvailable(t *testing.T) { … }
func TestUpgradeSkew(t *testing.T) { … }
func TestLeaseCandidateCleanup(t *testing.T) { … }
type ctxCancelPair …
type cleTest …
func (t *cleTest) createAndRunFakeLegacyController(name string, namespace string, targetLease string) { … }
func (t *cleTest) createAndRunFakeController(name string, namespace string, targetLease string, binaryVersion string, compatibilityVersion string) { … }
func leaderElectAndRunUncoordinated(ctx context.Context, kubeconfig *rest.Config, lockIdentity string, electionChecker *leaderelection.HealthzAdaptor, resourceNamespace, resourceLock, leaseName string, callbacks leaderelection.LeaderCallbacks) { … }
func leaderElectAndRunCoordinated(ctx context.Context, kubeconfig *rest.Config, lockIdentity string, electionChecker *leaderelection.HealthzAdaptor, resourceNamespace, resourceLock, leaseName string, callbacks leaderelection.LeaderCallbacks) { … }
func leaderElectAndRun(ctx context.Context, kubeconfig *rest.Config, lockIdentity string, electionChecker *leaderelection.HealthzAdaptor, resourceNamespace, resourceLock, leaseName string, callbacks leaderelection.LeaderCallbacks, coordinated bool) { … }
func (t *cleTest) pollForLease(ctx context.Context, name, namespace, holder string) { … }
func (t *cleTest) cancelController(name, namespace string) { … }
func (t *cleTest) cleanup() { … }
func setupCLE(config *rest.Config, ctx context.Context, cancel func(), t *testing.T) *cleTest { … }