Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for NewUnauthorized (5.58 sec)

  1. security/pkg/k8s/configutil_test.go

    	})
    	client.PrependReactor("create", "configmaps", func(action ktesting.Action) (bool, runtime.Object, error) {
    		return true, &v1.ConfigMap{}, errors.NewUnauthorized("no permission to create configmap")
    	})
    }
    
    func createConfigMapAlreadyExistClient(client *fake.Clientset) {
    	client.PrependReactor("get", "configmaps", func(action ktesting.Action) (bool, runtime.Object, error) {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Feb 08 21:58:25 UTC 2024
    - 13K bytes
    - Viewed (0)
  2. security/pkg/pki/ca/selfsignedcarootcertrotator_test.go

    	rotator.config.certInspector = certutil.NewCertUtil(100)
    	fakeClient.PrependReactor("update", "secrets", func(action ktesting.Action) (bool, runtime.Object, error) {
    		return true, &v1.Secret{}, errors.NewUnauthorized("no permission to update secret")
    	})
    	rotator.checkAndRotateRootCert()
    	certItem1 := loadCert(rotator)
    	// Verify that root cert does not change.
    	verifyRootCertAndPrivateKey(t, true, certItem0, certItem1)
    }
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Oct 11 23:33:41 UTC 2023
    - 14.1K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apimachinery/pkg/api/errors/errors.go

    			"%s %q already exists, the server was not able to generate a unique name for the object",
    			qualifiedResource.String(), name),
    	}}
    }
    
    // NewUnauthorized returns an error indicating the client is not authorized to perform the requested
    // action.
    func NewUnauthorized(reason string) *StatusError {
    	message := reason
    	if len(message) == 0 {
    		message = "not authorized"
    	}
    	return &StatusError{metav1.Status{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat May 21 03:41:32 UTC 2022
    - 30.5K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apimachinery/pkg/api/errors/errors_test.go

    	}
    	if !IsForbidden(NewForbidden(resource("tests"), "2", errors.New("reason"))) {
    		t.Errorf("expected to be %s", metav1.StatusReasonForbidden)
    	}
    	if !IsUnauthorized(NewUnauthorized("reason")) {
    		t.Errorf("expected to be %s", metav1.StatusReasonUnauthorized)
    	}
    	if !IsServerTimeout(NewServerTimeout(resource("tests"), "reason", 0)) {
    		t.Errorf("expected to be %s", metav1.StatusReasonServerTimeout)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Oct 28 07:31:28 UTC 2023
    - 19.5K bytes
    - Viewed (0)
Back to top