Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 368 for tc (0.03 sec)

  1. pkg/kubelet/cm/node_container_manager_linux_test.go

    		},
    	}
    	for idx, tc := range cpuMemCases {
    		nc := NodeConfig{
    			NodeAllocatableConfig: NodeAllocatableConfig{
    				KubeReserved:   tc.kubeReserved,
    				SystemReserved: tc.systemReserved,
    				HardEvictionThresholds: []evictionapi.Threshold{
    					{
    						Signal:   evictionapi.SignalMemoryAvailable,
    						Operator: evictionapi.OpLessThan,
    						Value:    tc.hardThreshold,
    					},
    				},
    			},
    		}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Aug 24 19:47:49 UTC 2021
    - 12.1K bytes
    - Viewed (0)
  2. pilot/pkg/model/extensions_test.go

    			},
    			want: false,
    		},
    	}
    
    	for _, tc := range cases {
    		t.Run(tc.desc, func(t *testing.T) {
    			opts := WorkloadPolicyMatcher{
    				Namespace:      "ns",
    				WorkloadLabels: tc.proxyLabels,
    				IsWaypoint:     false,
    			}
    			got := tc.wasmPlugin.MatchListener(opts, tc.listenerInfo)
    			if tc.want != got {
    				t.Errorf("MatchListener got %v want %v", got, tc.want)
    			}
    		})
    	}
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Apr 17 22:20:44 UTC 2024
    - 14.4K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apimachinery/pkg/api/validation/objectmeta_test.go

    			ExpectedErr: "",
    		},
    	}
    	for name, tc := range testcases {
    		errs := ValidateObjectMetaUpdate(&tc.New, &tc.Old, field.NewPath("field"))
    		if len(errs) == 0 {
    			if len(tc.ExpectedErr) != 0 {
    				t.Errorf("case: %q, expected error to contain %q", name, tc.ExpectedErr)
    			}
    		} else if e, a := tc.ExpectedErr, errs.ToAggregate().Error(); !strings.Contains(a, e) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Sep 07 03:12:31 UTC 2022
    - 17.8K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apiserver/pkg/cel/openapi/values_test.go

    			equal: false,
    		},
    	}
    
    	for _, tc := range cases {
    		t.Run(tc.name, func(t *testing.T) {
    			// Compare types with schema against themselves
    			if tc.lhs.Equal(tc.rhs) != types.Bool(tc.equal) {
    				t.Errorf("expected Equals to return %v", tc.equal)
    			}
    			if tc.rhs.Equal(tc.lhs) != types.Bool(tc.equal) {
    				t.Errorf("expected Equals to return %v", tc.equal)
    			}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Oct 23 22:30:17 UTC 2023
    - 17.7K bytes
    - Viewed (0)
  5. staging/src/k8s.io/apimachinery/pkg/api/errors/errors_test.go

    		},
    		{
    			name:           "Nil",
    			expectedReason: metav1.StatusReasonUnknown,
    		},
    	}
    
    	for _, tc := range testCases {
    		t.Run(tc.name, func(t *testing.T) {
    			if result := ReasonForError(tc.err); result != tc.expectedReason {
    				t.Errorf("expected reason: %q, but got known reason: %q", tc.expectedReason, result)
    			}
    		})
    	}
    }
    
    func TestIsTooManyRequestsSupportsWrappedErrors(t *testing.T) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Oct 28 07:31:28 UTC 2023
    - 19.5K bytes
    - Viewed (0)
  6. cmd/kube-apiserver/app/options/validation_test.go

    			expectErrors:         true,
    		},
    	}
    
    	for _, tc := range testCases {
    		t.Run(tc.name, func(t *testing.T) {
    			err := validateMaxCIDRRange(tc.cidr, tc.maxCIDRBits, tc.cidrFlag)
    			if err != nil && !tc.expectErrors {
    				t.Errorf("expected no errors, error found %+v", err)
    			}
    
    			if err == nil && tc.expectErrors {
    				t.Errorf("expected errors, no errors found")
    			}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 11.4K bytes
    - Viewed (0)
  7. pkg/controller/ttlafterfinished/ttlafterfinished_controller.go

    		return
    	}
    
    	tc.queue.AddAfter(key, after)
    }
    
    func (tc *Controller) worker(ctx context.Context) {
    	for tc.processNextWorkItem(ctx) {
    	}
    }
    
    func (tc *Controller) processNextWorkItem(ctx context.Context) bool {
    	key, quit := tc.queue.Get()
    	if quit {
    		return false
    	}
    	defer tc.queue.Done(key)
    
    	err := tc.processJob(ctx, key)
    	tc.handleErr(err, key)
    
    	return true
    }
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 07 23:59:28 UTC 2024
    - 10.4K bytes
    - Viewed (0)
  8. pkg/kubelet/kubelet_pods_linux_test.go

    			if tc.expectErr {
    				if err == nil || err.Error() != tc.expectedErrMsg {
    					t.Fatalf("expected error message `%s` but got `%v`", tc.expectedErrMsg, err)
    				}
    				return
    			}
    
    			// otherwise validate the mounts
    			if err != nil {
    				t.Fatal(err)
    			}
    
    			assert.Equal(t, tc.expectedMounts, mounts, "mounts of container %+v", tc.container)
    		})
    	}
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Mar 09 18:00:59 UTC 2024
    - 11.3K bytes
    - Viewed (0)
  9. pkg/scheduler/util/utils_test.go

    		},
    	}
    
    	for _, tc := range tests {
    		t.Run(tc.name, func(t *testing.T) {
    			gotOld, gotNew, err := As[*v1.Pod](tc.oldObj, tc.newObj)
    			if err != nil && !tc.wantErr {
    				t.Fatalf("unexpected error: %v", err)
    			}
    			if tc.wantErr {
    				if err == nil {
    					t.Fatalf("expected error, but got nil")
    				}
    				return
    			}
    
    			if diff := cmp.Diff(tc.wantOldObj, gotOld); diff != "" {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Sep 21 01:40:44 UTC 2023
    - 14.5K bytes
    - Viewed (0)
  10. pkg/controller/endpointslicemirroring/endpointslicemirroring_controller_test.go

    		expectedNumSlices:  1,
    	}}
    
    	for _, tc := range testCases {
    		t.Run(tc.testName, func(t *testing.T) {
    			_, ctx := ktesting.NewTestContext(t)
    			client, esController := newController(ctx, time.Duration(0))
    			tc.endpoints.Name = endpointsName
    			tc.endpoints.Namespace = namespace
    			esController.endpointsStore.Add(tc.endpoints)
    			if tc.service != nil {
    				tc.service.Name = endpointsName
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jul 12 12:57:29 UTC 2023
    - 13.9K bytes
    - Viewed (0)
Back to top