Documentation ¶
Overview ¶
Package registrytest provides tests for Registry implementations for storing Minions, Pods, Schedulers and Services.
Index ¶
- func MakeNodeList(nodes []string, nodeResources api.NodeResources) *api.NodeList
- func NewEtcdStorage(t *testing.T, group string) (storage.Interface, *tools.FakeEtcdClient)
- type EndpointRegistry
- func (e *EndpointRegistry) DeleteEndpoints(ctx api.Context, name string) error
- func (e *EndpointRegistry) GetEndpoints(ctx api.Context, name string) (*api.Endpoints, error)
- func (e *EndpointRegistry) ListEndpoints(ctx api.Context, options *api.ListOptions) (*api.EndpointsList, error)
- func (e *EndpointRegistry) UpdateEndpoints(ctx api.Context, endpoints *api.Endpoints) error
- func (e *EndpointRegistry) WatchEndpoints(ctx api.Context, options *api.ListOptions) (watch.Interface, error)
- type NodeRegistry
- func (r *NodeRegistry) CreateNode(ctx api.Context, node *api.Node) error
- func (r *NodeRegistry) DeleteNode(ctx api.Context, nodeID string) error
- func (r *NodeRegistry) GetNode(ctx api.Context, nodeID string) (*api.Node, error)
- func (r *NodeRegistry) ListNodes(ctx api.Context, options *api.ListOptions) (*api.NodeList, error)
- func (r *NodeRegistry) SetError(err error)
- func (r *NodeRegistry) UpdateNode(ctx api.Context, node *api.Node) error
- func (r *NodeRegistry) WatchNodes(ctx api.Context, options *api.ListOptions) (watch.Interface, error)
- type ServiceRegistry
- func (r *ServiceRegistry) CreateService(ctx api.Context, svc *api.Service) (*api.Service, error)
- func (r *ServiceRegistry) DeleteService(ctx api.Context, id string) error
- func (r *ServiceRegistry) GetService(ctx api.Context, id string) (*api.Service, error)
- func (r *ServiceRegistry) ListServices(ctx api.Context, options *api.ListOptions) (*api.ServiceList, error)
- func (r *ServiceRegistry) SetError(err error)
- func (r *ServiceRegistry) UpdateService(ctx api.Context, svc *api.Service) (*api.Service, error)
- func (r *ServiceRegistry) WatchServices(ctx api.Context, options *api.ListOptions) (watch.Interface, error)
- type Tester
- func (t *Tester) AllowCreateOnUpdate() *Tester
- func (t *Tester) ClusterScope() *Tester
- func (t *Tester) GeneratesName() *Tester
- func (t *Tester) ReturnDeletedObject() *Tester
- func (t *Tester) TestCreate(valid runtime.Object, invalid ...runtime.Object)
- func (t *Tester) TestDelete(valid runtime.Object)
- func (t *Tester) TestDeleteGraceful(valid runtime.Object, expectedGrace int64)
- func (t *Tester) TestGet(valid runtime.Object)
- func (t *Tester) TestList(valid runtime.Object)
- func (t *Tester) TestNamespace() string
- func (t *Tester) TestUpdate(valid runtime.Object, validUpdateFunc UpdateFunc, ...)
- func (t *Tester) TestWatch(valid runtime.Object, labelsPass, labelsFail []labels.Set, ...)
- type UpdateFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MakeNodeList ¶
func MakeNodeList(nodes []string, nodeResources api.NodeResources) *api.NodeList
MakeNodeList constructs api.NodeList from list of node names and a NodeResource.
func NewEtcdStorage ¶
Types ¶
type EndpointRegistry ¶
type EndpointRegistry struct { Endpoints *api.EndpointsList Updates []api.Endpoints Err error // contains filtered or unexported fields }
Registry is an interface for things that know how to store endpoints.
func (*EndpointRegistry) DeleteEndpoints ¶
func (e *EndpointRegistry) DeleteEndpoints(ctx api.Context, name string) error
func (*EndpointRegistry) GetEndpoints ¶
func (*EndpointRegistry) ListEndpoints ¶
func (e *EndpointRegistry) ListEndpoints(ctx api.Context, options *api.ListOptions) (*api.EndpointsList, error)
func (*EndpointRegistry) UpdateEndpoints ¶
func (*EndpointRegistry) WatchEndpoints ¶
func (e *EndpointRegistry) WatchEndpoints(ctx api.Context, options *api.ListOptions) (watch.Interface, error)
type NodeRegistry ¶
NodeRegistry implements node.Registry interface.
func NewNodeRegistry ¶
func NewNodeRegistry(nodes []string, nodeResources api.NodeResources) *NodeRegistry
func (*NodeRegistry) CreateNode ¶
func (*NodeRegistry) DeleteNode ¶
func (r *NodeRegistry) DeleteNode(ctx api.Context, nodeID string) error
func (*NodeRegistry) ListNodes ¶
func (r *NodeRegistry) ListNodes(ctx api.Context, options *api.ListOptions) (*api.NodeList, error)
func (*NodeRegistry) SetError ¶
func (r *NodeRegistry) SetError(err error)
func (*NodeRegistry) UpdateNode ¶
func (*NodeRegistry) WatchNodes ¶
func (r *NodeRegistry) WatchNodes(ctx api.Context, options *api.ListOptions) (watch.Interface, error)
type ServiceRegistry ¶
type ServiceRegistry struct { List api.ServiceList Service *api.Service Updates []api.Service Err error DeletedID string GottenID string UpdatedID string // contains filtered or unexported fields }
func NewServiceRegistry ¶
func NewServiceRegistry() *ServiceRegistry
func (*ServiceRegistry) CreateService ¶
func (*ServiceRegistry) DeleteService ¶
func (r *ServiceRegistry) DeleteService(ctx api.Context, id string) error
func (*ServiceRegistry) GetService ¶
func (*ServiceRegistry) ListServices ¶
func (r *ServiceRegistry) ListServices(ctx api.Context, options *api.ListOptions) (*api.ServiceList, error)
func (*ServiceRegistry) SetError ¶
func (r *ServiceRegistry) SetError(err error)
func (*ServiceRegistry) UpdateService ¶
func (*ServiceRegistry) WatchServices ¶
func (r *ServiceRegistry) WatchServices(ctx api.Context, options *api.ListOptions) (watch.Interface, error)
type Tester ¶
type Tester struct {
// contains filtered or unexported fields
}
func New ¶
func New(t *testing.T, fakeClient *tools.FakeEtcdClient, storage *etcdgeneric.Etcd) *Tester
func (*Tester) AllowCreateOnUpdate ¶
func (*Tester) ClusterScope ¶
func (*Tester) GeneratesName ¶
func (*Tester) ReturnDeletedObject ¶
func (*Tester) TestCreate ¶
func (*Tester) TestDelete ¶
func (*Tester) TestDeleteGraceful ¶
func (*Tester) TestNamespace ¶
func (*Tester) TestUpdate ¶
func (t *Tester) TestUpdate(valid runtime.Object, validUpdateFunc UpdateFunc, invalidUpdateFunc ...UpdateFunc)
Click to show internal directories.
Click to hide internal directories.