Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for SetupPluginWithInformers (0.37 sec)

  1. pkg/scheduler/framework/plugins/testing/testing.go

    )
    
    // SetupPluginWithInformers creates a plugin using a framework handle that includes
    // the provided sharedLister and a SharedInformerFactory with the provided objects.
    // The function also creates an empty namespace (since most tests creates pods with
    // empty namespace), and start informer factory.
    func SetupPluginWithInformers(
    	ctx context.Context,
    	tb testing.TB,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Sep 20 09:49:54 UTC 2023
    - 2.5K bytes
    - Viewed (0)
  2. pkg/scheduler/framework/plugins/interpodaffinity/plugin_test.go

    			logger, ctx := ktesting.NewTestContext(t)
    			ctx, cancel := context.WithCancel(ctx)
    			defer cancel()
    
    			snapshot := cache.NewSnapshot(nil, nil)
    			pl := plugintesting.SetupPluginWithInformers(ctx, t, New, &config.InterPodAffinityArgs{}, snapshot, namespaces)
    			p := pl.(*InterPodAffinity)
    			actualHint, err := p.isSchedulableAfterPodChange(logger, tc.pod, tc.oldPod, tc.newPod)
    			if err != nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Apr 12 03:08:44 UTC 2024
    - 9.7K bytes
    - Viewed (0)
  3. pkg/scheduler/framework/plugins/interpodaffinity/filtering_test.go

    			_, ctx := ktesting.NewTestContext(t)
    			ctx, cancel := context.WithCancel(ctx)
    			defer cancel()
    			snapshot := cache.NewSnapshot(test.pods, []*v1.Node{test.node})
    			p := plugintesting.SetupPluginWithInformers(ctx, t, New, &config.InterPodAffinityArgs{}, snapshot, namespaces)
    			state := framework.NewCycleState()
    			_, preFilterStatus := p.(framework.PreFilterPlugin).PreFilter(ctx, state, test.pod)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Jun 01 10:24:54 UTC 2023
    - 58.2K bytes
    - Viewed (0)
  4. pkg/scheduler/framework/plugins/volumerestrictions/volume_restrictions_test.go

    	}
    	snapshot := cache.NewSnapshot(pods, nodes)
    
    	objects := make([]runtime.Object, 0, len(pvcs))
    	for _, pvc := range pvcs {
    		objects = append(objects, pvc)
    	}
    
    	return plugintesting.SetupPluginWithInformers(ctx, t, pluginFactory, &config.InterPodAffinityArgs{}, snapshot, objects)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Oct 20 17:40:39 UTC 2023
    - 17.3K bytes
    - Viewed (0)
  5. pkg/scheduler/framework/plugins/volumezone/volume_zone_test.go

    	objects := make([]runtime.Object, 0, len(pvcs))
    	for _, pvc := range pvcs {
    		objects = append(objects, pvc)
    	}
    	for _, pv := range pvs {
    		objects = append(objects, pv)
    	}
    	return plugintesting.SetupPluginWithInformers(ctx, tb, New, &config.InterPodAffinityArgs{}, snapshot, objects)
    }
    
    func makePVsWithZoneLabel(num int) []*v1.PersistentVolume {
    	pvList := make([]*v1.PersistentVolume, num, num)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Dec 14 05:17:04 UTC 2023
    - 20K bytes
    - Viewed (0)
  6. pkg/scheduler/framework/plugins/interpodaffinity/scoring_test.go

    		t.Run(test.name, func(t *testing.T) {
    			_, ctx := ktesting.NewTestContext(t)
    			ctx, cancel := context.WithCancel(ctx)
    			defer cancel()
    			state := framework.NewCycleState()
    			p := plugintesting.SetupPluginWithInformers(ctx, t, New, &config.InterPodAffinityArgs{HardPodAffinityWeight: 1, IgnorePreferredTermsOfExistingPods: test.ignorePreferredTermsOfExistingPods}, cache.NewSnapshot(test.pods, test.nodes), namespaces)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Dec 15 03:30:06 UTC 2023
    - 44.8K bytes
    - Viewed (0)
  7. pkg/scheduler/framework/plugins/podtopologyspread/scoring_test.go

    			t.Cleanup(cancel)
    			allNodes := append([]*v1.Node{}, tt.nodes...)
    			allNodes = append(allNodes, tt.failedNodes...)
    			state := framework.NewCycleState()
    			pl := plugintesting.SetupPluginWithInformers(ctx, t, podTopologySpreadFunc, &config.PodTopologySpreadArgs{DefaultingType: config.SystemDefaulting}, cache.NewSnapshot(tt.existingPods, allNodes), tt.objs)
    			p := pl.(*PodTopologySpread)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Dec 15 03:30:06 UTC 2023
    - 60K bytes
    - Viewed (0)
  8. pkg/scheduler/framework/plugins/podtopologyspread/filtering_test.go

    			defer cancel()
    			args := &config.PodTopologySpreadArgs{
    				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
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Feb 28 10:42:29 UTC 2024
    - 143.1K bytes
    - Viewed (0)
Back to top