Search Options

Results per page
Sort
Preferred Languages
Advance

Results 201 - 210 of 1,123 for testCases (0.18 sec)

  1. 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)
  2. 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)
  3. 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)
  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. staging/src/k8s.io/apiserver/pkg/storage/api_object_versioner_test.go

    		v.ParseResourceVersion,
    	}
    
    	for _, testCase := range testCases {
    		for i, f := range testFuncs {
    			version, err := f(testCase.Version)
    			switch {
    			case testCase.Err && err == nil:
    				t.Errorf("%s[%v]: unexpected non-error", testCase.Version, i)
    			case testCase.Err && !IsInvalidError(err):
    				t.Errorf("%s[%v]: unexpected error: %v", testCase.Version, i, err)
    			case !testCase.Err && err != nil:
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 11 16:18:15 UTC 2022
    - 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. pilot/pkg/model/endpointshards_test.go

    		c2Key = ShardKey{Cluster: "c2"}
    	)
    
    	cluster1Endppoints := []*IstioEndpoint{
    		{Address: "10.172.0.1", ServiceAccount: "sa1"},
    		{Address: "10.172.0.2", ServiceAccount: "sa-vm1"},
    	}
    
    	testCases := []struct {
    		name      string
    		shardKey  ShardKey
    		endpoints []*IstioEndpoint
    		expect    bool
    	}{
    		{
    			name:      "added new endpoint",
    			shardKey:  c1Key,
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Aug 08 15:48:05 UTC 2023
    - 2.7K bytes
    - Viewed (0)
  8. cmd/site-replication_test.go

    package cmd
    
    import (
    	"testing"
    
    	"github.com/minio/madmin-go/v3"
    	"github.com/minio/minio-go/v7/pkg/set"
    )
    
    // TestGetMissingSiteNames
    func TestGetMissingSiteNames(t *testing.T) {
    	testCases := []struct {
    		currSites []madmin.PeerInfo
    		oldDepIDs set.StringSet
    		newDepIDs set.StringSet
    		expNames  []string
    	}{
    		// Test1: missing some sites in replicated setup
    		{
    			[]madmin.PeerInfo{
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Tue Jun 20 00:53:08 UTC 2023
    - 2.2K bytes
    - Viewed (0)
  9. staging/src/k8s.io/apimachinery/pkg/runtime/converter_test.go

    		{
    			// Test slice of interface{} with different values.
    			obj: &D{
    				A: []interface{}{float64(3.5), int64(4), "3.0", nil},
    			},
    		},
    	}
    
    	for i := range testCases {
    		t.Run(fmt.Sprintf("%d", i), func(t *testing.T) {
    			doRoundTrip(t, testCases[i].obj)
    		})
    	}
    }
    
    // TestUnknownFields checks for the collection of unknown
    // field errors from the various possible locations of
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jul 11 16:02:13 UTC 2023
    - 22.9K bytes
    - Viewed (0)
  10. pilot/pkg/model/destination_rule_test.go

    package model
    
    import (
    	"testing"
    
    	"k8s.io/apimachinery/pkg/types"
    
    	"istio.io/istio/pkg/test/util/assert"
    )
    
    func TestConsolidatedDestRuleEquals(t *testing.T) {
    	testcases := []struct {
    		name     string
    		l        *ConsolidatedDestRule
    		r        *ConsolidatedDestRule
    		expected bool
    	}{
    		{
    			name:     "two nil",
    			expected: true,
    		},
    		{
    			name: "l is nil",
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Jul 07 03:52:19 UTC 2022
    - 2.8K bytes
    - Viewed (0)
Back to top