Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 26 for testCases (0.3 sec)

  1. pkg/kubelet/eviction/helpers_test.go

    			equal: false,
    		},
    	}
    
    	for i, testCase := range testCases {
    		if compareThresholdValue(testCase.a, testCase.b) != testCase.equal ||
    			compareThresholdValue(testCase.b, testCase.a) != testCase.equal {
    			t.Errorf("Test case: %v failed", i)
    		}
    	}
    }
    func TestAddContainerFsThresholds(t *testing.T) {
    	gracePeriod := time.Duration(1)
    	testCases := []struct {
    		description                   string
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 15 23:14:12 UTC 2024
    - 106.7K bytes
    - Viewed (0)
  2. pkg/config/validation/validation_test.go

    		})
    	}
    }
    
    func TestValidateHTTPHeaderName(t *testing.T) {
    	testCases := []struct {
    		name  string
    		valid bool
    	}{
    		{name: "header1", valid: true},
    		{name: "X-Requested-With", valid: true},
    		{name: "", valid: false},
    	}
    
    	for _, tc := range testCases {
    		if got := ValidateHTTPHeaderName(tc.name); (got == nil) != tc.valid {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Apr 30 03:11:45 UTC 2024
    - 196K bytes
    - Viewed (0)
  3. pkg/api/pod/util_test.go

    			},
    		},
    	}
    	for _, tc := range testCases {
    		t.Run(tc.desc, func(t *testing.T) {
    			MarkPodProposedForResize(tc.oldPod, tc.newPod)
    			if diff := cmp.Diff(tc.expectedPod, tc.newPod); diff != "" {
    				t.Errorf("unexpected pod spec (-want, +got):\n%s", diff)
    			}
    		})
    	}
    }
    
    func TestDropClusterTrustBundleProjectedVolumes(t *testing.T) {
    	testCases := []struct {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 29 22:40:29 UTC 2024
    - 108.8K bytes
    - Viewed (0)
  4. cmd/object-handlers_test.go

    				getPutObjectURL("", testCase.bucketName, testCase.objectName),
    				int64(testCase.dataLen), testCase.chunkSize, bytes.NewReader(testCase.data),
    				testCase.accessKey, testCase.secretKey)
    		case testCase.contentEncoding == "":
    			req, err = newTestStreamingSignedRequest(http.MethodPut,
    				getPutObjectURL("", testCase.bucketName, testCase.objectName),
    				int64(testCase.dataLen), testCase.chunkSize, bytes.NewReader(testCase.data),
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Mon Jun 10 15:50:49 UTC 2024
    - 161.9K bytes
    - Viewed (0)
  5. pkg/proxy/ipvs/proxier_test.go

    				t.Errorf("Case [%d], unexpected add IPVS virtual server error: %v", i, err)
    			}
    		}
    		if err := proxier.syncService(testCases[i].svcName, testCases[i].newVirtualServer, testCases[i].bindAddr, testCases[i].alreadyBoundAddrs); err != nil {
    			t.Errorf("Case [%d], unexpected sync IPVS virtual server error: %v", i, err)
    		}
    		// check
    		list, err := proxier.ipvs.GetVirtualServers()
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Apr 27 01:31:57 UTC 2024
    - 186.8K bytes
    - Viewed (0)
  6. staging/src/k8s.io/apiserver/pkg/registry/generic/registry/store_test.go

    		if pod.Annotations == nil {
    			pod.Annotations = make(map[string]string)
    		}
    		pod.Annotations[key] = "true"
    	}
    	mile := func(s string) {
    		milestones = append(milestones, s)
    	}
    
    	testCases := []struct {
    		name        string
    		decorator   func(runtime.Object)
    		beginCreate BeginCreateFunc
    		afterCreate AfterCreateFunc
    		// the TTLFunc is an easy hook to force a failure
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jun 12 10:12:02 UTC 2024
    - 101.8K bytes
    - Viewed (0)
  7. pkg/kubelet/eviction/eviction_manager_test.go

    func TestPIDPressure_VerifyPodStatus(t *testing.T) {
    	testCases := map[string]struct {
    		wantPodStatus v1.PodStatus
    	}{
    		"eviction due to pid pressure": {
    			wantPodStatus: v1.PodStatus{
    				Phase:   v1.PodFailed,
    				Reason:  "Evicted",
    				Message: "The node was low on resource: pids. Threshold quantity: 1200, available: 500. ",
    			},
    		},
    	}
    	for name, tc := range testCases {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 15 23:14:12 UTC 2024
    - 119.9K bytes
    - Viewed (0)
  8. pkg/proxy/nftables/proxier_test.go

    				},
    			},
    		},
    	}
    
    	for _, testcase := range testcases {
    		t.Run(testcase.name, func(t *testing.T) {
    			nft, fp := NewFakeProxier(v1.IPv4Protocol)
    			fp.OnServiceSynced()
    			fp.OnEndpointSlicesSynced()
    
    			fp.OnServiceAdd(service)
    
    			fp.OnEndpointSliceAdd(testcase.endpointslice)
    			fp.syncProxyRules()
    			runPacketFlowTests(t, testcase.line, nft, testNodeIPs, testcase.flowTests)
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Apr 27 01:31:57 UTC 2024
    - 173.5K bytes
    - Viewed (0)
  9. pkg/kubelet/kubelet_pods_test.go

    fe00::2	ip6-allrouters
    203.0.113.1	podFoo.domainFoo	podFoo
    fd00::6	podFoo.domainFoo	podFoo
    `,
    		},
    	}
    
    	for _, testCase := range testCases {
    		actualContent := managedHostsFileContent(testCase.hostIPs, testCase.hostName, testCase.hostDomainName, testCase.hostAliases)
    		assert.Equal(t, testCase.expectedContent, string(actualContent), "hosts file content not expected")
    	}
    }
    
    func TestRunInContainerNoSuchPod(t *testing.T) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jun 07 00:05:23 UTC 2024
    - 198.8K bytes
    - Viewed (0)
  10. pkg/controller/job/job_controller_test.go

    	newPod.ResourceVersion = "2"
    
    	testCases := map[string]struct {
    		requeues    int
    		oldPodPhase v1.PodPhase
    		phase       v1.PodPhase
    		wantBackoff time.Duration
    	}{
    		"failure with pod updates batching": {
    			requeues:    0,
    			phase:       v1.PodFailed,
    			wantBackoff: syncJobBatchPeriod,
    		},
    	}
    
    	for name, tc := range testCases {
    		t.Run(name, func(t *testing.T) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 11 15:36:36 UTC 2024
    - 229.2K bytes
    - Viewed (0)
Back to top