Search Options

Results per page
Sort
Preferred Languages
Advance

Results 101 - 110 of 1,281 for testCases (0.14 sec)

  1. pkg/kubelet/util/store/store_test.go

    limitations under the License.
    */
    
    package store
    
    import (
    	"testing"
    
    	"github.com/stretchr/testify/assert"
    )
    
    func TestIsValidKey(t *testing.T) {
    	testcases := []struct {
    		key   string
    		valid bool
    	}{
    		{
    			"    ",
    			false,
    		},
    		{
    			"/foo/bar",
    			false,
    		},
    		{
    			".foo",
    			false,
    		},
    		{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Oct 19 22:18:30 UTC 2017
    - 1.1K bytes
    - Viewed (0)
  2. pkg/kubelet/active_deadline_test.go

    	testCases := []struct {
    		pod      *v1.Pod
    		expected bool
    	}{{pods[0], true}, {pods[1], false}, {pods[2], false}, {pods[3], false}, {pods[4], false}}
    
    	for i, testCase := range testCases {
    		if actual := handler.ShouldSync(testCase.pod); actual != testCase.expected {
    			t.Errorf("[%d] ShouldSync expected %#v, got %#v", i, testCase.expected, actual)
    		}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Oct 08 09:06:42 UTC 2022
    - 4.5K bytes
    - Viewed (0)
  3. pkg/volume/util/volumeattributesclass_test.go

    		ObjectMeta: metav1.ObjectMeta{
    			Name: "my-vac7",
    			Annotations: map[string]string{
    				AlphaIsDefaultVolumeAttributesClassAnnotation: "true",
    			},
    		},
    		DriverName: dirverName2,
    	}
    
    	testCases := []struct {
    		name       string
    		driverName string
    		classes    []*storagev1alpha1.VolumeAttributesClass
    		expect     *storagev1alpha1.VolumeAttributesClass
    	}{
    		{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Oct 31 03:18:56 UTC 2023
    - 5.9K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apimachinery/pkg/api/validation/path/name_test.go

    limitations under the License.
    */
    
    package path
    
    import (
    	"strings"
    	"testing"
    )
    
    func TestValidatePathSegmentName(t *testing.T) {
    	testcases := map[string]struct {
    		Name        string
    		Prefix      bool
    		ExpectedMsg string
    	}{
    		"empty": {
    			Name:        "",
    			Prefix:      false,
    			ExpectedMsg: "",
    		},
    		"empty,prefix": {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jan 27 13:49:29 UTC 2017
    - 3.8K bytes
    - Viewed (0)
  5. cmd/xl-storage_test.go

    			expectedErr: errFileNameTooLong,
    		},
    	}
    
    	for i, testCase := range testCases {
    		if err := xlStorage.RenameFile(context.Background(), testCase.srcVol, testCase.srcPath, testCase.destVol, testCase.destPath); err != testCase.expectedErr {
    			t.Fatalf("TestXLStorage %d:  Expected the error to be : \"%v\", got: \"%v\".", i+1, testCase.expectedErr, err)
    		}
    	}
    }
    
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Thu Apr 11 17:45:28 UTC 2024
    - 66.7K bytes
    - Viewed (0)
  6. cmd/signature-v4-parser_test.go

    			expectedErrCode:  ErrNone,
    		},
    	}
    	for i, testCase := range testCases {
    		actualSignStr, actualErrCode := parseSignature(testCase.inputSignElement)
    		if testCase.expectedErrCode != actualErrCode {
    			t.Fatalf("Test %d: Expected the APIErrCode to be %d, got %d", i+1, testCase.expectedErrCode, actualErrCode)
    		}
    		if actualErrCode == ErrNone {
    			if testCase.expectedSignStr != actualSignStr {
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Thu Feb 22 06:26:06 UTC 2024
    - 27.4K bytes
    - Viewed (0)
  7. cluster/images/etcd/migrate/options_test.go

    		t.Cleanup(func() { os.Setenv(env, prev) })
    
    		if err := os.Unsetenv(env); err != nil {
    			t.Errorf("couldn't unset env %s: %v", env, err)
    		}
    	}
    }
    
    func TestFallbackToEnv(t *testing.T) {
    	testCases := []struct {
    		desc          string
    		env           string
    		value         string
    		valueSet      bool
    		expectedValue string
    		expectedError bool
    	}{
    		{
    			desc:          "value unset",
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Apr 18 01:55:49 UTC 2023
    - 3.1K bytes
    - Viewed (0)
  8. src/runtime/checkptr_test.go

    	exe, err := buildTestProg(t, "testprog", "-gcflags=all=-d=checkptr=2")
    	if err != nil {
    		t.Fatal(err)
    	}
    
    	testCases := []struct {
    		cmd  string
    		want string
    	}{
    		{"CheckPtrAlignmentNested", "fatal error: checkptr: converted pointer straddles multiple allocations\n"},
    	}
    
    	for _, tc := range testCases {
    		tc := tc
    		t.Run(tc.cmd, func(t *testing.T) {
    			t.Parallel()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Aug 31 17:15:15 UTC 2022
    - 2.9K bytes
    - Viewed (0)
  9. staging/src/k8s.io/apimachinery/pkg/util/validation/field/path_test.go

    		},
    	}
    
    	root := NewPath("root")
    	p := root
    	for i, tc := range testCases {
    		p = tc.op(p)
    		if p.String() != tc.expected {
    			t.Errorf("[%d] Expected %q, got %q", i, tc.expected, p.String())
    		}
    		if p.Root() != root {
    			t.Errorf("[%d] Wrong root: %#v", i, p.Root())
    		}
    	}
    }
    
    func TestPathMultiArg(t *testing.T) {
    	testCases := []struct {
    		op       func(*Path) *Path
    		expected string
    	}{
    		{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jan 11 14:09:48 UTC 2017
    - 2.6K bytes
    - Viewed (0)
  10. staging/src/k8s.io/apiserver/pkg/server/options/tracing_test.go

    var (
    	localhost    = "localhost:4317"
    	ipAddress    = "127.0.0.1:4317"
    	samplingRate = int32(12345)
    )
    
    func strptr(s string) *string {
    	return &s
    }
    
    func TestValidateTracingOptions(t *testing.T) {
    	testcases := []struct {
    		name        string
    		expectError bool
    		contents    *TracingOptions
    	}{
    		{
    			name:        "nil-valid",
    			expectError: false,
    		},
    		{
    			name:        "empty-valid",
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Sep 05 02:24:38 UTC 2023
    - 4.6K bytes
    - Viewed (0)
Back to top