Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 263 for tc (0.04 sec)

  1. pkg/kubelet/network/dns/dns_test.go

    		},
    	}
    
    	for _, tc := range testCases {
    		options := mergeDNSOptions(tc.existingDNSConfigOptions, tc.dnsConfigOptions)
    		// Options order may be changed after conversion.
    		if !sets.New[string](options...).Equal(sets.New[string](tc.expectedOptions...)) {
    			t.Errorf("%s: mergeDNSOptions(%v, %v)=%v, want %v", tc.desc, tc.existingDNSConfigOptions, tc.dnsConfigOptions, options, tc.expectedOptions)
    		}
    	}
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 04 06:25:43 UTC 2024
    - 25.6K bytes
    - Viewed (0)
  2. pkg/kubelet/userns/userns_manager_test.go

    	assert.NoError(t, err)
    
    	for _, tc := range cases {
    		t.Run(tc.name, func(t *testing.T) {
    			// We don't validate the result. It was parsed with the json parser, we trust that.
    			_, err = m.parseUserNsFileAndRecord(types.UID(tc.name), []byte(tc.file))
    			if (tc.success && err == nil) || (!tc.success && err != nil) {
    				return
    			}
    
    			t.Errorf("expected success: %v but got error: %v", tc.success, err)
    		})
    	}
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Apr 25 14:24:16 UTC 2024
    - 14.6K bytes
    - Viewed (0)
  3. pkg/volume/csi/csi_plugin_test.go

    			shouldFail: true,
    		},
    	}
    
    	for _, tc := range testCases {
    		// Arrange & Act
    		err := PluginHandler.ValidatePlugin(tc.pluginName, tc.endpoint, tc.versions)
    
    		// Assert
    		if tc.shouldFail && err == nil {
    			t.Fatalf("expecting ValidatePlugin to fail, but got nil error for testcase: %#v", tc)
    		}
    		if !tc.shouldFail && err != nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 41.8K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apiserver/pkg/cel/library/cost_test.go

    	for _, tc := range cases {
    		t.Run(tc.name, func(t *testing.T) {
    			var targetNode checker.AstNode = testSizeNode{size: tc.targetSize}
    			argNodes := make([]checker.AstNode, len(tc.argSizes))
    			for i, arg := range tc.argSizes {
    				argNodes[i] = testSizeNode{size: arg}
    			}
    			result := est.EstimateCallCost(tc.function, tc.overload, &targetNode, argNodes)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Apr 23 17:22:44 UTC 2024
    - 40.8K bytes
    - Viewed (0)
  5. cmd/kube-proxy/app/server_test.go

    		baseYAML := fmt.Sprintf(
    			yamlTemplate, tc.bindAddress, tc.clusterCIDR,
    			tc.healthzBindAddress, tc.metricsBindAddress, tc.mode)
    
    		// Append additional configuration to the base yaml template
    		yaml := fmt.Sprintf("%s\n%s", baseYAML, tc.extraConfig)
    
    		config, err := options.loadConfig([]byte(yaml))
    
    		assert.NoError(t, err, "unexpected error for %s: %v", tc.name, err)
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Apr 22 05:08:41 UTC 2024
    - 32.3K bytes
    - Viewed (0)
  6. pkg/kubelet/cm/cpumanager/topology_hints_test.go

    		})
    		sort.SliceStable(tc.expectedHints, func(i, j int) bool {
    			return tc.expectedHints[i].LessThan(tc.expectedHints[j])
    		})
    		if !reflect.DeepEqual(tc.expectedHints, hints) {
    			t.Errorf("Expected in result to be %v , got %v", tc.expectedHints, hints)
    		}
    	}
    }
    
    func TestGetPodTopologyHints(t *testing.T) {
    	machineInfo := returnMachineInfo()
    
    	for _, tc := range returnTestCases() {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 19K bytes
    - Viewed (0)
  7. pkg/volume/projected/projected_test.go

    			success:  true,
    		},
    	}
    
    	for _, tc := range cases {
    		t.Run(tc.name, func(t *testing.T) {
    
    			testNamespace := "test_projected_namespace"
    			tc.secret.ObjectMeta = metav1.ObjectMeta{
    				Namespace: testNamespace,
    				Name:      tc.name,
    			}
    
    			source := makeProjection(tc.name, utilptr.Int32Ptr(tc.mode), "secret")
    			source.Sources[0].Secret.Items = tc.mappings
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Nov 03 18:40:48 UTC 2023
    - 40.5K bytes
    - Viewed (0)
  8. pkg/controller/job/backoff_utils_test.go

    		},
    	}
    
    	for name, tc := range testCases {
    		t.Run(name, func(t *testing.T) {
    			fakeClock := clocktesting.NewFakeClock(tc.currentTime.Truncate(time.Second))
    			d := tc.backoffRecord.getRemainingTime(fakeClock, tc.defaultBackoff, tc.maxBackoff)
    			if d.Seconds() != tc.wantDuration.Seconds() {
    				t.Errorf("Expected value of duration %v; got %v", tc.wantDuration, d)
    			}
    		})
    	}
    }
    
    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. pkg/registry/core/service/strategy_test.go

    			}),
    		},
    	}
    
    	for _, tc := range testCases {
    		t.Run(tc.name, func(t *testing.T) {
    			featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.LoadBalancerIPMode, tc.ipModeEnabled)
    			dropServiceStatusDisabledFields(tc.svc, tc.oldSvc)
    
    			if !reflect.DeepEqual(tc.svc, tc.compareSvc) {
    				t.Errorf("%v: unexpected svc spec: %v", tc.name, cmp.Diff(tc.svc, tc.compareSvc))
    			}
    		})
    	}
    }
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 32.4K bytes
    - Viewed (0)
  10. security/pkg/k8s/configutil_test.go

    			err := updateDataInConfigMap(configmaps, tc.existingConfigMap, []byte(caBundle))
    			if err != nil && err.Error() != tc.expectedErr {
    				t.Errorf("actual error (%s) different from expected error (%s).", err.Error(), tc.expectedErr)
    			}
    			if err == nil {
    				if tc.expectedErr != "" {
    					t.Errorf("expecting error %s but got no error", tc.expectedErr)
    				} else if err := checkActions(fake.Actions(), tc.expectedActions); err != nil {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Feb 08 21:58:25 UTC 2024
    - 13K bytes
    - Viewed (0)
Back to top