const hugepages2M …
const hugepages1G …
const policyTypeMock …
type testMemoryManager …
func returnPolicyByName(testCase testMemoryManager) Policy { … }
type mockPolicy …
func (p *mockPolicy) Name() string { … }
func (p *mockPolicy) Start(s state.State) error { … }
func (p *mockPolicy) Allocate(s state.State, pod *v1.Pod, container *v1.Container) error { … }
func (p *mockPolicy) RemoveContainer(s state.State, podUID string, containerName string) { … }
func (p *mockPolicy) GetTopologyHints(s state.State, pod *v1.Pod, container *v1.Container) map[string][]topologymanager.TopologyHint { … }
func (p *mockPolicy) GetPodTopologyHints(s state.State, pod *v1.Pod) map[string][]topologymanager.TopologyHint { … }
func (p *mockPolicy) GetAllocatableMemory(s state.State) []state.Block { … }
type mockRuntimeService …
func (rt mockRuntimeService) UpdateContainerResources(_ context.Context, id string, resources *runtimeapi.ContainerResources) error { … }
type mockPodStatusProvider …
func (psp mockPodStatusProvider) GetPodStatus(uid types.UID) (v1.PodStatus, bool) { … }
func getPod(podUID string, containerName string, requirements *v1.ResourceRequirements) *v1.Pod { … }
func getPodWithInitContainers(podUID string, containers []v1.Container, initContainers []v1.Container) *v1.Pod { … }
func TestValidateReservedMemory(t *testing.T) { … }
func TestConvertPreReserved(t *testing.T) { … }
func TestGetSystemReservedMemory(t *testing.T) { … }
func TestRemoveStaleState(t *testing.T) { … }
func TestAddContainer(t *testing.T) { … }
func TestRemoveContainer(t *testing.T) { … }
func TestNewManager(t *testing.T) { … }
func TestGetTopologyHints(t *testing.T) { … }
func TestAllocateAndAddPodWithInitContainers(t *testing.T) { … }
func returnMachineInfo() cadvisorapi.MachineInfo { … }