kubernetes/staging/src/k8s.io/apiserver/pkg/endpoints/apiserver_test.go

type alwaysMutatingDeny

func (alwaysMutatingDeny) Admit(ctx context.Context, a admission.Attributes, o admission.ObjectInterfaces) (err error) {}

func (alwaysMutatingDeny) Handles(operation admission.Operation) bool {}

var _

type alwaysValidatingDeny

func (alwaysValidatingDeny) Validate(ctx context.Context, a admission.Attributes, o admission.ObjectInterfaces) (err error) {}

func (alwaysValidatingDeny) Handles(operation admission.Operation) bool {}

var _

var testAPIGroup

var testAPIGroup2

var testInternalGroupVersion

var testGroupVersion

var newGroupVersion

var testGroup2Version

var testInternalGroup2Version

var prefix

var grouplessGroupVersion

var grouplessInternalGroupVersion

var grouplessPrefix

var groupVersions

var scheme

var codecs

var codec

var testCodec

var newCodec

var parameterCodec

var accessor

var namer

var admissionControl

func init() {}

func addGrouplessTypes() {}

func addTestTypes() {}

func addNewTestTypes() {}

func init() {}

type defaultAPIServer

func handleWithWarnings(storage map[string]rest.Storage) http.Handler {}

// uses the default settings
func handle(storage map[string]rest.Storage) http.Handler {}

func handleInternal(storage map[string]rest.Storage, admissionControl admission.Interface, auditSink audit.Sink) http.Handler {}

func testRequestInfoResolver() *request.RequestInfoFactory {}

func TestSimpleSetupRight(t *testing.T) {}

func TestSimpleOptionsSetupRight(t *testing.T) {}

type SimpleRESTStorage

func (storage *SimpleRESTStorage) NamespaceScoped() bool {}

func (storage *SimpleRESTStorage) ConvertToTable(ctx context.Context, obj runtime.Object, tableOptions runtime.Object) (*metav1.Table, error) {}

func (storate *SimpleRESTStorage) GetSingularName() string {}

func (storage *SimpleRESTStorage) List(ctx context.Context, options *metainternalversion.ListOptions) (runtime.Object, error) {}

type SimpleStream

func (s *SimpleStream) Close() error {}

func (s *SimpleStream) GetObjectKind() schema.ObjectKind {}

func (s *SimpleStream) DeepCopyObject() runtime.Object {}

func (s *SimpleStream) InputStream(_ context.Context, version, accept string) (io.ReadCloser, bool, string, error) {}

type OutputConnect

func (h *OutputConnect) ServeHTTP(w http.ResponseWriter, req *http.Request) {}

func (storage *SimpleRESTStorage) Get(ctx context.Context, id string, options *metav1.GetOptions) (runtime.Object, error) {}

func (storage *SimpleRESTStorage) checkContext(ctx context.Context) {}

func (storage *SimpleRESTStorage) Delete(ctx context.Context, id string, deleteValidation rest.ValidateObjectFunc, options *metav1.DeleteOptions) (runtime.Object, bool, error) {}

func (storage *SimpleRESTStorage) New() runtime.Object {}

func (storage *SimpleRESTStorage) NewList() runtime.Object {}

func (storage *SimpleRESTStorage) Destroy() {}

func (storage *SimpleRESTStorage) Create(ctx context.Context, obj runtime.Object, createValidation rest.ValidateObjectFunc, options *metav1.CreateOptions) (runtime.Object, error) {}

func (storage *SimpleRESTStorage) Update(ctx context.Context, name string, objInfo rest.UpdatedObjectInfo, createValidation rest.ValidateObjectFunc, updateValidation rest.ValidateObjectUpdateFunc, forceAllowCreate bool, options *metav1.UpdateOptions) (runtime.Object, bool, error) {}

// Implement ResourceWatcher.
func (storage *SimpleRESTStorage) Watch(ctx context.Context, options *metainternalversion.ListOptions) (watch.Interface, error) {}

func (storage *SimpleRESTStorage) Watcher() *watch.FakeWatcher {}

type ConnecterRESTStorage

var _

func (s *ConnecterRESTStorage) New() runtime.Object {}

func (s *ConnecterRESTStorage) Destroy() {}

func (s *ConnecterRESTStorage) Connect(ctx context.Context, id string, options runtime.Object, responder rest.Responder) (http.Handler, error) {}

func (s *ConnecterRESTStorage) ConnectMethods() []string {}

func (s *ConnecterRESTStorage) NewConnectOptions() (runtime.Object, bool, string) {}

func (s *ConnecterRESTStorage) GetSingularName() string {}

type MetadataRESTStorage

func (m *MetadataRESTStorage) ProducesMIMETypes(method string) []string {}

func (m *MetadataRESTStorage) ProducesObject(verb string) interface{}

var _

type GetWithOptionsRESTStorage

func (r *GetWithOptionsRESTStorage) Get(ctx context.Context, name string, options runtime.Object) (runtime.Object, error) {}

