- Sort Score
- Result 10 results
- Languages All
Results 41 - 50 of 467 for testCases (0.15 sec)
-
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) -
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) -
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) -
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) -
pkg/kubelet/cm/memorymanager/state/state_checkpoint_test.go
assert.Equal(t, expectedMemoryAssignments, restoredMemoryAssignments, "state memory assignments mismatch") } func TestCheckpointStateRestore(t *testing.T) { testCases := []struct { description string checkpointContent string expectedError string expectedState *stateMemory }{ { "Restore non-existing checkpoint", "", "",
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sat Jul 30 03:35:26 UTC 2022 - 10.6K bytes - Viewed (0) -
src/cmd/go/internal/fsys/fsys_test.go
33 -- subdir4/file4.txt -- 444 -- overlayfiles/subdir2_file2.txt -- 2 -- overlayfiles/subdir3_file3b.txt -- 66666 -- overlayfiles/subdir4 -- x -- subdir6/file6.txt -- six `) testCases := []struct { path string want, wantErr bool }{ {"", true, true}, {".", true, false}, {cwd, true, false}, {cwd + string(filepath.Separator), true, false}, // subdir1 is only on disk
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Sep 20 18:52:11 UTC 2023 - 29.1K bytes - Viewed (0) -
pkg/securitycontext/accessors_test.go
"k8s.io/utils/pointer" ) func TestPodSecurityContextAccessor(t *testing.T) { fsGroup := int64(2) runAsUser := int64(1) runAsGroup := int64(1) runAsNonRoot := true testcases := []*api.PodSecurityContext{ nil, {}, {FSGroup: &fsGroup}, {HostIPC: true}, {HostNetwork: true}, {HostPID: true}, {RunAsNonRoot: &runAsNonRoot}, {RunAsUser: &runAsUser},
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Feb 22 16:15:27 UTC 2023 - 27.8K bytes - Viewed (0) -
pkg/controller/nodeipam/ipam/range_allocator_test.go
break } } } } // run the test cases for _, tc := range testCases { testFunc(tc) } } func TestAllocateOrOccupyCIDRFailure(t *testing.T) { testCases := []testCase{ { description: "When there's no ServiceCIDR return first CIDR in range", fakeNodeHandler: &testutil.FakeNodeHandler{ Existing: []*v1.Node{
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Apr 24 10:06:15 UTC 2024 - 25.2K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/util/flowcontrol/watch_tracker_test.go
expected: 0, }, } for _, testCase := range testCases { t.Run(testCase.name, func(t *testing.T) { requestInfo, err := requestInfoFactory.NewRequestInfo(testCase.request) if err != nil { t.Fatalf("unexpected error from requestInfo creation: %#v", err) } count := watchTracker.GetInterestedWatchCount(requestInfo) if count != testCase.expected {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Nov 03 14:02:51 UTC 2021 - 10.4K bytes - Viewed (0)