Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 429 for tc (0.03 sec)

  1. staging/src/k8s.io/apimachinery/pkg/util/net/port_range_test.go

    	}
    
    	for i := range testCases {
    		tc := &testCases[i]
    		pr := &PortRange{}
    		var f flag.Value = pr
    		err := f.Set(tc.input)
    		if err != nil && tc.success {
    			t.Errorf("expected success, got %q", err)
    			continue
    		} else if err == nil && !tc.success {
    			t.Errorf("expected failure %#v", testCases[i])
    			continue
    		} else if tc.success {
    			if f.String() != tc.expected {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Sep 05 02:24:38 UTC 2023
    - 2.1K bytes
    - Viewed (0)
  2. pkg/controller/nodeipam/ipam/sync/sync_test.go

    		}
    
    		var hasError bool
    		for _, r := range tc.fake.results {
    			hasError = hasError || (r != nil)
    		}
    		if hasError != tc.wantError {
    			t.Errorf("%v, %v; hasError = %t, errors = %v, want %t",
    				tc.desc, tc.mode, hasError, tc.fake.events, tc.wantError)
    		}
    	}
    }
    
    func TestNodeSyncResync(t *testing.T) {
    	logger, _ := ktesting.NewTestContext(t)
    	fake := &fakeAPIs{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jul 05 23:39:52 UTC 2023
    - 7.6K 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/volume/csi/expander_test.go

    				t.Errorf("For %s: expected staging path %s got %s", tc.name, tc.deviceStagePath, stagingTargetPath)
    			}
    
    			if ok != tc.success {
    				if err != nil {
    					t.Errorf("For %s : expected %v got %v with %v", tc.name, tc.success, ok, err)
    				} else {
    					t.Errorf("For %s : expected %v got %v", tc.name, tc.success, ok)
    				}
    			}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Nov 01 03:58:36 UTC 2023
    - 6.6K bytes
    - Viewed (0)
  6. src/cmd/compile/internal/ir/func_test.go

    		},
    	}
    
    	for _, tc := range tests {
    		t.Run(tc.in, func(t *testing.T) {
    			pkg, sym := splitPkg(tc.in)
    			if pkg != tc.pkg {
    				t.Errorf("splitPkg(%q) got pkg %q want %q", tc.in, pkg, tc.pkg)
    			}
    			if sym != tc.sym {
    				t.Errorf("splitPkg(%q) got sym %q want %q", tc.in, sym, tc.sym)
    			}
    		})
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Oct 13 13:56:32 UTC 2023
    - 2.2K bytes
    - Viewed (0)
  7. pkg/kubelet/cm/topologymanager/scope_test.go

    	scope.podTopologyHints = podTopologyHints{}
    	for _, tc := range testCases {
    		scope.podMap.Add(string(tc.podUID), tc.name, tc.containerID)
    		scope.podTopologyHints[string(tc.podUID)] = make(map[string]TopologyHint)
    		scope.podTopologyHints[string(tc.podUID)][tc.name] = TopologyHint{}
    		len1 = len(scope.podMap)
    		lenHints1 = len(scope.podTopologyHints)
    		err := scope.RemoveContainer(tc.containerID)
    		len2 = len(scope.podMap)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon May 10 11:44:15 UTC 2021
    - 3.3K bytes
    - Viewed (0)
  8. staging/src/k8s.io/apiserver/pkg/server/options/tracing_test.go

    			expectError: true,
    			contents:    &TracingOptions{ConfigFile: "/path/doesnt/exist"},
    		},
    	}
    
    	for _, tc := range testcases {
    		t.Run(tc.name, func(t *testing.T) {
    			errs := tc.contents.Validate()
    			if !tc.expectError && len(errs) != 0 {
    				t.Errorf("Calling Validate expected no error, got %v", errs)
    			} else if tc.expectError && len(errs) == 0 {
    				t.Errorf("Calling Validate expected error, got no error")
    			}
    		})
    	}
    }
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Sep 05 02:24:38 UTC 2023
    - 4.6K bytes
    - Viewed (0)
  9. 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)
  10. src/strings/search_test.go

    		{"abc", "acca", -1},
    		{"aa", "aaa", 0},
    		{"baa", "aaaaa", -1},
    		{"at that", "which finally halts.  at that point", 22},
    	}
    
    	for _, tc := range testCases {
    		got := StringFind(tc.pat, tc.text)
    		want := tc.index
    		if got != want {
    			t.Errorf("stringFind(%q, %q) got %d, want %d\n", tc.pat, tc.text, got, want)
    		}
    	}
    }
    
    func TestFinderCreation(t *testing.T) {
    	testCases := []struct {
    		pattern string
    		bad     [256]int
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 01 21:52:00 UTC 2018
    - 1.9K bytes
    - Viewed (0)
Back to top