- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 767 for tc (0.02 sec)
-
pkg/registry/core/service/allocator/bitmap_test.go
max: 65535, reserved: 256, }, } for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { m := tc.allocator(tc.max, "test", tc.reserved) offset := 3 if ok, _ := m.Allocate(offset); !ok { t.Errorf("error allocate offset %v", offset) } spec, bytes := m.Snapshot() m2 := tc.allocator(10, "test", tc.reserved) err := m2.Restore(spec, bytes) if err != nil {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue May 10 08:56:31 UTC 2022 - 13.3K bytes - Viewed (0) -
pkg/controller/podautoscaler/metrics/client_test.go
tc.verifyResults(t, info, timestamp, err) } else { val, timestamp, err := metricsClient.GetObjectMetric(tc.metricName, tc.namespace, tc.singleObject, tc.metricLabelSelector) info := PodMetricsInfo{tc.singleObject.Name: {Value: val}} tc.verifyResults(t, info, timestamp, err) } } func TestRESTClientPodCPU(t *testing.T) { targetTimestamp := 1
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Nov 09 02:34:54 UTC 2021 - 16.4K bytes - Viewed (0) -
cmd/kubeadm/app/util/apiclient/idempotency_test.go
expectedError: true, }, } for _, tc := range tests { t.Run(tc.name, func(t *testing.T) { client := clientsetfake.NewSimpleClientset() tc.setupClient(client) err := CreateOrMutateConfigMap(client, &v1.ConfigMap{}, tc.mutator) if (err != nil) != tc.expectedError { t.Fatalf("expected error: %v, got %v, error: %v", tc.expectedError, err != nil, err) } }) } }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sun Feb 18 11:14:32 UTC 2024 - 33.2K bytes - Viewed (0) -
cmd/kubeadm/app/util/users/users_linux_test.go
} for i := range tc.usersToCreate { if !reflect.DeepEqual(tc.expectedUsers[i], tc.usersToCreate[i]) { t.Fatalf("expected user at position %d: %+v, got: %+v", i, tc.expectedUsers[i], tc.usersToCreate[i]) } } if len(tc.expectedGroups) != len(tc.groupsToCreate) { t.Fatalf("expected groups %d, got %d", len(tc.expectedGroups), len(tc.groupsToCreate)) }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Feb 01 05:59:41 UTC 2022 - 16.3K bytes - Viewed (0) -
pkg/kubelet/cm/topologymanager/bitmask/bitmask_test.go
bitsSet: []int{0}, bitsRemove: []int{-1, 64}, expectedMask: "01", }, } for _, tc := range tcases { mask, _ := NewBitMask(tc.bitsSet...) mask.Remove(tc.bitsRemove...) if mask.String() != tc.expectedMask { t.Errorf("Expected mask to be %v, got %v", tc.expectedMask, mask) } } } func TestAnd(t *testing.T) { tcases := []struct { name string
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Nov 03 09:45:09 UTC 2022 - 16.2K bytes - Viewed (0) -
plugin/pkg/admission/runtimeclass/admission_test.go
}), }, } for _, tc := range tests { t.Run(tc.name, func(t *testing.T) { attrs := admission.NewAttributesRecord(tc.pod, nil, core.Kind("Pod").WithVersion("version"), tc.pod.Namespace, tc.pod.Name, core.Resource("pods").WithVersion("version"), "", admission.Create, &metav1.CreateOptions{}, false, &user.DefaultInfo{}) errs := setScheduling(attrs, tc.pod, tc.runtimeClass) if tc.expectError { assert.NotEmpty(t, errs)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Mar 17 01:30:14 UTC 2022 - 17.5K bytes - Viewed (0) -
pilot/pkg/security/authz/matcher/string_test.go
MatchPattern: &matcher.StringMatcher_Exact{ Exact: "abc-exact", }, }, }, } for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { actual := StringMatcherWithPrefix(tc.v, tc.prefix) if !cmp.Equal(actual, tc.want, protocmp.Transform()) { t.Errorf("want %s but got %s", tc.want.String(), actual.String()) } }) } } func TestStringMatcherRegex(t *testing.T) {
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Thu Aug 17 22:42:11 UTC 2023 - 5.2K bytes - Viewed (0) -
security/pkg/credentialfetcher/plugin/gce_test.go
now: time.Now(), expectedRotate: true, }, } for id, tc := range testCases { t.Run(id, func(t *testing.T) { p := GCEPlugin{ tokenCache: tc.jwt, } if rotate := p.shouldRotate(tc.now); rotate != tc.expectedRotate { t.Errorf("%s, shouldRotate(%s)=%t, expected %t", id, tc.now.String(), rotate, tc.expectedRotate) } }) } } func creatJWTFile(path string) error {
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Tue Aug 03 18:09:59 UTC 2021 - 10.1K bytes - Viewed (0) -
pkg/controller/podautoscaler/replica_calculator_test.go
case objectPerPodMetric: if tc.metric.singleObject == nil { t.Fatal("Metric specified as objectMetric but metric.singleObject is nil.") }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sat Aug 19 03:31:34 UTC 2023 - 68.4K bytes - Viewed (0) -
pkg/controller/nodeipam/ipam/range_allocator_test.go
} // test function tCtx := ktesting.Init(t) for _, tc := range testCases { t.Run(tc.description, func(t *testing.T) { // Initialize the range allocator. fakeNodeInformer := test.FakeNodeInformer(tc.fakeNodeHandler) nodeList, _ := tc.fakeNodeHandler.List(tCtx, metav1.ListOptions{}) _, err := NewCIDRRangeAllocator(tCtx, tc.fakeNodeHandler, fakeNodeInformer, tc.allocatorParams, nodeList) if err == nil && tc.ctrlCreateFail {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Apr 24 10:06:15 UTC 2024 - 25.2K bytes - Viewed (0)