Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 316 for tc (0.02 sec)

  1. pkg/controller/podautoscaler/horizontal_test.go

    	tc.Lock()
    
    	tc.scaleUpdated = false
    	tc.statusUpdated = false
    	tc.eventCreated = false
    	tc.processed = make(chan string, 100)
    	if tc.CPUCurrent == 0 {
    		tc.computeCPUCurrent()
    	}
    
    	if tc.resource == nil {
    		tc.resource = &fakeResource{
    			name:       "test-rc",
    			apiVersion: "v1",
    			kind:       "ReplicationController",
    		}
    	}
    	tc.Unlock()
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Apr 25 14:24:16 UTC 2024
    - 199.3K bytes
    - Viewed (0)
  2. pkg/test/framework/resource/version_test.go

    			IstioVersion(""),
    			0,
    		},
    		{
    			IstioVersion(""),
    			IstioVersion("1.9"),
    			1,
    		},
    	}
    
    	for _, tc := range tcs {
    		t.Run(fmt.Sprintf("compare version %s->%s", tc.a, tc.b), func(t *testing.T) {
    			r := tc.a.Compare(tc.b)
    			if r != tc.result {
    				t.Errorf("expected %d, got %d", tc.result, r)
    			}
    		})
    	}
    }
    
    func TestMinimumIstioVersion(t *testing.T) {
    	tcs := []struct {
    		name     string
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Apr 22 18:13:40 UTC 2024
    - 2.9K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apiserver/pkg/endpoints/handlers/rest_test.go

    	tc.startingPod.ResourceVersion = "2"
    	tc.startingPod.APIVersion = examplev1.SchemeGroupVersion.String()
    
    	// pod with rv=3 is found when attempting to persist the update
    	tc.updatePod.Name = name
    	tc.updatePod.Namespace = namespace
    	tc.updatePod.UID = uid
    	tc.updatePod.ResourceVersion = "3"
    	tc.updatePod.APIVersion = examplev1.SchemeGroupVersion.String()
    
    	// patches are submitted with a rv=2
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 28 08:48:22 UTC 2024
    - 41.8K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apiextensions-apiserver/pkg/registry/customresource/strategy_test.go

    				},
    			},
    		},
    	}
    	for _, tc := range tcs {
    		if tc.statusEnabled {
    			strategy.status = &apiextensions.CustomResourceSubresourceStatus{}
    		} else {
    			strategy.status = nil
    		}
    		strategy.PrepareForUpdate(context.TODO(), tc.obj, tc.old)
    		if !reflect.DeepEqual(tc.obj, tc.expected) {
    			t.Errorf("test %q failed: expected: %v, got %v", tc.name, tc.expected, tc.obj)
    		}
    	}
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 8.2K bytes
    - Viewed (0)
  5. pkg/controller/job/indexed_job_utils_test.go

    		},
    	}
    	for name, tc := range cases {
    		t.Run(name, func(t *testing.T) {
    			featuregatetesting.SetFeatureGateDuringTest(t, feature.DefaultFeatureGate, features.JobBackoffLimitPerIndex, true)
    			activePods := controller.FilterActivePods(logger, tc.pods)
    			failedIndexes := calculateFailedIndexes(logger, &tc.job, tc.pods)
    			_, succeededIndexes := calculateSucceededIndexes(logger, &tc.job, tc.pods)
    			jobCtx := &syncJobCtx{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 27.9K bytes
    - Viewed (0)
  6. pkg/kubelet/types/pod_status_test.go

    		v1.PodReadyToStartContainers,
    	}
    
    	for _, tc := range trueCases {
    		if !PodConditionByKubelet(tc) {
    			t.Errorf("Expect %q to be condition owned by kubelet.", tc)
    		}
    	}
    
    	falseCases := []v1.PodConditionType{
    		v1.PodConditionType("abcd"),
    		v1.PodConditionType(v1.PodReasonUnschedulable),
    	}
    
    	for _, tc := range falseCases {
    		if PodConditionByKubelet(tc) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 2.2K bytes
    - Viewed (0)
  7. staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/cel/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: Thu May 16 20:13:14 UTC 2024
    - 17.3K bytes
    - Viewed (0)
  8. 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)
  9. pkg/scheduler/framework/plugins/dynamicresources/dynamicresources_test.go

    		},
    	}
    
    	for name, tc := range testcases {
    		// We can run in parallel because logging is per-test.
    		tc := tc
    		t.Run(name, func(t *testing.T) {
    			t.Parallel()
    			nodes := tc.nodes
    			if nodes == nil {
    				nodes = []*v1.Node{workerNode}
    			}
    			testCtx := setup(t, nodes, tc.claims, tc.classes, tc.schedulings, tc.objs)
    			testCtx.p.enabled = !tc.disable
    			initialObjects := testCtx.listAll(t)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon May 27 07:57:10 UTC 2024
    - 61.9K bytes
    - Viewed (0)
  10. 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)
Back to top