Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 915 for tc (0.02 sec)

  1. pkg/controller/podautoscaler/metrics/utilization_test.go

    	expectedRawAverageValue    int64
    	expectedErr                error
    }
    
    func (tc *resourceUtilizationRatioTestCase) runTest(t *testing.T) {
    	actualUtilizationRatio, actualCurrentUtilization, actualRawAverageValue, actualErr := GetResourceUtilizationRatio(tc.metrics, tc.requests, tc.targetUtilization)
    
    	if tc.expectedErr != nil {
    		assert.Error(t, actualErr, "there should be an error getting the utilization ratio")
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Sep 22 08:59:02 UTC 2022
    - 4.5K bytes
    - Viewed (0)
  2. security/pkg/pki/util/san_test.go

    		},
    	}
    
    	for id, tc := range testCases {
    		actualIDs, err := ExtractIDs(tc.exts)
    		if !reflect.DeepEqual(actualIDs, tc.expectedIDs) {
    			t.Errorf("Case %q: unexpected identities: want %v but got %v", id, tc.expectedIDs, actualIDs)
    		}
    		if tc.expectedErrMsg != "" {
    			if err == nil {
    				t.Errorf("Case %q: no error message returned: want %s", id, tc.expectedErrMsg)
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Feb 12 17:36:33 UTC 2024
    - 6.5K bytes
    - Viewed (0)
  3. pkg/controller/tainteviction/taint_eviction.go

    		tc.broadcaster.StartRecordingToSink(&v1core.EventSinkImpl{Interface: tc.client.CoreV1().Events("")})
    	} else {
    		logger.Error(nil, "kubeClient is nil", "controller", tc.name)
    		klog.FlushAndExit(klog.ExitFlushTimeout, 1)
    	}
    	defer tc.broadcaster.Shutdown()
    	defer tc.nodeUpdateQueue.ShutDown()
    	defer tc.podUpdateQueue.ShutDown()
    
    	// wait for the cache to be synced
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat May 04 18:33:12 UTC 2024
    - 19.9K bytes
    - Viewed (0)
  4. cmd/kubeadm/app/cmd/version_test.go

    				err = errors.New("empty output")
    				goto error
    			}
    			if tc.shouldBeValidYAML {
    				err = yaml.Unmarshal(buf.Bytes(), &iface)
    			} else if tc.shouldBeValidJSON {
    				err = json.Unmarshal(buf.Bytes(), &iface)
    			}
    		error:
    			if (err != nil) != tc.expectedError {
    				t.Errorf("Test case %q: RunVersion expected error: %v, saw: %v; %v", tc.name, tc.expectedError, err != nil, err)
    			}
    		})
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Aug 17 14:40:46 UTC 2021
    - 2.3K bytes
    - Viewed (0)
  5. staging/src/k8s.io/apimachinery/pkg/api/meta/errors_test.go

    			matcherFunc: IsNoMatchError,
    		},
    	}
    
    	for _, tc := range testCases {
    		t.Run(tc.name, func(t *testing.T) {
    			if !errors.Is(tc.input, tc.new()) {
    				t.Error("error doesn't match itself directly")
    			}
    			if !errors.Is(fmt.Errorf("wrapepd: %w", tc.input), tc.new()) {
    				t.Error("error doesn't match itself when wrapped")
    			}
    			if !tc.matcherFunc(tc.input) {
    				t.Errorf("error doesn't get matched by matcherfunc")
    			}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Aug 11 22:50:51 UTC 2022
    - 2.4K bytes
    - Viewed (0)
  6. cmd/kubeadm/app/util/runtime/runtime_test.go

    			shouldError: true,
    		},
    	} {
    		t.Run(tc.name, func(t *testing.T) {
    			containerRuntime := NewContainerRuntime("")
    			mock := &fakeImpl{}
    			if tc.prepare != nil {
    				tc.prepare(mock)
    			}
    			containerRuntime.SetImpl(mock)
    
    			err := containerRuntime.Connect()
    
    			assert.Equal(t, tc.shouldError, err != nil)
    		})
    	}
    }
    
    func TestIsRunning(t *testing.T) {
    	for _, tc := range []struct {
    		name        string
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu May 30 06:33:22 UTC 2024
    - 11.1K bytes
    - Viewed (0)
  7. cmd/kubeadm/app/util/version_test.go

    		},
    	}
    
    	for _, tc := range cases {
    		t.Run(tc.name, func(t *testing.T) {
    			output, err := kubeadmVersion(tc.input)
    			if (err != nil) != tc.parsingError {
    				t.Fatalf("expected error: %v, got: %v", tc.parsingError, err != nil)
    			}
    			if (output != tc.output) != tc.outputError {
    				t.Fatalf("expected output: %s, got: %s, for input: %s", tc.output, output, tc.input)
    			}
    		})
    	}
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Apr 26 03:30:51 UTC 2024
    - 15K bytes
    - Viewed (0)
  8. staging/src/k8s.io/apimachinery/pkg/util/net/port_range_test.go

    	}
    
    	for i := range testCases {
    		tc := &testCases[i]
    		pr := &PortRange{}
    		var f flag.Value = pr
    		err := f.Set(tc.input)
    		if err != nil && tc.success {
    			t.Errorf("expected success, got %q", err)
    			continue
    		} else if err == nil && !tc.success {
    			t.Errorf("expected failure %#v", testCases[i])
    			continue
    		} else if tc.success {
    			if f.String() != tc.expected {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Sep 05 02:24:38 UTC 2023
    - 2.1K bytes
    - Viewed (0)
  9. pkg/config/gateway/gateway_test.go

    			expected:            true,
    		},
    	}
    	for _, tc := range cases {
    		t.Run(tc.name, func(t *testing.T) {
    			test.SetForTest(t, &features.EnableQUICListeners, tc.enableQUICListeners)
    			actual := IsEligibleForHTTP3Upgrade(tc.server)
    			if actual != tc.expected {
    				t.Errorf("IsEligibleForHTTP3Upgrade(%s) => %t, want %t",
    					tc.server, actual, tc.expected)
    			}
    		})
    	}
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Dec 26 05:53:25 UTC 2022
    - 10.5K bytes
    - Viewed (0)
  10. pkg/controller/nodeipam/ipam/sync/sync_test.go

    		}
    
    		var hasError bool
    		for _, r := range tc.fake.results {
    			hasError = hasError || (r != nil)
    		}
    		if hasError != tc.wantError {
    			t.Errorf("%v, %v; hasError = %t, errors = %v, want %t",
    				tc.desc, tc.mode, hasError, tc.fake.events, tc.wantError)
    		}
    	}
    }
    
    func TestNodeSyncResync(t *testing.T) {
    	logger, _ := ktesting.NewTestContext(t)
    	fake := &fakeAPIs{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jul 05 23:39:52 UTC 2023
    - 7.6K bytes
    - Viewed (0)
Back to top