func (r *GetWithOptionsRESTStorage) NewGetOptions() (runtime.Object, bool, string) {}

var _

type GetWithOptionsRootRESTStorage

func (r *GetWithOptionsRootRESTStorage) GetSingularName() string {}

func (r *GetWithOptionsRootRESTStorage) NamespaceScoped() bool {}

func (r *GetWithOptionsRootRESTStorage) Get(ctx context.Context, name string, options runtime.Object) (runtime.Object, error) {}

func (r *GetWithOptionsRootRESTStorage) NewGetOptions() (runtime.Object, bool, string) {}

var _

type NamedCreaterRESTStorage

func (storage *NamedCreaterRESTStorage) Create(ctx context.Context, name string, obj runtime.Object, createValidation rest.ValidateObjectFunc, options *metav1.CreateOptions) (runtime.Object, error) {}

type SimpleTypedStorage

func (storage *SimpleTypedStorage) New() runtime.Object {}

func (storage *SimpleTypedStorage) Destroy() {}

func (storage *SimpleTypedStorage) Get(ctx context.Context, id string, options *metav1.GetOptions) (runtime.Object, error) {}

func (storage *SimpleTypedStorage) checkContext(ctx context.Context) {}

func (storage *SimpleTypedStorage) GetSingularName() string {}

func bodyOrDie(response *http.Response) string {}

func extractBody(response *http.Response, object runtime.Object) (string, error) {}

func extractBodyDecoder(response *http.Response, object runtime.Object, decoder runtime.Decoder) (string, error) {}

func extractBodyObject(response *http.Response, decoder runtime.Decoder) (runtime.Object, string, error) {}

func TestNotFound(t *testing.T) {}

type UnimplementedRESTStorage

func (UnimplementedRESTStorage) NamespaceScoped() bool {}

func (UnimplementedRESTStorage) New() runtime.Object {}

func (UnimplementedRESTStorage) Destroy() {}

func (UnimplementedRESTStorage) GetSingularName() string {}

// TestUnimplementedRESTStorage ensures that if a rest.Storage does not implement a given
// method, that it is literally not registered with the server.  In the past,
// we registered everything, and returned method not supported if it didn't support
// a verb.  Now we literally do not register a storage if it does not implement anything.
// TODO: in future, we should update proxy/redirect
func TestUnimplementedRESTStorage(t *testing.T) {}

type OnlyGetRESTStorage

func (OnlyGetRESTStorage) Get(ctx context.Context, id string, options *metav1.GetOptions) (runtime.Object, error) {}

func (OnlyGetRESTStorage) NewList() runtime.Object {}

func (OnlyGetRESTStorage) List(ctx context.Context, options *metainternalversion.ListOptions) (runtime.Object, error) {}

func (OnlyGetRESTStorage) ConvertToTable(ctx context.Context, object runtime.Object, tableOptions runtime.Object) (*metav1.Table, error) {}

// TestSomeUnimplementedRESTStorage ensures that if a rest.Storage does
// not implement a given method, that it is literally not registered
// with the server. We need to have at least one verb supported inorder
// to get a MethodNotAllowed rather than NotFound error.
func TestSomeUnimplementedRESTStorage(t *testing.T) {}

func TestList(t *testing.T) {}

func TestRequestsWithInvalidQuery(t *testing.T) {}

func TestListCompression(t *testing.T) {}

func TestLogs(t *testing.T) {}

func TestErrorList(t *testing.T) {}

func TestNonEmptyList(t *testing.T) {}

func TestMetadata(t *testing.T) {}

func TestGet(t *testing.T) {}

func BenchmarkGet(b *testing.B) {}

func BenchmarkGetNoCompression(b *testing.B) {}

func TestGetCompression(t *testing.T) {}

func TestGetPretty(t *testing.T) {}

func TestGetTable(t *testing.T) {}

func TestWatchTable(t *testing.T) {}

func watcher(mediaType string, r io.ReadCloser) streaming.Decoder {}

func TestGetPartialObjectMetadata(t *testing.T) {}

func TestGetBinary(t *testing.T) {}

func validateSimpleGetOptionsParams(t *testing.T, route *restful.Route) {}

func TestGetWithOptionsRouteParams(t *testing.T) {}

func TestGetWithOptions(t *testing.T) {}

func TestGetMissing(t *testing.T) {}

func TestGetRetryAfter(t *testing.T) {}

func TestConnect(t *testing.T) {}

func TestConnectResponderObject(t *testing.T) {}

func TestConnectResponderError(t *testing.T) {}

func TestConnectWithOptionsRouteParams(t *testing.T) {}

func TestConnectWithOptions(t *testing.T) {}

func TestConnectWithOptionsAndPath(t *testing.T) {}

func TestDelete(t *testing.T) {}

func TestDeleteWithOptions(t *testing.T) {}

