Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for fakeContainer (0.47 sec)

  1. pkg/kubelet/cm/cpumanager/topology_hints_test.go

    	testPod1 := makePod("fakePod", "fakeContainer", "2", "2")
    	testContainer1 := &testPod1.Spec.Containers[0]
    	testPod2 := makePod("fakePod", "fakeContainer", "5", "5")
    	testContainer2 := &testPod2.Spec.Containers[0]
    	testPod3 := makePod("fakePod", "fakeContainer", "7", "7")
    	testContainer3 := &testPod3.Spec.Containers[0]
    	testPod4 := makePod("fakePod", "fakeContainer", "11", "11")
    	testContainer4 := &testPod4.Spec.Containers[0]
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 19K bytes
    - Viewed (0)
  2. pkg/kubelet/kuberuntime/kuberuntime_manager_test.go

    func makeFakeContainers(t *testing.T, m *kubeGenericRuntimeManager, templates []containerTemplate) []*apitest.FakeContainer {
    	var fakeContainers []*apitest.FakeContainer
    	for _, template := range templates {
    		fakeContainers = append(fakeContainers, makeFakeContainer(t, m, template))
    	}
    	return fakeContainers
    }
    
    // makeTestContainer creates a test api container.
    func makeTestContainer(name, image string) v1.Container {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jun 14 16:09:17 UTC 2024
    - 96K bytes
    - Viewed (0)
  3. pkg/kubelet/stats/cri_stats_provider_test.go

    	return p
    }
    
    func makeFakeContainer(sandbox *critest.FakePodSandbox, name string, attempt uint32, terminated bool) *critest.FakeContainer {
    	sandboxID := sandbox.PodSandboxStatus.Id
    	c := &critest.FakeContainer{
    		SandboxID: sandboxID,
    		ContainerStatus: runtimeapi.ContainerStatus{
    			Metadata:  &runtimeapi.ContainerMetadata{Name: name, Attempt: attempt},
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Apr 25 14:24:16 UTC 2024
    - 54.5K bytes
    - Viewed (0)
  4. pkg/kubelet/logs/container_log_manager_test.go

    		f, err := os.Create(filepath.Join(dir, testLogs[i]))
    		require.NoError(t, err)
    		_, err = f.Write([]byte(testContent[i]))
    		require.NoError(t, err)
    		f.Close()
    	}
    	testContainers := []*critest.FakeContainer{
    		{
    			ContainerStatus: runtimeapi.ContainerStatus{
    				Id:      "container-not-need-rotate",
    				State:   runtimeapi.ContainerState_CONTAINER_RUNNING,
    				LogPath: filepath.Join(dir, testLogs[0]),
    			},
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat May 04 18:33:12 UTC 2024
    - 12.7K bytes
    - Viewed (0)
  5. pkg/kubelet/cm/cpumanager/policy_static_test.go

    			topo:          topoSingleSocketHT,
    			podUID:        "fakePod",
    			containerName: "fakeContainer1",
    			stAssignments: state.ContainerCPUAssignments{
    				"fakePod": map[string]cpuset.CPUSet{
    					"fakeContainer1": cpuset.New(1, 2, 3),
    					"fakeContainer2": cpuset.New(4, 5, 6, 7),
    				},
    			},
    			stDefaultCPUSet: cpuset.New(),
    			expCSet:         cpuset.New(1, 2, 3),
    		},
    		{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 40.8K bytes
    - Viewed (0)
  6. pkg/kubelet/images/image_gc_manager_test.go

    			Containers: []*container.Container{
    				makeContainer(0),
    				makeContainer(1),
    			},
    		}},
    	}
    
    	// Make 1 be more recently used than 0.
    	_, err := manager.detectImages(ctx, zero)
    	require.NoError(t, err)
    	fakeRuntime.AllPodList = []*containertest.FakePod{
    		{Pod: &container.Pod{
    			Containers: []*container.Container{
    				makeContainer(1),
    			},
    		}},
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 22 15:38:20 UTC 2024
    - 29.2K bytes
    - Viewed (0)
  7. pkg/scheduler/framework/preemption/preemption_test.go

    				st.MakePod().Name("p1.1").UID("p1.1").Node("node1").Priority(midPriority).Containers([]v1.Container{
    					st.MakeContainer().Name("container1").Obj(),
    					st.MakeContainer().Name("container2").Obj(),
    				}).Obj(),
    				st.MakePod().Name("p2.1").UID("p2.1").Node("node2").Priority(midPriority).Containers([]v1.Container{
    					st.MakeContainer().Name("container1").Obj(),
    				}).Obj(),
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 31 15:52:16 UTC 2024
    - 18.7K bytes
    - Viewed (0)
  8. pkg/kubelet/kuberuntime/kuberuntime_container_test.go

    					Image:           "busybox",
    					ImagePullPolicy: v1.PullIfNotPresent,
    				},
    			},
    		},
    	}
    
    	// Create fake sandbox and container
    	_, fakeContainers := makeAndSetFakePod(t, m, fakeRuntime, pod)
    	assert.Equal(t, len(fakeContainers), 1)
    
    	containerID := fakeContainers[0].Id
    	fakeOS := m.osInterface.(*containertest.FakeOS)
    	fakeOS.GlobFn = func(pattern, path string) bool {
    		pattern = strings.Replace(pattern, "*", ".*", -1)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 29 22:40:29 UTC 2024
    - 28K bytes
    - Viewed (0)
  9. pkg/scheduler/testing/wrappers.go

    func (s *LabelSelectorWrapper) Obj() *metav1.LabelSelector {
    	return &s.LabelSelector
    }
    
    // ContainerWrapper wraps a Container inside.
    type ContainerWrapper struct{ v1.Container }
    
    // MakeContainer creates a Container wrapper.
    func MakeContainer() *ContainerWrapper {
    	return &ContainerWrapper{v1.Container{}}
    }
    
    // Obj returns the inner Container.
    func (c *ContainerWrapper) Obj() v1.Container {
    	return c.Container
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon May 27 07:57:10 UTC 2024
    - 42.1K bytes
    - Viewed (0)
  10. pkg/api/pod/util_test.go

    			// preStop
    			// container
    			{
    				oldPod := makePod([]api.Container{makeContainer(tc.oldLifecycleHandler.DeepCopy(), nil)}, nil, nil)
    				newPod := makePod([]api.Container{makeContainer(tc.newLifecycleHandler.DeepCopy(), nil)}, nil, nil)
    				expectPod := makePod([]api.Container{makeContainer(tc.expectLifecycleHandler.DeepCopy(), nil)}, nil, nil)
    				dropDisabledFields(newPod, nil, oldPod, nil)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 29 22:40:29 UTC 2024
    - 108.8K bytes
    - Viewed (0)
Back to top