Search Options

Results per page
Sort
Preferred Languages
Advance

Results 81 - 90 of 579 for testCases (0.25 sec)

  1. 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)
  2. pkg/slices/slices_test.go

    			expected: []int{1},
    		},
    	}
    
    	for _, tc := range testCases {
    		t.Run(tc.name, func(t *testing.T) {
    			result := SortBy(tc.input, tc.extract)
    			if !reflect.DeepEqual(result, tc.expected) {
    				t.Fatalf("Expected: %+v, but got: %+v", tc.expected, result)
    			}
    		})
    	}
    }
    
    func TestSort(t *testing.T) {
    	testCases := []struct {
    		name     string
    		input    []int
    		expected []int
    	}{
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri May 10 23:33:56 UTC 2024
    - 18.2K bytes
    - Viewed (0)
  3. cmd/signature-v4_test.go

    				"Policy": []string{"policy"},
    			},
    			expected: ErrNone,
    		},
    	}
    
    	// Run each test case individually.
    	for i, testCase := range testCases {
    		_, code := doesPolicySignatureMatch(testCase.form)
    		if code != testCase.expected {
    			t.Errorf("(%d) expected to get %s, instead got %s", i, niceError(testCase.expected), niceError(code))
    		}
    	}
    }
    
    func TestDoesPresignedSignatureMatch(t *testing.T) {
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Thu Jun 13 22:26:38 UTC 2024
    - 10.5K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apiserver/plugin/pkg/authorizer/webhook/metrics/metrics_test.go

    package metrics
    
    import (
    	"context"
    	"strings"
    	"testing"
    
    	"k8s.io/component-base/metrics/legacyregistry"
    	"k8s.io/component-base/metrics/testutil"
    )
    
    func TestRecordWebhookMetrics(t *testing.T) {
    	testCases := []struct {
    		desc     string
    		metrics  []string
    		name     string
    		result   string
    		duration float64
    		want     string
    	}{
    		{
    			desc: "evaluation failure total",
    			metrics: []string{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Mar 04 19:01:15 UTC 2024
    - 4.1K bytes
    - Viewed (0)
  5. pkg/controller/tainteviction/taint_eviction_test.go

    			expectedDeleteTimes: durationSlice{
    				{[]string{"pod1", "pod2", "pod3"}, 0},
    			},
    		},
    	}
    
    	for _, item := range testCases {
    		t.Run(item.description, func(t *testing.T) {
    			t.Logf("Starting testcase %q", item.description)
    			ctx, cancel := context.WithCancel(context.Background())
    			defer cancel()
    
    			fakeClientset := fake.NewSimpleClientset(&corev1.PodList{Items: item.pods})
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Apr 25 14:24:16 UTC 2024
    - 31.3K bytes
    - Viewed (0)
  6. pilot/pkg/security/model/authentication_test.go

    			expected:   nil,
    		},
    	}
    
    	for _, c := range testCases {
    		t.Run(c.name, func(t *testing.T) {
    			if got := ConstructSdsSecretConfig(c.secretName); !cmp.Equal(got, c.expected, protocmp.Transform()) {
    				t.Errorf("ConstructSdsSecretConfig: got(%#v), want(%#v)\n", got, c.expected)
    			}
    		})
    	}
    }
    
    func TestApplyToCommonTLSContext(t *testing.T) {
    	testCases := []struct {
    		name               string
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Feb 20 22:39:21 UTC 2024
    - 18.9K bytes
    - Viewed (0)
  7. cmd/kubeadm/app/cmd/token_test.go

    	fakeClient.AddReactor("get", "secrets", func(action core.Action) (handled bool, ret runtime.Object, err error) {
    		return true, nil, apierrors.NewNotFound(v1.Resource("secrets"), "foo")
    	})
    
    	testCases := []struct {
    		name          string
    		token         string
    		usages        []string
    		extraGroups   []string
    		printJoin     bool
    		expectedError bool
    	}{
    		{
    			name:          "valid: empty token",
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Apr 23 05:47:48 UTC 2024
    - 13.6K bytes
    - Viewed (0)
  8. pkg/kubelet/kubelet_pods_linux_test.go

    func TestMakeMounts(t *testing.T) {
    	bTrue := true
    	propagationHostToContainer := v1.MountPropagationHostToContainer
    	propagationBidirectional := v1.MountPropagationBidirectional
    	propagationNone := v1.MountPropagationNone
    
    	testCases := map[string]struct {
    		container      v1.Container
    		podVolumes     kubecontainer.VolumeMap
    		supportsRRO    bool
    		expectErr      bool
    		expectedErrMsg string
    		expectedMounts []kubecontainer.Mount
    	}{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Mar 09 18:00:59 UTC 2024
    - 11.3K bytes
    - Viewed (0)
  9. staging/src/k8s.io/apiserver/pkg/server/options/authenticationconfig/metrics/metrics_test.go

    		t.Fatal(err)
    	}
    }
    
    func TestAuthenticationConfigAutomaticReloadLastTimestampSeconds(t *testing.T) {
    	testCases := []struct {
    		expectedValue string
    		resultLabel   string
    		timestamp     int64
    	}{
    		{
    			expectedValue: `
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Mar 09 22:40:22 UTC 2024
    - 4.6K bytes
    - Viewed (0)
  10. pkg/kubelet/winstats/perfcounters_test.go

    limitations under the License.
    */
    
    package winstats
    
    import (
    	"testing"
    	"time"
    
    	"k8s.io/apimachinery/pkg/util/wait"
    )
    
    func TestPerfCounter(t *testing.T) {
    	testCases := map[string]struct {
    		counter        string
    		skipCheck      bool
    		expectErr      bool
    		expectedErrMsg string
    	}{
    		"CPU Query": {
    			counter: cpuQuery,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Apr 25 14:24:16 UTC 2024
    - 3.5K bytes
    - Viewed (0)
Back to top