func TestDeleteWithOptionsQuery(t *testing.T) {}

func TestDeleteWithOptionsQueryAndBody(t *testing.T) {}

func TestDeleteInvokesAdmissionControl(t *testing.T) {}

func TestDeleteMissing(t *testing.T) {}

func TestUpdate(t *testing.T) {}

func TestUpdateInvokesAdmissionControl(t *testing.T) {}

func TestUpdateRequiresMatchingName(t *testing.T) {}

func TestUpdateAllowsMissingNamespace(t *testing.T) {}

// when the object name and namespace can't be retrieved, don't update.  It isn't safe.
func TestUpdateDisallowsMismatchedNamespaceOnError(t *testing.T) {}

func TestUpdatePreventsMismatchedNamespace(t *testing.T) {}

func TestUpdateMissing(t *testing.T) {}

func TestCreateNotFound(t *testing.T) {}

func TestCreateChecksDecode(t *testing.T) {}

func TestParentResourceIsRequired(t *testing.T) {}

func TestNamedCreaterWithName(t *testing.T) {}

func TestNamedCreaterWithoutName(t *testing.T) {}

type namePopulatorAdmissionControl

func (npac *namePopulatorAdmissionControl) Validate(ctx context.Context, a admission.Attributes, o admission.ObjectInterfaces) (err error) {}

func (npac *namePopulatorAdmissionControl) Handles(operation admission.Operation) bool {}

var _

func TestNamedCreaterWithGenerateName(t *testing.T) {}

func TestUpdateChecksDecode(t *testing.T) {}

func TestCreate(t *testing.T) {}

func TestCreateYAML(t *testing.T) {}

func TestCreateInNamespace(t *testing.T) {}

func TestCreateInvokeAdmissionControl(t *testing.T) {}

func expectAPIStatus(t *testing.T, method, url string, data []byte, code int) *metav1.Status {}

func TestDelayReturnsError(t *testing.T) {}

type UnregisteredAPIObject

func (obj *UnregisteredAPIObject) GetObjectKind() schema.ObjectKind {}

func (obj *UnregisteredAPIObject) DeepCopyObject() runtime.Object {}

func TestWriteJSONDecodeError(t *testing.T) {}

type marshalError

func (m *marshalError) MarshalJSON() ([]byte, error) {}

func TestWriteRAWJSONMarshalError(t *testing.T) {}

func TestCreateTimeout(t *testing.T) {}

func TestCreateChecksAPIVersion(t *testing.T) {}

func TestCreateDefaultsAPIVersion(t *testing.T) {}

func TestUpdateChecksAPIVersion(t *testing.T) {}

// runRequest is used by TestDryRun since it runs the test twice in a
// row with a slightly different URL (one has ?dryRun, one doesn't).
func runRequest(t testing.TB, path, verb string, data []byte, contentType string) *http.Response {}

type SimpleRESTStorageWithDeleteCollection

// Delete collection doesn't do much, but let us test this path.
func (storage *SimpleRESTStorageWithDeleteCollection) DeleteCollection(ctx context.Context, deleteValidation rest.ValidateObjectFunc, options *metav1.DeleteOptions, listOptions *metainternalversion.ListOptions) (runtime.Object, error) {}

var strictFieldValidation

var warnFieldValidation

var ignoreFieldValidation

// TestFieldValidation tests the create, update, and patch handlers for correctness when faced with field validation errors.
func TestFieldValidation(t *testing.T) {}

// BenchmarkFieldValidation benchmarks the create, update, and patch handlers for performance distinctions between
// strict, warn, and ignore field validation handling.
func BenchmarkFieldValidation(b *testing.B) {}

type SimpleXGSubresourceRESTStorage

var _

func (storage *SimpleXGSubresourceRESTStorage) New() runtime.Object {}

func (storage *SimpleXGSubresourceRESTStorage) Destroy() {}

func (storage *SimpleXGSubresourceRESTStorage) Get(ctx context.Context, id string, options *metav1.GetOptions) (runtime.Object, error) {}

func (storage *SimpleXGSubresourceRESTStorage) Delete(ctx context.Context, name string, deleteValidation rest.ValidateObjectFunc, options *metav1.DeleteOptions) (runtime.Object, bool, error) {}

func (storage *SimpleXGSubresourceRESTStorage) GroupVersionKind(containingGV schema.GroupVersion) schema.GroupVersionKind {}

func (storage *SimpleXGSubresourceRESTStorage) GetSingularName() string {}

func TestXGSubresource(t *testing.T) {}

func readBodyOrDie(r io.Reader) []byte {}

// BenchmarkUpdateProtobuf measures the cost of processing an update on the server in proto
func BenchmarkUpdateProtobuf(b *testing.B) {}

func newTestServer(handler http.Handler) *httptest.Server {}

func newTestRequestInfoResolver() *request.RequestInfoFactory {}

const benchmarkSeed

func benchmarkItems(b *testing.B) []example.Pod {}