Search Options

Results per page
Sort
Preferred Languages
Advance

Results 121 - 130 of 1,281 for testCases (0.13 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/api/storage/util_test.go

    	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
    	"k8s.io/apimachinery/pkg/util/sets"
    
    	"k8s.io/kubernetes/pkg/apis/core"
    	"k8s.io/kubernetes/pkg/apis/storage"
    )
    
    func TestStorageClassWarnings(t *testing.T) {
    	testcases := []struct {
    		name     string
    		template *storage.StorageClass
    		expected []string
    	}{
    		{
    			name:     "null",
    			template: nil,
    			expected: nil,
    		},
    		{
    			name: "no warning",
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Sep 25 11:04:08 UTC 2023
    - 4.5K bytes
    - Viewed (0)
  4. 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)
  5. 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)
  6. pkg/kubelet/cm/util/cdi/cdi_test.go

    limitations under the License.
    */
    
    package cdi
    
    import (
    	"testing"
    
    	"github.com/stretchr/testify/assert"
    	"k8s.io/kubernetes/pkg/kubelet/container"
    )
    
    func TestGenerateAnnotations(t *testing.T) {
    	testCases := []struct {
    		description         string
    		deviceIDs           []string
    		expecteError        error
    		expectedAnnotations []container.Annotation
    	}{
    		{
    			description: "no devices",
    			deviceIDs:   []string{},
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jul 11 09:47:53 UTC 2023
    - 1.5K bytes
    - Viewed (0)
  7. pkg/kubelet/util/swap/swap_util_test.go

    See the License for the specific language governing permissions and
    limitations under the License.
    */
    
    package swap
    
    import "testing"
    
    func TestIsSwapEnabled(t *testing.T) {
    	testCases := []struct {
    		name             string
    		procSwapsContent string
    		expectedEnabled  bool
    	}{
    		{
    			name:             "empty",
    			procSwapsContent: "",
    			expectedEnabled:  false,
    		},
    		{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 21 10:18:16 UTC 2024
    - 1.6K 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. staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/unstructured_conversion_test.go

    		},
    	}
    	for _, testCase := range testCases {
    		t.Run(testCase.name, func(t *testing.T) {
    			defer func() {
    				v := recover()
    				assert.Equal(t, testCase.expectPanic, v != nil, "unexpected panic")
    			}()
    			// Convert by specifying destination object
    			outObject, err := scheme.ConvertToVersion(testCase.unstructuredToConvert, testCase.targetGV)
    			if testCase.expectedErrFunc != nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Apr 07 15:19:26 UTC 2020
    - 16.4K bytes
    - Viewed (0)
  10. 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)
Back to top