Search Options

Results per page
Sort
Preferred Languages
Advance

Results 61 - 70 of 119 for NewTestContext (0.51 sec)

  1. pkg/test/framework/testcontext.go

    	*testing.T
    
    	// suite-level context
    	suite *suiteContext
    
    	// resource scope for this context.
    	scope *scope
    
    	// The workDir for this particular context
    	workDir string
    }
    
    func newTestContext(test *testImpl, goTest *testing.T, s *suiteContext, parentScope *scope, labels label.Set) *testContext {
    	id := s.allocateContextID(goTest.Name())
    
    	allLabels := s.suiteLabels.Merge(labels)
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Apr 08 22:02:59 UTC 2024
    - 11.4K bytes
    - Viewed (0)
  2. pkg/controller/nodeipam/ipam/range_allocator_test.go

    				SecondaryServiceCIDR: nil,
    				NodeCIDRMaskSizes:    []int{24},
    			},
    			expectedAllocatedCIDR: map[int]string{
    				0: "10.10.1.0/24",
    			},
    		},
    	}
    
    	// test function
    	_, tCtx := ktesting.NewTestContext(t)
    	testFunc := func(tc testCase) {
    		fakeNodeInformer := test.FakeNodeInformer(tc.fakeNodeHandler)
    		nodeList, _ := tc.fakeNodeHandler.List(tCtx, metav1.ListOptions{})
    		// Initialize the range allocator.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 10:06:15 UTC 2024
    - 25.2K bytes
    - Viewed (0)
  3. pkg/controller/volume/persistentvolume/recycle_test.go

    // 1. Fill in the controller with initial data
    // 2. Call the syncVolume *once*.
    // 3. Compare resulting volumes with expected volumes.
    func TestRecycleSync(t *testing.T) {
    	_, ctx := ktesting.NewTestContext(t)
    	runningPod := &v1.Pod{
    		ObjectMeta: metav1.ObjectMeta{
    			Name:      "runningPod",
    			Namespace: testNamespace,
    		},
    		Spec: v1.PodSpec{
    			Volumes: []v1.Volume{
    				{
    					Name: "vol1",
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Mar 14 00:37:30 UTC 2023
    - 14.2K bytes
    - Viewed (0)
  4. pkg/controller/volume/persistentvolume/delete_test.go

    	// Default enable the HonorPVReclaimPolicy feature gate.
    	featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.HonorPVReclaimPolicy, true)
    	_, ctx := ktesting.NewTestContext(t)
    	tests := []controllerTest{
    		{
    			// delete volume bound by controller
    			name:            "8-1 - successful delete",
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 15.8K bytes
    - Viewed (0)
  5. pkg/controller/deployment/sync_test.go

    					desiredReplicas = desired
    				}
    				deploymentutil.SetReplicasAnnotations(rs, desiredReplicas, desiredReplicas+deploymentutil.MaxSurge(*test.oldDeployment))
    			}
    
    			_, ctx := ktesting.NewTestContext(t)
    
    			if err := dc.scale(ctx, test.deployment, test.newRS, test.oldRSs); err != nil {
    				t.Errorf("%s: unexpected error: %v", test.name, err)
    				return
    			}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Sep 08 09:10:50 UTC 2023
    - 21.1K bytes
    - Viewed (0)
  6. pkg/volume/hostpath/host_path_test.go

    	plug, err := plugMgr.FindDeletablePluginBySpec(spec)
    	if err != nil {
    		t.Fatal("Can't find the plugin by name")
    	}
    	logger, _ := ktesting.NewTestContext(t)
    	deleter, err := plug.NewDeleter(logger, spec)
    	if err != nil {
    		t.Errorf("Failed to make a new Deleter: %v", err)
    	}
    	if deleter.GetPath() != tempPath {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Mar 14 00:37:30 UTC 2023
    - 20.5K bytes
    - Viewed (0)
  7. pkg/kubelet/volumemanager/reconciler/reconstruct_test.go

    			rcInstance, _ := rc.(*reconciler)
    			rcInstance.volumesFailedReconstruction = tc.volumesFailedReconstruction
    			logger, _ := ktesting.NewTestContext(t)
    			for _, tpodInfo := range tc.podInfos {
    				pod := getInlineFakePod(tpodInfo.podName, tpodInfo.podUID, tpodInfo.outerVolumeName, tpodInfo.innerVolumeName)
    				volumeSpec := &volume.Spec{Volume: &pod.Spec.Volumes[0]}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 04 06:25:43 UTC 2024
    - 14.8K bytes
    - Viewed (0)
  8. pkg/controller/ttl/ttl_controller_test.go

    			nodeCount:         testCase.nodeCount,
    			desiredTTLSeconds: testCase.desiredTTL,
    			boundaryStep:      testCase.boundaryStep,
    		}
    		if testCase.addNode {
    			logger, _ := ktesting.NewTestContext(t)
    			ttlController.addNode(logger, &v1.Node{})
    		}
    		if testCase.deleteNode {
    			ttlController.deleteNode(&v1.Node{})
    		}
    		assert.Equal(t, testCase.expectedTTL, ttlController.getDesiredTTLSeconds(),
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat May 04 18:33:12 UTC 2024
    - 7.1K bytes
    - Viewed (0)
  9. pkg/scheduler/profile/profile_test.go

    							},
    						},
    					},
    				},
    			},
    			wantErr: "at least one bind plugin is needed",
    		},
    	}
    	for _, tc := range cases {
    		t.Run(tc.name, func(t *testing.T) {
    			_, ctx := ktesting.NewTestContext(t)
    			ctx, cancel := context.WithCancel(ctx)
    			defer cancel()
    			m, err := NewMap(ctx, tc.cfgs, fakeRegistry, nilRecorderFactory)
    			if err := checkErr(err, tc.wantErr); err != nil {
    				t.Fatal(err)
    			}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Sep 20 09:49:54 UTC 2023
    - 6.6K bytes
    - Viewed (0)
  10. pkg/controller/deployment/recreate_test.go

    			}
    		}
    
    		kc := fake.NewSimpleClientset(expected...)
    		informers := informers.NewSharedInformerFactory(kc, controller.NoResyncPeriodFunc())
    		_, ctx := ktesting.NewTestContext(t)
    		c, err := NewDeploymentController(ctx, informers.Apps().V1().Deployments(), informers.Apps().V1().ReplicaSets(), informers.Core().V1().Pods(), kc)
    		if err != nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Sep 08 09:10:50 UTC 2023
    - 5.9K bytes
    - Viewed (0)
Back to top