kubernetes/pkg/kubelet/images/image_gc_manager_test.go

var zero

var sandboxImage

func newRealImageGCManager(policy ImageGCPolicy, mockStatsProvider stats.Provider) (*realImageGCManager, *containertest.FakeRuntime) {}

// Accessors used for thread-safe testing.
func (im *realImageGCManager) imageRecordsLen() int {}

func (im *realImageGCManager) getImageRecord(name string) (*imageRecord, bool) {}

func (im *realImageGCManager) getImageRecordWithRuntimeHandlerInImageCriAPIFeatureGate(name, runtimeHandler string) (*imageRecord, bool) {}

// Returns the id of the image with the given ID.
func imageID(id int) string {}

// Returns the name of the image with the given ID.
func imageName(id int) string {}

// Make an image with the specified ID.
func makeImage(id int, size int64) container.Image {}

// Make an image with the specified ID.
func makeImageWithRuntimeHandler(id int, size int64, runtimeHandler string) container.Image {}

// Make a container with the specified ID. It will use the image with the same ID.
func makeContainer(id int) *container.Container {}

func TestDetectImagesInitialDetect(t *testing.T) {}

func TestDetectImagesInitialDetectWithRuntimeHandlerInImageCriAPIFeatureGate(t *testing.T) {}

func TestDetectImagesWithNewImage(t *testing.T) {}

func TestDeleteUnusedImagesExemptSandboxImage(t *testing.T) {}

func TestDeletePinnedImage(t *testing.T) {}

func TestDoNotDeletePinnedImage(t *testing.T) {}

func TestDeleteUnPinnedImage(t *testing.T) {}

func TestAllPinnedImages(t *testing.T) {}

func TestDetectImagesContainerStopped(t *testing.T) {}

func TestDetectImagesWithRemovedImages(t *testing.T) {}

func TestFreeSpaceImagesInUseContainersAreIgnored(t *testing.T) {}

func TestDeleteUnusedImagesRemoveAllUnusedImages(t *testing.T) {}

func TestDeleteUnusedImagesLimitByImageLiveTime(t *testing.T) {}

func TestFreeSpaceRemoveByLeastRecentlyUsed(t *testing.T) {}

func TestFreeSpaceTiesBrokenByDetectedTime(t *testing.T) {}

func TestGarbageCollectBelowLowThreshold(t *testing.T) {}

func TestGarbageCollectCadvisorFailure(t *testing.T) {}

func TestGarbageCollectBelowSuccess(t *testing.T) {}

func TestGarbageCollectNotEnoughFreed(t *testing.T) {}

func TestGarbageCollectImageNotOldEnough(t *testing.T) {}

func getImagesAndFreeSpace(ctx context.Context, t *testing.T, assert *assert.Assertions, im *realImageGCManager, fakeRuntime *containertest.FakeRuntime, spaceToFree, expectedSpaceFreed int64, imagesLen int, freeTime time.Time) {}

func TestGarbageCollectImageTooOld(t *testing.T) {}

func TestGarbageCollectImageMaxAgeDisabled(t *testing.T) {}

func TestValidateImageGCPolicy(t *testing.T) {}

func uint64Ptr(i uint64) *uint64 {}