func init() { … }
const testKubeletHostname …
const testKubeletHostIP …
const testKubeletHostIPv6 …
const minImgSize …
const maxImgSize …
type fakeImageGCManager …
func (f *fakeImageGCManager) GetImageList() ([]kubecontainer.Image, error) { … }
type TestKubelet …
func (tk *TestKubelet) Cleanup() { … }
func newTestKubelet(t *testing.T, controllerAttachDetachEnabled bool) *TestKubelet { … }
func newTestKubeletWithImageList(
t *testing.T,
imageList []kubecontainer.Image,
controllerAttachDetachEnabled bool,
initFakeVolumePlugin bool,
localStorageCapacityIsolation bool,
) *TestKubelet { … }
func newTestPods(count int) []*v1.Pod { … }
func TestSyncLoopAbort(t *testing.T) { … }
func TestSyncPodsStartPod(t *testing.T) { … }
func TestHandlePodCleanupsPerQOS(t *testing.T) { … }
func TestDispatchWorkOfCompletedPod(t *testing.T) { … }
func TestDispatchWorkOfActivePod(t *testing.T) { … }
func TestHandlePodCleanups(t *testing.T) { … }
func TestHandlePodRemovesWhenSourcesAreReady(t *testing.T) { … }
type testNodeLister …
func (nl testNodeLister) Get(name string) (*v1.Node, error) { … }
func (nl testNodeLister) List(_ labels.Selector) (ret []*v1.Node, err error) { … }
func checkPodStatus(t *testing.T, kl *Kubelet, pod *v1.Pod, phase v1.PodPhase) { … }
func TestHandlePortConflicts(t *testing.T) { … }
func TestHandleHostNameConflicts(t *testing.T) { … }
func TestHandleNodeSelector(t *testing.T) { … }
func TestHandleNodeSelectorBasedOnOS(t *testing.T) { … }
func TestHandleMemExceeded(t *testing.T) { … }
func TestHandlePluginResources(t *testing.T) { … }
func TestPurgingObsoleteStatusMapEntries(t *testing.T) { … }
func TestValidateContainerLogStatus(t *testing.T) { … }
func TestCreateMirrorPod(t *testing.T) { … }
func TestDeleteOutdatedMirrorPod(t *testing.T) { … }
func TestDeleteOrphanedMirrorPods(t *testing.T) { … }
func TestNetworkErrorsWithoutHostNetwork(t *testing.T) { … }
func TestFilterOutInactivePods(t *testing.T) { … }
func TestCheckpointContainer(t *testing.T) { … }
func TestSyncPodsSetStatusToFailedForPodsThatRunTooLong(t *testing.T) { … }
func TestSyncPodsDoesNotSetPodsThatDidNotRunTooLongToFailed(t *testing.T) { … }
func podWithUIDNameNs(uid types.UID, name, namespace string) *v1.Pod { … }
func podWithUIDNameNsSpec(uid types.UID, name, namespace string, spec v1.PodSpec) *v1.Pod { … }
func TestDeletePodDirsForDeletedPods(t *testing.T) { … }
func syncAndVerifyPodDir(t *testing.T, testKubelet *TestKubelet, pods []*v1.Pod, podsToCheck []*v1.Pod, shouldExist bool) { … }
func TestDoesNotDeletePodDirsForTerminatedPods(t *testing.T) { … }
func TestDoesNotDeletePodDirsIfContainerIsRunning(t *testing.T) { … }
func TestGetPodsToSync(t *testing.T) { … }
func TestGenerateAPIPodStatusWithSortedContainers(t *testing.T) { … }
func verifyContainerStatuses(t *testing.T, statuses []v1.ContainerStatus, expectedState, expectedLastTerminationState map[string]v1.ContainerState, message string) { … }
func TestGenerateAPIPodStatusWithReasonCache(t *testing.T) { … }
func TestGenerateAPIPodStatusWithDifferentRestartPolicies(t *testing.T) { … }
type testPodAdmitHandler …
func (a *testPodAdmitHandler) Admit(attrs *lifecycle.PodAdmitAttributes) lifecycle.PodAdmitResult { … }
func TestHandlePodAdditionsInvokesPodAdmitHandlers(t *testing.T) { … }
func TestPodResourceAllocationReset(t *testing.T) { … }
func TestHandlePodResourcesResize(t *testing.T) { … }
type testPodSyncLoopHandler …
func (a *testPodSyncLoopHandler) ShouldSync(pod *v1.Pod) bool { … }
func TestGetPodsToSyncInvokesPodSyncLoopHandlers(t *testing.T) { … }
type testPodSyncHandler …
func (a *testPodSyncHandler) ShouldEvict(pod *v1.Pod) lifecycle.ShouldEvictResponse { … }
func TestGenerateAPIPodStatusInvokesPodSyncHandlers(t *testing.T) { … }
func TestSyncTerminatingPodKillPod(t *testing.T) { … }
func TestSyncLabels(t *testing.T) { … }
func waitForVolumeUnmount(
volumeManager kubeletvolume.VolumeManager,
pod *v1.Pod) error { … }
func waitForVolumeDetach(
volumeName v1.UniqueVolumeName,
volumeManager kubeletvolume.VolumeManager) error { … }
func retryWithExponentialBackOff(initialDuration time.Duration, fn wait.ConditionFunc) error { … }
func simulateVolumeInUseUpdate(
volumeName v1.UniqueVolumeName,
stopCh <-chan struct{ … }
func dirExists(path string) bool { … }
type podsByUID …
func (p podsByUID) Len() int { … }
func (p podsByUID) Swap(i, j int) { … }
func (p podsByUID) Less(i, j int) bool { … }
func createAndStartFakeRemoteRuntime(t *testing.T) (*fakeremote.RemoteRuntime, string) { … }
func createRemoteRuntimeService(endpoint string, t *testing.T, tp oteltrace.TracerProvider) internalapi.RuntimeService { … }
func TestNewMainKubeletStandAlone(t *testing.T) { … }
func TestSyncPodSpans(t *testing.T) { … }
func TestIsPodResizeInProgress(t *testing.T) { … }