- Sort Score
- Result 10 results
- Languages All
Results 131 - 140 of 1,281 for testCases (0.17 sec)
-
pkg/util/parsers/parsers_test.go
} for _, testCase := range testCases { repo, tag, digest, err := ParseImageName(testCase.Input) switch { case testCase.expectedError != "" && !strings.Contains(err.Error(), testCase.expectedError): t.Errorf("ParseImageName(%s) expects error %v but did not get one", testCase.Input, err) case testCase.expectedError == "" && err != nil:
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Sep 01 01:53:43 UTC 2023 - 3K bytes - Viewed (0) -
security/pkg/pki/util/keycertbundle_test.go
ecClientCertFile = "../testdata/ec-workload-cert.pem" ecClientKeyFile = "../testdata/ec-workload-key.pem" ) func TestKeyCertBundleWithRootCertFromFile(t *testing.T) { testCases := map[string]struct { rootCertFile string expectedErr string }{ "File not found": { rootCertFile: "bad.pem", expectedErr: "open bad.pem: no such file or directory", }, "With RSA root cert": {
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Sun Jan 21 06:07:50 UTC 2024 - 15.8K bytes - Viewed (0) -
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) -
pkg/util/pod/pod_test.go
client := &fake.Clientset{} client.CoreV1().Pods(ns).Create(context.TODO(), &v1.Pod{ ObjectMeta: metav1.ObjectMeta{ Namespace: ns, Name: name, }, }, metav1.CreateOptions{}) testCases := []struct { description string mutate func(input v1.PodStatus) v1.PodStatus expectUnchanged bool expectedPatchBytes []byte }{ { "no change",
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Nov 07 15:22:29 UTC 2022 - 4.5K bytes - Viewed (0) -
pkg/util/node/node_test.go
"testing" "github.com/stretchr/testify/assert" v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" netutils "k8s.io/utils/net" ) func TestGetPreferredAddress(t *testing.T) { testcases := map[string]struct { Labels map[string]string Addresses []v1.NodeAddress Preferences []v1.NodeAddressType ExpectErr string ExpectAddress string }{ "no addresses": {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Jan 27 23:24:38 UTC 2023 - 7.1K bytes - Viewed (0) -
pkg/volume/csi/csi_util_test.go
defer os.RemoveAll(tmpDir) testCases := []struct { name string data map[string]string shouldFail bool }{ {name: "test with data ok", data: map[string]string{"key0": "val0", "_key1": "val1", "key2": "val2"}}, {name: "test with data ok 2 ", data: map[string]string{"_key0_": "val0", "&key1": "val1", "key2": "val2"}}, } for i, tc := range testCases { t.Logf("test case: %s", tc.name)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Jun 20 14:49:03 UTC 2023 - 5.5K bytes - Viewed (0) -
pkg/apis/core/v1/helper/helpers_test.go
package helper import ( "fmt" "reflect" "testing" v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/resource" "k8s.io/apimachinery/pkg/labels" ) func TestIsNativeResource(t *testing.T) { testCases := []struct { resourceName v1.ResourceName expectVal bool }{ { resourceName: "pod.alpha.kubernetes.io/opaque-int-resource-foo", expectVal: true, }, {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu May 30 23:03:54 UTC 2024 - 16.9K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/server/options/etcd_test.go
}, } for _, testcase := range testCases { t.Run(testcase.name, func(t *testing.T) { errs := testcase.testOptions.Validate() 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: Wed Apr 24 18:25:29 UTC 2024 - 16.4K 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)