Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for ParseSelectorOrDie (0.41 sec)

  1. pkg/client/tests/listwatch_test.go

    			fieldSelector: parseSelectorOrDie(""),
    		},
    		{
    			desc: "node with rv",
    			location: buildLocation(
    				"/api/v1/nodes",
    				buildQueryValues(url.Values{"resourceVersion": []string{"42"}, "watch": []string{"true"}})),
    			rv:            "42",
    			resource:      "nodes",
    			namespace:     metav1.NamespaceAll,
    			fieldSelector: parseSelectorOrDie(""),
    		},
    		{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Jun 02 17:08:23 UTC 2022
    - 5.6K bytes
    - Viewed (0)
  2. pkg/registry/core/service/strategy_test.go

    			},
    			fieldSelector: fields.ParseSelectorOrDie("metadata.name=test"),
    			expectMatch:   true,
    		},
    		{
    			name: "match on namespace",
    			in: &api.Service{
    				ObjectMeta: metav1.ObjectMeta{
    					Name:      "test",
    					Namespace: "testns",
    				},
    				Spec: api.ServiceSpec{ClusterIP: api.ClusterIPNone},
    			},
    			fieldSelector: fields.ParseSelectorOrDie("metadata.namespace=testns"),
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 32.4K bytes
    - Viewed (0)
  3. pkg/registry/core/pod/strategy_test.go

    		expectMatch   bool
    	}{
    		{
    			in: &api.Pod{
    				Spec: api.PodSpec{NodeName: "nodeA"},
    			},
    			fieldSelector: fields.ParseSelectorOrDie("spec.nodeName=nodeA"),
    			expectMatch:   true,
    		},
    		{
    			in: &api.Pod{
    				Spec: api.PodSpec{NodeName: "nodeB"},
    			},
    			fieldSelector: fields.ParseSelectorOrDie("spec.nodeName=nodeA"),
    			expectMatch:   false,
    		},
    		{
    			in: &api.Pod{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 76.2K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apiserver/pkg/storage/testing/watcher_tests.go

    		watchTests: []*testWatchStruct{{basePod, false, ""}, {basePodAssigned, true, watch.Added}},
    		pred: storage.SelectionPredicate{
    			Label: labels.Everything(),
    			Field: fields.ParseSelectorOrDie("spec.nodeName=bar"),
    			GetAttrs: func(obj runtime.Object) (labels.Set, fields.Set, error) {
    				pod := obj.(*example.Pod)
    				return nil, fields.Set{"spec.nodeName": pod.Spec.NodeName}, nil
    			},
    		},
    	}, {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 63.8K bytes
    - Viewed (0)
  5. staging/src/k8s.io/apimachinery/pkg/fields/selector.go

    	if inSlash {
    		return "", InvalidEscapeSequence{sequence: "\\"}
    	}
    
    	return v.String(), nil
    }
    
    // ParseSelectorOrDie takes a string representing a selector and returns an
    // object suitable for matching, or panic when an error occur.
    func ParseSelectorOrDie(s string) Selector {
    	selector, err := ParseSelector(s)
    	if err != nil {
    		panic(err)
    	}
    	return selector
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 23 20:40:07 UTC 2020
    - 12.3K bytes
    - Viewed (0)
  6. staging/src/k8s.io/apiserver/pkg/endpoints/metrics/metrics_test.go

    			expectedScope: "namespace",
    		},
    		{
    			name: "namespace from field selector",
    			opts: &metainternalversion.ListOptions{
    				FieldSelector: fields.ParseSelectorOrDie("metadata.namespace=foo"),
    			},
    			expectedScope: "namespace",
    		},
    		{
    			name:          "name from request info",
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Sep 27 07:29:19 UTC 2023
    - 14.3K bytes
    - Viewed (0)
  7. staging/src/k8s.io/apiserver/pkg/storage/testing/store_tests.go

    				Label: labels.Everything(),
    				Field: fields.ParseSelectorOrDie("metadata.name!=bar"),
    			},
    			expectedOut: []example.Pod{},
    		},
    		{
    			name:   "test List with pod name matching with resource version set to current resource version, match=NotOlderThan",
    			prefix: "/pods/first/",
    			pred: storage.SelectionPredicate{
    				Label: labels.Everything(),
    				Field: fields.ParseSelectorOrDie("metadata.name!=bar"),
    			},
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 11 12:45:33 UTC 2024
    - 91.4K bytes
    - Viewed (0)
Back to top