Search Options

Results per page
Sort
Preferred Languages
Advance

Results 141 - 150 of 465 for testCases (0.61 sec)

  1. pkg/kubelet/prober/prober_manager_test.go

    	defer cleanup(t, m)
    	featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.SidecarContainers, true)
    	if err := expectProbes(m, nil); err != nil {
    		t.Error(err)
    	}
    
    	testCases := []struct {
    		desc                    string
    		probePaths              []probeKey
    		enableSidecarContainers bool
    	}{
    		{
    			desc:                    "pod with sidecar (no sidecar containers feature enabled)",
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 18.8K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apiserver/pkg/admission/plugin/webhook/request/admissionreview_test.go

    	emptyv1beta1Patch := admissionv1beta1.PatchType("")
    	emptyv1Patch := admissionv1.PatchType("")
    
    	invalidv1beta1Patch := admissionv1beta1.PatchType("Foo")
    	invalidv1Patch := admissionv1.PatchType("Foo")
    
    	testcases := []struct {
    		name     string
    		uid      types.UID
    		mutating bool
    		review   runtime.Object
    
    		expectAuditAnnotations map[string]string
    		expectAllowed          bool
    		expectPatch            []byte
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Mar 07 16:56:12 UTC 2023
    - 20.1K bytes
    - Viewed (0)
  3. pkg/client/tests/remotecommand_test.go

    				localErr := &bytes.Buffer{}
    
    				requestReceived := make(chan struct{})
    				server := httptest.NewServer(fakeServer(t, requestReceived, name, exec, testCase.Stdin, testCase.Stdout, testCase.Stderr, testCase.Error, testCase.Tty, testCase.MessageCount, testCase.ServerProtocols))
    				defer server.Close()
    
    				url, _ := url.ParseRequestURI(server.URL)
    				config := restclient.ClientContentConfig{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Jun 05 06:08:18 UTC 2023
    - 10.2K bytes
    - Viewed (0)
  4. internal/config/certs_test.go

    			t.Fatalf("error: expected = <nil>, got = %v", err)
    		}
    		if testCase.expectedErr && err == nil {
    			t.Fatal("error: expected err, got = <nil>")
    		}
    		if len(certs) != testCase.expectedResultLen {
    			t.Fatalf("certs: expected = %v, got = %v", testCase.expectedResultLen, len(certs))
    		}
    	}
    }
    
    func TestLoadX509KeyPair(t *testing.T) {
    	t.Cleanup(func() {
    		os.Unsetenv(EnvCertPassword)
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Mon Sep 19 18:05:16 UTC 2022
    - 21.6K bytes
    - Viewed (0)
  5. staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/validation/metrics_test.go

    	validation.Metrics = testMetrics
    	defer func() {
    		validation.Metrics = testMetrics.original
    	}()
    
    	metricNames := []string{
    		"apiextensions_apiserver_validation_ratcheting_seconds",
    	}
    
    	testCases := []struct {
    		desc   string
    		obj    *unstructured.Unstructured
    		old    *unstructured.Unstructured
    		schema apiextensions.JSONSchemaProps
    		iters  int // how many times to validate the same update before checking metric
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 10.9K bytes
    - Viewed (1)
  6. pkg/scheduler/apis/config/scheme/scheme_test.go

    	"sigs.k8s.io/yaml"
    )
    
    // TestCodecsDecodePluginConfig tests that embedded plugin args get decoded
    // into their appropriate internal types and defaults are applied.
    func TestCodecsDecodePluginConfig(t *testing.T) {
    	testCases := []struct {
    		name         string
    		data         []byte
    		wantErr      string
    		wantProfiles []config.KubeSchedulerProfile
    	}{
    		// v1 tests
    		{
    			name: "v1 all plugin args in default profile",
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Sep 13 07:42:19 UTC 2023
    - 22.2K bytes
    - Viewed (0)
  7. pkg/util/taints/taints_test.go

    	}
    
    	taintNew := v1.Taint{
    		Key:    "foo_1",
    		Value:  "bar_1",
    		Effect: v1.TaintEffectNoSchedule,
    	}
    
    	taintUpdateValue := taint
    	taintUpdateValue.Value = "bar_1"
    
    	testcases := []struct {
    		name           string
    		node           *v1.Node
    		taint          *v1.Taint
    		expectedUpdate bool
    		expectedTaints []v1.Taint
    	}{
    		{
    			name:           "add a new taint",
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Sep 16 09:23:35 UTC 2022
    - 22.6K bytes
    - Viewed (0)
  8. pkg/util/iptree/iptree_test.go

    )
    
    func Test_InsertGetDelete(t *testing.T) {
    	testCases := []struct {
    		name   string
    		prefix netip.Prefix
    	}{
    		{
    			name:   "ipv4",
    			prefix: netip.MustParsePrefix("192.168.0.0/24"),
    		},
    		{
    			name:   "ipv6",
    			prefix: netip.MustParsePrefix("fd00:1:2:3::/124"),
    		},
    	}
    
    	for _, tc := range testCases {
    		t.Run(tc.name, func(t *testing.T) {
    			tree := New[int]()
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Oct 31 21:05:04 UTC 2023
    - 17.8K bytes
    - Viewed (0)
  9. pkg/kubelet/container/helpers_test.go

    							},
    						},
    					},
    				},
    			},
    			expectedResult: true,
    		},
    	}
    
    	for _, testCase := range testCases {
    		t.Run(testCase.name, func(t *testing.T) {
    			pod := &v1.Pod{}
    			pod.Spec = *testCase.podSpec
    			result := HasWindowsHostProcessContainer(pod)
    			assert.Equal(t, result, testCase.expectedResult)
    		})
    	}
    }
    
    func TestHashContainerWithoutResources(t *testing.T) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 22 01:55:46 UTC 2024
    - 24.5K bytes
    - Viewed (0)
  10. staging/src/k8s.io/apiserver/pkg/storage/etcd3/watcher_test.go

    			watchKey:         "/pods/",
    			watcherMaxLimit:  1,
    			expectEventCount: 2,
    			expectGetCount:   2,
    		},
    	}
    
    	for _, testCase := range testCases {
    		t.Run(testCase.name, func(t *testing.T) {
    			defaultWatcherMaxLimit = testCase.watcherMaxLimit
    
    			origCtx, store, _ := testSetup(t)
    			initList, err := initStoreData(origCtx, store)
    			if err != nil {
    				t.Fatal(err)
    			}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 12.3K bytes
    - Viewed (1)
Back to top