Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for ErrorCase (0.23 sec)

  1. pkg/apis/core/v1/validation/validation_test.go

    		t.Run(tc.name, func(t *testing.T) {
    			if errs := ValidateResourceRequirements(&tc.requirements, field.NewPath("resources")); len(errs) != 0 {
    				t.Errorf("unexpected error: %v", errs)
    			}
    		})
    	}
    
    	errorCase := []struct {
    		name                  string
    		requirements          v1.ResourceRequirements
    		skipLimitValueCheck   bool
    		skipRequestValueCheck bool
    	}{{
    		name: "Resources with Requests Larger Than Limits",
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Oct 28 07:31:28 UTC 2023
    - 11.2K bytes
    - Viewed (0)
  2. pkg/apis/apps/validation/validation_test.go

    			}
    			if len(errorCase.old.ObjectMeta.ResourceVersion) == 0 || len(errorCase.update.ObjectMeta.ResourceVersion) == 0 {
    				t.Errorf("%q has incorrect test setup with no resource version set", testName)
    			}
    			// Run the tests
    			if errs := ValidateDaemonSetUpdate(&errorCase.update, &errorCase.old, corevalidation.PodValidationOptions{}); len(errs) != errorCase.expectedErrNum {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 111.9K bytes
    - Viewed (0)
  3. pkg/apis/node/validation/validation_test.go

    			t.Errorf("%q unexpected error: %v", tc.Name, errs)
    		}
    	}
    
    	errorCase := []struct {
    		Name     string
    		overhead *node.Overhead
    	}{{
    		Name: "Invalid Resources",
    		overhead: &node.Overhead{
    			PodFixed: core.ResourceList{
    				core.ResourceName("my.org"): resource.MustParse("10m"),
    			},
    		},
    	}}
    	for _, tc := range errorCase {
    		rc := &node.RuntimeClass{
    			ObjectMeta: metav1.ObjectMeta{Name: "foo"},
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 02 07:48:42 UTC 2023
    - 6.4K bytes
    - Viewed (0)
  4. pkg/apis/networking/validation/validation_test.go

    					Ingress:     []networking.NetworkPolicyIngressRule{},
    				},
    			},
    		},
    	}
    
    	for testName, errorCase := range errorCases {
    		errorCase.old.ObjectMeta.ResourceVersion = "1"
    		errorCase.update.ObjectMeta.ResourceVersion = "1"
    		if errs := ValidateNetworkPolicyUpdate(&errorCase.update, &errorCase.old, NetworkPolicyValidationOptions{false}); len(errs) == 0 {
    			t.Errorf("expected failure: %s", testName)
    		}
    	}
    }
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Oct 31 21:05:06 UTC 2023
    - 73.3K bytes
    - Viewed (0)
  5. src/unicode/letter_test.go

    		}
    	}
    }
    
    func caseString(c int) string {
    	switch c {
    	case UpperCase:
    		return "UpperCase"
    	case LowerCase:
    		return "LowerCase"
    	case TitleCase:
    		return "TitleCase"
    	}
    	return "ErrorCase"
    }
    
    func TestTo(t *testing.T) {
    	for _, c := range caseTest {
    		r := To(c.cas, c.in)
    		if c.out != r {
    			t.Errorf("To(U+%04X, %s) = U+%04X want U+%04X", c.in, caseString(c.cas), r, c.out)
    		}
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat Sep 09 01:46:03 UTC 2023
    - 14.8K bytes
    - Viewed (0)
  6. pkg/apis/autoscaling/validation/validation_test.go

    	zeroMinReplicasCases := prepareMinReplicasCases(t, 0)
    	errorMsg := "must be greater than or equal to 1"
    
    	for _, errorCase := range zeroMinReplicasCases {
    		errs := ValidateHorizontalPodAutoscaler(&errorCase)
    		if len(errs) == 0 {
    			t.Errorf("expected failure for %q", errorMsg)
    		} else if !strings.Contains(errs[0].Error(), errorMsg) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 56.7K bytes
    - Viewed (0)
  7. pkg/apis/core/validation/validation_test.go

    				},
    				Status: core.ReplicationControllerStatus{
    					Replicas: -3,
    				},
    			},
    		},
    	}
    	for testName, errorCase := range errorCases {
    		if errs := ValidateReplicationControllerStatusUpdate(&errorCase.update, &errorCase.old); len(errs) == 0 {
    			t.Errorf("expected failure: %s", testName)
    		}
    	}
    
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 29 22:40:29 UTC 2024
    - 857.7K bytes
    - Viewed (0)
Back to top