- Sort Score
- Result 10 results
- Languages All
Results 141 - 150 of 1,281 for testCases (0.32 sec)
-
staging/src/k8s.io/apiserver/pkg/storage/value/encrypt/envelope/kmsv2/envelope_test.go
{encryptedDEKSourceType2, encryptedDEKSource2, keyID2, annotations1}, {encryptedDEKSourceType2, encryptedDEKSource2, keyID2, annotations2}, } for _, tc := range testCases { tc := tc for _, tc2 := range testCases { tc2 := tc2 t.Run(fmt.Sprintf("%+v-%+v", tc, tc2), func(t *testing.T) { key1, err1 := generateCacheKey(tc.encryptedDEKSourceType, tc.encryptedDEKSource, tc.keyID, tc.annotations)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Oct 25 16:50:20 UTC 2023 - 47.2K bytes - Viewed (0) -
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) -
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) -
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) -
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) -
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) -
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) -
staging/src/k8s.io/apiserver/pkg/server/options/api_enablement_test.go
testGroupRegistry := fakeGroupRegistry{} for _, testcase := range testCases { t.Run(testcase.name, func(t *testing.T) { errs := testcase.testOptions.Validate(testGroupRegistry) if len(testcase.expectErr) != 0 && !strings.Contains(utilerrors.NewAggregate(errs).Error(), testcase.expectErr) { t.Errorf("got err: %v, expected err: %s", errs, testcase.expectErr) } if len(testcase.expectErr) == 0 && len(errs) != 0 {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Aug 09 07:30:43 UTC 2021 - 2.3K bytes - Viewed (0) -
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) -
pkg/volume/emptydir/empty_dir_test.go
shouldFail: true, expectedResult: "", }, } for testCaseName, testCase := range testCases { t.Run(testCaseName, func(t *testing.T) { value, err := getPageSizeMountOption(testCase.medium, testCase.pod) if testCase.shouldFail && err == nil { t.Errorf("%s: Unexpected success", testCaseName) } else if !testCase.shouldFail && err != nil { t.Errorf("%s: Unexpected error: %v", testCaseName, err)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue May 21 10:18:16 UTC 2024 - 30.7K bytes - Viewed (0)