Documentation ¶
Index ¶
- func NewTestScheme() *runtime.Scheme
- type FakeMetadataClient
- type FakeMetadataClusterClient
- func (f *FakeMetadataClusterClient) Cluster(clusterPath logicalcluster.Path) metadata.Getter
- func (f *FakeMetadataClusterClient) List(ctx context.Context, opts metav1.ListOptions) (*metav1.PartialObjectMetadataList, error)
- func (f *FakeMetadataClusterClient) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error)
- type FakeMetadataClusterClientset
- type MetadataClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewTestScheme ¶
NewTestScheme creates a unique Scheme for each test.
Types ¶
type FakeMetadataClient ¶
type FakeMetadataClient struct { *kcptesting.Fake // contains filtered or unexported fields }
func (*FakeMetadataClient) Resource ¶
func (c *FakeMetadataClient) Resource(resource schema.GroupVersionResource) metadata.Getter
Resource returns an interface for accessing the provided resource.
func (*FakeMetadataClient) Tracker ¶
func (c *FakeMetadataClient) Tracker() kcptesting.ScopedObjectTracker
type FakeMetadataClusterClient ¶
type FakeMetadataClusterClient struct { *kcptesting.Fake // contains filtered or unexported fields }
func (*FakeMetadataClusterClient) Cluster ¶
func (f *FakeMetadataClusterClient) Cluster(clusterPath logicalcluster.Path) metadata.Getter
func (*FakeMetadataClusterClient) List ¶
func (f *FakeMetadataClusterClient) List(ctx context.Context, opts metav1.ListOptions) (*metav1.PartialObjectMetadataList, error)
func (*FakeMetadataClusterClient) Watch ¶
func (f *FakeMetadataClusterClient) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error)
type FakeMetadataClusterClientset ¶
type FakeMetadataClusterClientset struct { *kcptesting.Fake // contains filtered or unexported fields }
FakeMetadataClusterClientset implements clientset.Interface. Meant to be embedded into a struct to get a default implementation. This makes faking out just the method you want to test easier.
func NewSimpleMetadataClient ¶
func NewSimpleMetadataClient(scheme *runtime.Scheme, objects ...runtime.Object) *FakeMetadataClusterClientset
NewSimpleMetadataClient creates a new client that will use the provided scheme and respond with the provided objects when requests are made. It will track actions made to the client which can be checked with GetActions().
func (*FakeMetadataClusterClientset) Cluster ¶
func (c *FakeMetadataClusterClientset) Cluster(clusterPath logicalcluster.Path) metadata.Interface
func (*FakeMetadataClusterClientset) Resource ¶
func (c *FakeMetadataClusterClientset) Resource(resource schema.GroupVersionResource) kcpmetadata.ResourceClusterInterface
func (*FakeMetadataClusterClientset) Tracker ¶
func (c *FakeMetadataClusterClientset) Tracker() kcptesting.ObjectTracker
type MetadataClient ¶
type MetadataClient interface { metadata.Getter CreateFake(obj *metav1.PartialObjectMetadata, opts metav1.CreateOptions, subresources ...string) (*metav1.PartialObjectMetadata, error) UpdateFake(obj *metav1.PartialObjectMetadata, opts metav1.UpdateOptions, subresources ...string) (*metav1.PartialObjectMetadata, error) }
MetadataClient assists in creating fake objects for use when testing, since metadata.Getter does not expose create
Click to show internal directories.
Click to hide internal directories.