Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 32 for fakePod (0.18 sec)

  1. 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)
  2. 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)
  3. 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)
  4. 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)
  5. pkg/volume/flexvolume/common_test.go

    		}
    		cmdArgs := args[1:]
    		if !sameArgs(cmdArgs, expectedArgs) {
    			t.Errorf("Wrong args for %s: got %v, expected %v", args[0], cmdArgs, expectedArgs)
    		}
    		return &exectesting.FakeCmd{
    			Argv:                 args,
    			CombinedOutputScript: []exectesting.FakeAction{output},
    		}
    	}
    }
    
    func fakeRunner(fakeCommands ...exectesting.FakeCommandAction) exec.Interface {
    	return &exectesting.FakeExec{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Aug 01 15:56:32 UTC 2022
    - 3.5K bytes
    - Viewed (0)
  6. pkg/scheduler/framework/plugins/helper/spread_test.go

    				},
    			},
    		}
    		services = append(services, service)
    		fakeInformerFactory.Core().V1().Services().Informer().GetStore().Add(service)
    	}
    	var pods []*v1.Pod
    	for i := 0; i < 5; i++ {
    		pod := st.MakePod().Name(fmt.Sprintf("test-pod-%d", i)).
    			Namespace("test").
    			Label("app", fmt.Sprintf("test-%d", i)).
    			Label("label", fmt.Sprintf("label-%d", i)).
    			Obj()
    		pods = append(pods, pod)
    	}
    
    	tests := []struct {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu May 05 17:48:55 UTC 2022
    - 2.5K bytes
    - Viewed (0)
  7. pkg/scheduler/framework/plugins/volumebinding/test_utils.go

    	pvcb.PersistentVolumeClaim.Status = v1.PersistentVolumeClaimStatus{
    		Phase: phase,
    	}
    	return pvcb
    }
    
    type podBuilder struct {
    	*v1.Pod
    }
    
    func makePod(name string) podBuilder {
    	pb := podBuilder{Pod: &v1.Pod{
    		ObjectMeta: metav1.ObjectMeta{
    			Name:      name,
    			Namespace: v1.NamespaceDefault,
    		},
    	}}
    	pb.Pod.Spec.Volumes = make([]v1.Volume, 0)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Sep 13 07:42:19 UTC 2023
    - 4.9K bytes
    - Viewed (0)
  8. pkg/kubelet/stats/host_stats_provider_fake.go

    }
    
    // NewFakeHostStatsProvider provides a way to test with fake host statistics
    func NewFakeHostStatsProvider() HostStatsProvider {
    	return &fakeHostStatsProvider{
    		osInterface: &kubecontainertest.FakeOS{},
    	}
    }
    
    // NewFakeHostStatsProviderWithData provides a way to test with fake host statistics
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Feb 16 17:57:17 UTC 2024
    - 3.9K bytes
    - Viewed (0)
  9. pkg/kubelet/runonce_test.go

    		mirrorPodClient:  podtest.NewFakeMirrorClient(),
    		podManager:       podManager,
    		podWorkers:       &fakePodWorkers{},
    		os:               &containertest.FakeOS{},
    		containerRuntime: fakeRuntime,
    		reasonCache:      NewReasonCache(),
    		clock:            clock.RealClock{},
    		kubeClient:       &fake.Clientset{},
    		hostname:         testKubeletHostname,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Apr 18 06:59:54 UTC 2024
    - 6.5K bytes
    - Viewed (0)
  10. pkg/kubemark/hollow_kubelet.go

    		RemoteRuntimeService:      runtimeService,
    		RemoteImageService:        imageService,
    		CAdvisorInterface:         cadvisorInterface,
    		Cloud:                     nil,
    		OSInterface:               &containertest.FakeOS{},
    		ContainerManager:          containerManager,
    		VolumePlugins:             volumePlugins(),
    		TLSOptions:                nil,
    		OOMAdjuster:               oom.NewFakeOOMAdjuster(),
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jun 07 17:10:54 UTC 2024
    - 7.8K bytes
    - Viewed (0)
Back to top