Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 422 for tc (0.04 sec)

  1. 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)
  2. 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)
  3. staging/src/k8s.io/apiserver/pkg/admission/plugin/webhook/mutating/dispatcher_test.go

    		},
    	}
    
    	for _, tc := range tcs {
    		actual, err := mutationAnnotationValue(tc.config, tc.webhook, tc.mutated)
    		assert.NoError(t, err, "unexpected error")
    		if actual != tc.expected {
    			t.Errorf("composed mutation annotation value doesn't match, want: %s, got: %s", tc.expected, actual)
    		}
    	}
    }
    
    func TestJSONPatchAnnotationValue(t *testing.T) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 28 08:48:22 UTC 2024
    - 4.3K bytes
    - Viewed (0)
  4. src/errors/wrap_test.go

    		{multiErr{poser}, err1, true},
    		{multiErr{poser}, err3, true},
    		{multiErr{nil}, nil, false},
    	}
    	for _, tc := range testCases {
    		t.Run("", func(t *testing.T) {
    			if got := errors.Is(tc.err, tc.target); got != tc.match {
    				t.Errorf("Is(%v, %v) = %v, want %v", tc.err, tc.target, got, tc.match)
    			}
    		})
    	}
    }
    
    type poser struct {
    	msg string
    	f   func(error) bool
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Apr 03 22:49:49 UTC 2024
    - 6K bytes
    - Viewed (0)
  5. 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)
  6. 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)
  7. 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)
  8. tools/istio-iptables/pkg/config/validation_test.go

    		},
    		{
    			name:    "capture all but 1000 groups",
    			exclude: NOwnerGroups(1000), // we don't have to put a limit on the number of groups to exclude
    		},
    	}
    	for _, tc := range cases {
    		t.Run(tc.name, func(t *testing.T) {
    			err := ValidateOwnerGroups(tc.include, tc.exclude)
    			assert.NoError(t, err)
    		})
    	}
    }
    
    func TestValidateOwnerGroups_Invalid(t *testing.T) {
    	cases := []struct {
    		name    string
    		include string
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Jan 11 02:38:28 UTC 2024
    - 3K bytes
    - Viewed (0)
  9. src/regexp/all_test.go

    			t.Errorf("%q.ReplaceAllLiteralString(%q,%q) = %q; want %q",
    				tc.pattern, tc.input, tc.replacement, actual, tc.output)
    		}
    		// now try bytes
    		actual = string(re.ReplaceAllLiteral([]byte(tc.input), []byte(tc.replacement)))
    		if actual != tc.output {
    			t.Errorf("%q.ReplaceAllLiteral(%q,%q) = %q; want %q",
    				tc.pattern, tc.input, tc.replacement, actual, tc.output)
    		}
    	}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:36:03 UTC 2024
    - 25.8K bytes
    - Viewed (0)
  10. 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)
Back to top