Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 50 for NewNotFound (0.22 sec)

  1. plugin/pkg/auth/authenticator/token/bootstrap/bootstrap_test.go

    	return l.secrets, nil
    }
    
    func (l *lister) Get(name string) (*corev1.Secret, error) {
    	for _, s := range l.secrets {
    		if s.Name == name {
    			return s, nil
    		}
    	}
    	return nil, errors.NewNotFound(schema.GroupResource{}, name)
    }
    
    const (
    	// Fake values for testing.
    	tokenID     = "foobar"           // 6 letters
    	tokenSecret = "circumnavigation" // 16 letters
    )
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Feb 04 18:36:05 UTC 2020
    - 8.3K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apiserver/pkg/endpoints/handlers/responsewriters/writers_test.go

    			wantBody:    []byte(": bad"),
    		},
    
    		{
    			name:        "fail to encode object or status with status code",
    			out:         smallPayload,
    			outErrs:     []error{kerrors.NewNotFound(schema.GroupResource{}, "test"), fmt.Errorf("bad2")},
    			mediaType:   "application/json",
    			req:         &http.Request{Header: http.Header{}, URL: &url.URL{Path: "/path"}},
    			statusCode:  http.StatusOK,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 15.7K bytes
    - Viewed (0)
  3. pkg/registry/apps/deployment/storage/storage.go

    func (r *ScaleREST) Get(ctx context.Context, name string, options *metav1.GetOptions) (runtime.Object, error) {
    	obj, err := r.store.Get(ctx, name, options)
    	if err != nil {
    		return nil, errors.NewNotFound(apps.Resource("deployments/scale"), name)
    	}
    	deployment := obj.(*apps.Deployment)
    	scale, err := scaleFromDeployment(deployment)
    	if err != nil {
    		return nil, errors.NewBadRequest(fmt.Sprintf("%v", err))
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Mar 08 21:44:00 UTC 2023
    - 16.8K bytes
    - Viewed (0)
  4. pkg/registry/core/rest/storage_core_generic.go

    }
    
    type notFoundGetter struct {
    	gr schema.GroupResource
    }
    
    func (g notFoundGetter) Get(ctx context.Context, name string, options *metav1.GetOptions) (runtime.Object, error) {
    	return nil, errors.NewNotFound(g.gr, name)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Oct 30 21:15:10 UTC 2023
    - 6K bytes
    - Viewed (0)
  5. cmd/kubeadm/app/util/apiclient/idempotency_test.go

    			setupClient: func(client *clientsetfake.Clientset) {
    				client.PrependReactor("get", "configmaps", func(clientgotesting.Action) (bool, runtime.Object, error) {
    					return true, nil, apierrors.NewNotFound(schema.GroupResource{}, "name")
    				})
    				client.PrependReactor("create", "configmaps", func(clientgotesting.Action) (bool, runtime.Object, error) {
    					return true, nil, nil
    				})
    			},
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sun Feb 18 11:14:32 UTC 2024
    - 33.2K bytes
    - Viewed (0)
  6. cmd/kubeadm/app/util/apiclient/init_dryrun.go

    	// This can only happen on an upgrade; and in that case the ClientBackedDryRunGetter impl will be used
    	return true, nil, apierrors.NewNotFound(action.GetResource().GroupResource(), "clusterrolebinding not found")
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon May 01 07:17:50 UTC 2023
    - 5.3K bytes
    - Viewed (0)
  7. staging/src/k8s.io/apimachinery/pkg/api/errors/errors_test.go

    	}
    
    	if !IsConflict(NewConflict(resource("tests"), "2", errors.New("message"))) {
    		t.Errorf("expected to be %s", metav1.StatusReasonAlreadyExists)
    	}
    	if !IsNotFound(NewNotFound(resource("tests"), "3")) {
    		t.Errorf("expected to be %s", metav1.StatusReasonNotFound)
    	}
    	if !IsInvalid(NewInvalid(kind("Test"), "2", nil)) {
    		t.Errorf("expected to be %s", metav1.StatusReasonInvalid)
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Oct 28 07:31:28 UTC 2023
    - 19.5K bytes
    - Viewed (0)
  8. pkg/controller/history/controller_history.go

    	if err != nil {
    		return err
    	}
    	obj, found, err := fh.indexer.GetByKey(key)
    	if err != nil {
    		return err
    	}
    	if !found {
    		return errors.NewNotFound(apps.Resource("controllerrevisions"), revision.Name)
    	}
    	return fh.indexer.Delete(obj)
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Nov 05 13:33:52 UTC 2021
    - 18.2K bytes
    - Viewed (0)
  9. staging/src/k8s.io/apimachinery/pkg/api/errors/errors.go

    			break
    		}
    		return &StatusError{ErrStatus: status}
    	}
    	return &UnexpectedObjectError{obj}
    }
    
    // NewNotFound returns a new error which indicates that the resource of the kind and the name was not found.
    func NewNotFound(qualifiedResource schema.GroupResource, name string) *StatusError {
    	return &StatusError{metav1.Status{
    		Status: metav1.StatusFailure,
    		Code:   http.StatusNotFound,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat May 21 03:41:32 UTC 2022
    - 30.5K bytes
    - Viewed (0)
  10. pkg/controller/volume/persistentvolume/testing/testing.go

    			logger.V(4).Info("GetVolume: found volume", "volumeName", volume.Name)
    			return true, volume.DeepCopy(), nil
    		}
    		logger.V(4).Info("GetVolume: volume not found", "volumeName", name)
    		return true, nil, apierrors.NewNotFound(action.GetResource().GroupResource(), name)
    
    	case action.Matches("get", "persistentvolumeclaims"):
    		name := action.(core.GetAction).GetName()
    		nameSpace := action.(core.GetAction).GetNamespace()
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 12 15:46:12 UTC 2023
    - 20.1K bytes
    - Viewed (0)
Back to top