Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 29 of 29 for NewSnapshot (0.2 sec)

  1. pkg/scheduler/framework/plugins/volumezone/volume_zone_test.go

    			}
    		})
    	}
    }
    
    func newPluginWithListers(ctx context.Context, tb testing.TB, pods []*v1.Pod, nodes []*v1.Node, pvcs []*v1.PersistentVolumeClaim, pvs []*v1.PersistentVolume) framework.Plugin {
    	snapshot := cache.NewSnapshot(pods, nodes)
    
    	objects := make([]runtime.Object, 0, len(pvcs))
    	for _, pvc := range pvcs {
    		objects = append(objects, pvc)
    	}
    	for _, pv := range pvs {
    		objects = append(objects, pv)
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Dec 14 05:17:04 UTC 2023
    - 20K bytes
    - Viewed (0)
  2. pkg/scheduler/framework/plugins/interpodaffinity/scoring_test.go

    			state := framework.NewCycleState()
    			p := plugintesting.SetupPluginWithInformers(ctx, t, New, &config.InterPodAffinityArgs{HardPodAffinityWeight: 1, IgnorePreferredTermsOfExistingPods: test.ignorePreferredTermsOfExistingPods}, cache.NewSnapshot(test.pods, test.nodes), namespaces)
    			status := p.(framework.PreScorePlugin).PreScore(ctx, state, test.pod, tf.BuildNodeInfos(test.nodes))
    
    			if !status.IsSuccess() {
    				if status.Code() != test.wantStatus.Code() {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Dec 15 03:30:06 UTC 2023
    - 44.8K bytes
    - Viewed (0)
  3. pkg/scheduler/framework/plugins/tainttoleration/taint_toleration_test.go

    		t.Run(test.name, func(t *testing.T) {
    			_, ctx := ktesting.NewTestContext(t)
    			ctx, cancel := context.WithCancel(ctx)
    			defer cancel()
    
    			state := framework.NewCycleState()
    			snapshot := cache.NewSnapshot(nil, test.nodes)
    			fh, _ := runtime.NewFramework(ctx, nil, nil, runtime.WithSnapshotSharedLister(snapshot))
    
    			p, err := New(ctx, nil, fh, feature.Features{})
    			if err != nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jun 12 13:26:09 UTC 2024
    - 17.5K bytes
    - Viewed (0)
  4. pkg/scheduler/framework/plugins/noderesources/least_allocated_test.go

    		t.Run(test.name, func(t *testing.T) {
    			_, ctx := ktesting.NewTestContext(t)
    			ctx, cancel := context.WithCancel(ctx)
    			defer cancel()
    
    			state := framework.NewCycleState()
    			snapshot := cache.NewSnapshot(test.existingPods, test.nodes)
    			fh, _ := runtime.NewFramework(ctx, nil, nil, runtime.WithSnapshotSharedLister(snapshot))
    
    			p, err := NewFit(
    				ctx,
    				&config.NodeResourcesFitArgs{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Dec 15 03:30:06 UTC 2023
    - 18.8K bytes
    - Viewed (0)
  5. pkg/scheduler/framework/plugins/podtopologyspread/filtering_test.go

    				DefaultConstraints: tt.defaultConstraints,
    				DefaultingType:     config.ListDefaulting,
    			}
    
    			p := plugintesting.SetupPluginWithInformers(ctx, t, topologySpreadFunc, args, cache.NewSnapshot(tt.existingPods, tt.nodes), tt.objs)
    			p.(*PodTopologySpread).enableNodeInclusionPolicyInPodTopologySpread = tt.enableNodeInclusionPolicy
    			p.(*PodTopologySpread).enableMatchLabelKeysInPodTopologySpread = tt.enableMatchLabelKeys
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Feb 28 10:42:29 UTC 2024
    - 143.1K bytes
    - Viewed (0)
  6. pkg/scheduler/framework/plugins/noderesources/fit_test.go

    		t.Run(test.name, func(t *testing.T) {
    			_, ctx := ktesting.NewTestContext(t)
    			ctx, cancel := context.WithCancel(ctx)
    			defer cancel()
    
    			state := framework.NewCycleState()
    			snapshot := cache.NewSnapshot(test.existingPods, test.nodes)
    			fh, _ := runtime.NewFramework(ctx, nil, nil, runtime.WithSnapshotSharedLister(snapshot))
    			args := test.nodeResourcesFitArgs
    			p, err := NewFit(ctx, &args, fh, plfeature.Features{})
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jun 12 13:26:09 UTC 2024
    - 57.4K bytes
    - Viewed (0)
  7. pkg/scheduler/framework/plugins/nodeaffinity/node_affinity_test.go

    			ctx, cancel := context.WithCancel(ctx)
    			defer cancel()
    
    			state := framework.NewCycleState()
    			fh, _ := runtime.NewFramework(ctx, nil, nil, runtime.WithSnapshotSharedLister(cache.NewSnapshot(nil, test.nodes)))
    			p, err := New(ctx, &test.args, fh)
    			if err != nil {
    				t.Fatalf("Creating plugin: %v", err)
    			}
    			var status *framework.Status
    			if test.runPreScore {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Dec 18 12:00:10 UTC 2023
    - 38.7K bytes
    - Viewed (0)
  8. pkg/scheduler/scheduler_test.go

    	return frameworkruntime.NewFramework(ctx, r, &profile,
    		frameworkruntime.WithSnapshotSharedLister(internalcache.NewSnapshot(nil, nil)),
    		frameworkruntime.WithInformerFactory(informers.NewSharedInformerFactory(fake.NewSimpleClientset(), 0)),
    	)
    }
    
    func TestFrameworkHandler_IterateOverWaitingPods(t *testing.T) {
    	const (
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 17 09:07:27 UTC 2024
    - 42K bytes
    - Viewed (0)
  9. pkg/scheduler/schedule_one_test.go

    					pv := v1.PersistentVolume{ObjectMeta: metav1.ObjectMeta{Name: pvName}}
    					cs.CoreV1().PersistentVolumes().Create(ctx, &pv, metav1.CreateOptions{})
    				}
    			}
    			snapshot := internalcache.NewSnapshot(test.pods, nodes)
    			fwk, err := tf.NewFramework(
    				ctx,
    				test.registerPlugins, "",
    				frameworkruntime.WithSnapshotSharedLister(snapshot),
    				frameworkruntime.WithInformerFactory(informerFactory),
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 04 06:20:55 UTC 2024
    - 128.1K bytes
    - Viewed (0)
Back to top