Search Options

Results per page
Sort
Preferred Languages
Advance

Results 71 - 80 of 113 for fakePod (0.11 sec)

  1. pkg/kubelet/kuberuntime/kuberuntime_container_test.go

    	}
    
    	// 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)
    		pattern = strings.Replace(pattern, "\\", "\\\\", -1)
    		return regexp.MustCompile(pattern).MatchString(path)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 29 22:40:29 UTC 2024
    - 28K bytes
    - Viewed (0)
  2. pkg/volume/csi/csi_plugin_test.go

    		host = volumetest.NewFakeVolumeHostWithCSINodeName(t,
    			tmpDir,
    			client,
    			ProbeVolumePlugins(),
    			"fakeNode",
    			csiDriverLister,
    			nil,
    		)
    	case kubeletVolumeHostType:
    		host = volumetest.NewFakeKubeletVolumeHostWithCSINodeName(t,
    			tmpDir,
    			client,
    			ProbeVolumePlugins(),
    			"fakeNode",
    			csiDriverLister,
    			volumeAttachmentLister,
    		)
    	case attachDetachVolumeHostType:
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 41.8K bytes
    - Viewed (0)
  3. pkg/controller/resourceclaim/controller_test.go

    	className            = "my-resource-class"
    	nodeName             = "worker"
    
    	testPod             = makePod(testPodName, testNamespace, testPodUID)
    	testPodWithResource = makePod(testPodName, testNamespace, testPodUID, *makePodResourceClaim(podResourceClaimName, templateName))
    	otherTestPod        = makePod(testPodName+"-II", testNamespace, testPodUID+"-II")
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon May 06 08:56:16 UTC 2024
    - 28.2K bytes
    - Viewed (0)
  4. cni/pkg/repair/repair_test.go

    	"istio.io/istio/tools/istio-iptables/pkg/constants"
    )
    
    func TestMatchesFilter(t *testing.T) {
    	makeDetectPod := func(name string, terminationMessage string, exitCode int) *corev1.Pod {
    		return makePod(makePodArgs{
    			PodName:     name,
    			Annotations: map[string]string{"sidecar.istio.io/status": "something"},
    			InitContainerStatus: &corev1.ContainerStatus{
    				Name: constants.ValidationContainerName,
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Oct 24 03:31:28 UTC 2023
    - 10.6K bytes
    - Viewed (0)
  5. pkg/scheduler/testing/workload_prep.go

    			Label(v1.LabelHostname, fmt.Sprintf("node%d", i)).Obj()
    		allNodes = append(allNodes, node)
    	}
    	filteredNodes = allNodes[:filteredNodesNum]
    	// build pods
    	for i := 0; i < existingPodsNum; i++ {
    		podWrapper := MakePod().Name(fmt.Sprintf("pod%d", i)).Node(fmt.Sprintf("node%d", i%allNodesNum))
    		// apply labels[0], labels[0,1], ..., labels[all] to each pod in turn
    		for _, p := range labelPairs[:i%len(labelPairs)+1] {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Jan 16 13:43:36 UTC 2023
    - 2.3K bytes
    - Viewed (0)
  6. pkg/test/framework/components/environment/kube/fake.go

    // FakeEnvironment for testing.
    type FakeEnvironment struct {
    	Name        string
    	NumClusters int
    	IDValue     string
    }
    
    func (f FakeEnvironment) ID() resource.ID {
    	return resource.FakeID(f.IDValue)
    }
    
    func (f FakeEnvironment) IsMultiCluster() bool {
    	return false
    }
    
    func (f FakeEnvironment) IsMultiNetwork() bool {
    	return false
    }
    
    func (f FakeEnvironment) EnvironmentName() string {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Jun 06 22:12:34 UTC 2024
    - 1.8K bytes
    - Viewed (0)
  7. pkg/kubelet/stats/cri_stats_provider_windows_test.go

    	fakeStats := map[string]*volume.Metrics{
    		kuberuntime.BuildContainerLogsDirectory(testPodLogDirectory, "sb0-ns", "sb0-name", types.UID("sb0-uid"), "c0"): c0LogStats,
    	}
    	fakeOS := &kubecontainertest.FakeOS{}
    	fakeHostStatsProvider := NewFakeHostStatsProviderWithData(fakeStats, fakeOS)
    
    	p := &criStatsProvider{
    		clock:             fakeClock,
    		hostStatsProvider: fakeHostStatsProvider,
    	}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Feb 17 00:02:10 UTC 2024
    - 13.8K bytes
    - Viewed (0)
  8. pkg/proxy/conntrack/conntrack_test.go

    	return []byte(""), nil, fmt.Errorf("conntrack v1.4.2 (conntrack-tools): 0 flow entries have been deleted")
    }
    
    type testCT struct {
    	execCT
    
    	fcmd *fakeexec.FakeCmd
    }
    
    func makeCT(result fakeexec.FakeAction) *testCT {
    	fcmd := &fakeexec.FakeCmd{
    		CombinedOutputScript: []fakeexec.FakeAction{result},
    	}
    	fexec := &fakeexec.FakeExec{
    		CommandScript: []fakeexec.FakeCommandAction{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Jan 15 18:08:36 UTC 2024
    - 6.7K bytes
    - Viewed (0)
  9. pkg/kubelet/stats/host_stats_provider_test.go

    			rootFsInfo: nil,
    			want:       nil,
    			wantErr:    false,
    		},
    	}
    	for _, tt := range tests {
    		t.Run(tt.name, func(t *testing.T) {
    			h := hostStatsProvider{
    				osInterface:         &kubecontainertest.FakeOS{},
    				podEtcHostsPathFunc: tt.podEtcHostsPathFunc,
    			}
    			got, err := h.getPodEtcHostsStats(tt.podUID, tt.rootFsInfo)
    			if (err != nil) != tt.wantErr {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Feb 10 11:26:59 UTC 2022
    - 1.9K bytes
    - Viewed (0)
  10. pkg/scheduler/framework/plugins/defaultbinder/default_binder_test.go

    	"k8s.io/klog/v2/ktesting"
    	frameworkruntime "k8s.io/kubernetes/pkg/scheduler/framework/runtime"
    	st "k8s.io/kubernetes/pkg/scheduler/testing"
    )
    
    func TestDefaultBinder(t *testing.T) {
    	testPod := st.MakePod().Name("foo").Namespace("ns").Obj()
    	testNode := "foohost.kubernetes.mydomain.com"
    	tests := []struct {
    		name        string
    		injectErr   error
    		wantBinding *v1.Binding
    	}{
    		{
    			name: "successful",
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 23 02:17:34 UTC 2023
    - 2.6K bytes
    - Viewed (0)
Back to top