Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 467 for testCases (0.18 sec)

  1. pkg/kubelet/cm/cpumanager/state/state_checkpoint_test.go

    	testutil "k8s.io/kubernetes/pkg/kubelet/cm/cpumanager/state/testing"
    	"k8s.io/utils/cpuset"
    )
    
    const testingCheckpoint = "cpumanager_checkpoint_test"
    
    func TestCheckpointStateRestore(t *testing.T) {
    	testCases := []struct {
    		description       string
    		checkpointContent string
    		policyName        string
    		initialContainers containermap.ContainerMap
    		expectedError     string
    		expectedState     *stateMemory
    	}{
    		{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 03 16:26:09 UTC 2023
    - 10.9K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apiserver/pkg/storage/etcd3/metrics/metrics_test.go

    	registry := metrics.NewKubeRegistry()
    	defer registry.Reset()
    	registry.Register(decodeErrorCounts)
    	resourceName := "pods"
    	testedMetrics := "apiserver_storage_decode_errors_total"
    	testCases := []struct {
    		desc     string
    		resource string
    		want     string
    	}{
    		{
    			desc:     "test success",
    			resource: resourceName,
    			want: `
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Apr 11 21:15:32 UTC 2024
    - 10.2K bytes
    - Viewed (0)
  3. pkg/kubelet/cm/cpumanager/policy_static_test.go

    		tm = topologymanager.NewFakeManagerWithHint(testCase.topologyHint)
    	}
    	cpus := cpuset.New()
    	if testCase.reservedCPUs != nil {
    		cpus = testCase.reservedCPUs.Clone()
    	}
    	policy, _ := NewStaticPolicy(testCase.topo, testCase.numReservedCPUs, cpus, tm, testCase.options)
    
    	st := &mockState{
    		assignments:   testCase.stAssignments,
    		defaultCPUSet: testCase.stDefaultCPUSet,
    	}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 40.8K bytes
    - Viewed (0)
  4. security/pkg/credentialfetcher/plugin/gce_test.go

    		"65xiNg"
    )
    
    func TestShouldRotate(t *testing.T) {
    	jwtExp := time.Date(2020, time.April, 5, 10, 13, 54, 0, time.FixedZone("PDT", -int((7*time.Hour).Seconds())))
    	testCases := map[string]struct {
    		jwt            string
    		now            time.Time
    		expectedRotate bool
    	}{
    		"remaining life time is in grace period": {
    			jwt:            thirdPartyJwt,
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Aug 03 18:09:59 UTC 2021
    - 10.1K bytes
    - Viewed (0)
  5. pkg/kubelet/cm/cpumanager/cpu_manager_test.go

    			activePods: func() []*v1.Pod {
    				return []*v1.Pod{testCase.pod}
    			},
    		}
    
    		containers := append(
    			testCase.pod.Spec.InitContainers,
    			testCase.pod.Spec.Containers...)
    
    		containerIDs := append(
    			testCase.initContainerIDs,
    			testCase.containerIDs...)
    
    		expCSets := append(
    			testCase.expInitCSets,
    			testCase.expCSets...)
    
    		cumCSet := cpuset.New()
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Oct 06 13:16:15 UTC 2023
    - 42.9K bytes
    - Viewed (0)
  6. staging/src/k8s.io/apimachinery/pkg/api/validation/objectmeta_test.go

    		t.Errorf("unexpected error message: %v", errs)
    	}
    }
    
    func TestValidateObjectMetaOwnerReferences(t *testing.T) {
    	trueVar := true
    	falseVar := false
    	testCases := []struct {
    		description          string
    		ownerReferences      []metav1.OwnerReference
    		expectError          bool
    		expectedErrorMessage string
    	}{
    		{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Sep 07 03:12:31 UTC 2022
    - 17.8K bytes
    - Viewed (0)
  7. staging/src/k8s.io/apiserver/pkg/storage/value/transformer_test.go

    		{Prefix: []byte("stale:"), Transformer: &testTransformer{from: []byte("value3"), stale: true}},
    	}
    	p := NewPrefixTransformers(testErr, transformers...)
    
    	testCases := []struct {
    		input  []byte
    		expect []byte
    		stale  bool
    		err    error
    		match  int
    	}{
    		{[]byte("first:value"), []byte("value1"), false, nil, 0},
    		{[]byte("second:value"), []byte("value2"), true, nil, 1},
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jul 18 22:44:02 UTC 2023
    - 12.8K bytes
    - Viewed (0)
  8. pkg/controller/job/backoff_utils_test.go

    	"k8s.io/utils/ptr"
    )
    
    func TestNewBackoffRecord(t *testing.T) {
    	emptyStoreInitializer := func(*backoffStore) {}
    	defaultTestTime := metav1.NewTime(time.Date(2009, time.November, 10, 23, 0, 0, 0, time.UTC))
    	testCases := map[string]struct {
    		storeInitializer  func(*backoffStore)
    		uncounted         uncountedTerminatedPods
    		newSucceededPods  []metav1.Time
    		newFailedPods     []metav1.Time
    		wantBackoffRecord backoffRecord
    	}{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Jun 06 07:46:41 UTC 2024
    - 16.7K bytes
    - Viewed (0)
  9. security/pkg/pki/util/keycertbundle_test.go

    	ecClientCertFile = "../testdata/ec-workload-cert.pem"
    	ecClientKeyFile  = "../testdata/ec-workload-key.pem"
    )
    
    func TestKeyCertBundleWithRootCertFromFile(t *testing.T) {
    	testCases := map[string]struct {
    		rootCertFile string
    		expectedErr  string
    	}{
    		"File not found": {
    			rootCertFile: "bad.pem",
    			expectedErr:  "open bad.pem: no such file or directory",
    		},
    		"With RSA root cert": {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Sun Jan 21 06:07:50 UTC 2024
    - 15.8K bytes
    - Viewed (0)
  10. staging/src/k8s.io/apiserver/pkg/storage/value/encrypt/envelope/kmsv2/envelope_test.go

    		{encryptedDEKSourceType2, encryptedDEKSource2, keyID2, annotations1},
    		{encryptedDEKSourceType2, encryptedDEKSource2, keyID2, annotations2},
    	}
    
    	for _, tc := range testCases {
    		tc := tc
    		for _, tc2 := range testCases {
    			tc2 := tc2
    			t.Run(fmt.Sprintf("%+v-%+v", tc, tc2), func(t *testing.T) {
    				key1, err1 := generateCacheKey(tc.encryptedDEKSourceType, tc.encryptedDEKSource, tc.keyID, tc.annotations)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Oct 25 16:50:20 UTC 2023
    - 47.2K bytes
    - Viewed (0)
Back to top