Search Options

Results per page
Sort
Preferred Languages
Advance

Results 111 - 120 of 1,127 for testCases (0.17 sec)

  1. security/pkg/util/jwtutil_test.go

    	base64UrlEncodedPaddingStrippedPart = "eyJpc3MiOiJodHRwczovL2V4YW1wbGUuY29tIiwiYXVkIjoiSm9lIEFyZG_DsWV6In0"
    )
    
    func TestGetExp(t *testing.T) {
    	testCases := map[string]struct {
    		jwt         string
    		expectedExp time.Time
    		expectedErr error
    	}{
    		"jwt with expiration time": {
    			jwt:         thirdPartyJwt,
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri May 31 16:07:11 UTC 2024
    - 6K bytes
    - Viewed (0)
  2. pkg/kubelet/winstats/perfcounter_nodestats_test.go

    }
    
    func TestConvertCPUValue(t *testing.T) {
    	testCases := []struct {
    		cpuValue uint64
    		expected uint64
    	}{
    		{cpuValue: uint64(50), expected: uint64(2000000000)},
    		{cpuValue: uint64(0), expected: uint64(0)},
    		{cpuValue: uint64(100), expected: uint64(4000000000)},
    	}
    	var cpuCores = 4
    
    	for _, tc := range testCases {
    		p := perfCounterNodeStatsClient{}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jan 26 18:37:21 UTC 2024
    - 5.7K bytes
    - Viewed (0)
  3. pilot/pkg/serviceregistry/kube/controller/util_test.go

    		},
    	}
    
    	for _, tc := range testCases {
    		t.Run(tc.name, func(t *testing.T) {
    			key := podKeyByProxy(tc.proxy)
    			if key != tc.expectedKey {
    				t.Errorf("expected key %s != %s", tc.expectedKey, key)
    			}
    		})
    	}
    }
    
    func TestGetNodeSelectorsForService(t *testing.T) {
    	testCases := []struct {
    		name                  string
    		svc                   *v1.Service
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Jun 21 20:45:12 UTC 2023
    - 5K bytes
    - Viewed (0)
  4. internal/config/etcd/etcd_test.go

    		{"http://localhost:2379", []string{"http://localhost:2379"}, false, true},
    	}
    
    	for _, testCase := range testCases {
    		testCase := testCase
    		t.Run(testCase.s, func(t *testing.T) {
    			endpoints, secure, err := parseEndpoints(testCase.s)
    			if err != nil && testCase.success {
    				t.Errorf("expected to succeed but failed with %s", err)
    			}
    			if !testCase.success && err == nil {
    				t.Error("expected failure but succeeded instead")
    			}
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Sun Jan 02 17:15:06 UTC 2022
    - 2.1K bytes
    - Viewed (0)
  5. internal/disk/stat_test.go

    		},
    	}
    
    	for _, testCase := range testCases {
    		testCase := testCase
    		t.Run("", func(t *testing.T) {
    			tmpfile, err := os.CreateTemp("", "testfile")
    			if err != nil {
    				t.Error(err)
    			}
    			tmpfile.WriteString(testCase.stat)
    			tmpfile.Sync()
    			tmpfile.Close()
    
    			iostats, err := readDriveStats(tmpfile.Name())
    			if err != nil && !testCase.expectErr {
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Mon Feb 26 19:34:50 UTC 2024
    - 3.6K bytes
    - Viewed (0)
  6. staging/src/k8s.io/apiserver/pkg/admission/config_test.go

    	require.NoError(t, apiserverapiv1.AddToScheme(scheme))
    
    	for testName, testCase := range testCases {
    		if err = os.WriteFile(configFileName, []byte(testCase.ConfigBody), 0644); err != nil {
    			t.Fatalf("unexpected err writing temp file: %v", err)
    		}
    		config, err := ReadAdmissionConfiguration(testCase.PluginNames, configFileName, scheme)
    		if err != nil {
    			t.Fatalf("unexpected err: %v", err)
    		}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Jun 29 15:48:39 UTC 2023
    - 8.8K bytes
    - Viewed (0)
  7. staging/src/k8s.io/apimachinery/pkg/runtime/serializer/json/json_limit_test.go

    package json
    
    import (
    	gojson "encoding/json"
    	"strings"
    	"testing"
    
    	utiljson "k8s.io/apimachinery/pkg/util/json"
    )
    
    type testcase struct {
    	name     string
    	data     []byte
    	checkErr func(t testing.TB, err error)
    
    	benchmark bool
    }
    
    func testcases() []testcase {
    	// verify we got an error of some kind
    	nonNilError := func(t testing.TB, err error) {
    		if err == nil {
    			t.Errorf("expected error, got none")
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Oct 20 16:49:23 UTC 2021
    - 4.5K bytes
    - Viewed (0)
  8. security/pkg/pki/util/verify_cert_test.go

    	}
    }
    
    func TestCertExpired(t *testing.T) {
    	testCases := map[string]struct {
    		filepath string
    		expected bool
    	}{
    		"Expired Cert": {
    			filepath: "../testdata/expired-cert.pem",
    			expected: true,
    		},
    		"Not Expired Cert": {
    			filepath: "../testdata/notexpired-cert.pem",
    			expected: false,
    		},
    	}
    	for id, tc := range testCases {
    		t.Run(id, func(t *testing.T) {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Aug 16 14:56:37 UTC 2022
    - 6.5K bytes
    - Viewed (0)
  9. pkg/kubelet/cm/helpers_linux_test.go

    			input:  int64(1500),
    			quota:  int64(150000),
    			period: uint64(100000),
    		},
    	}
    	for _, testCase := range testCases {
    		quota := MilliCPUToQuota(testCase.input, int64(testCase.period))
    		if quota != testCase.quota {
    			t.Errorf("Input %v and %v, expected quota %v, but got quota %v", testCase.input, testCase.period, testCase.quota, quota)
    		}
    	}
    }
    
    func TestHugePageLimits(t *testing.T) {
    	Mi := int64(1024 * 1024)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 27.8K bytes
    - Viewed (0)
  10. cmd/kube-apiserver/app/options/validation_test.go

    			ServiceClusterIPRanges:         value,
    			PrimaryServiceClusterIPRange:   primaryCIDR,
    			SecondaryServiceClusterIPRange: secondaryCIDR,
    		},
    	}
    }
    
    func TestClusterServiceIPRange(t *testing.T) {
    	testCases := []struct {
    		name         string
    		options      *ServerRunOptions
    		expectErrors bool
    		gate         bool
    	}{
    		{
    			name:         "no service cidr",
    			expectErrors: true,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 11.4K bytes
    - Viewed (0)
Back to top