Documentation
¶
Overview ¶
Package testk8s provides a fake Kubernetes cluster API for tests.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TransportTo ¶
func TransportTo(base *url.URL) func(agentID int64) http.RoundTripper
TransportTo is Transport for a server this package did not start.
Types ¶
type ClusterAPI ¶
type ClusterAPI struct {
// contains filtered or unexported fields
}
ClusterAPI is a fake cluster API server. It answers discovery for core v1 and delegates every other path to the handler it was built with.
func NewClusterAPI ¶
func NewClusterAPI(t *testing.T, objectHandler http.Handler) *ClusterAPI
NewClusterAPI starts a fake cluster API, stopped when the test ends.
func (*ClusterAPI) Served ¶
func (c *ClusterAPI) Served() []string
Served returns the paths requested so far, in order.
func (*ClusterAPI) Transport ¶
func (c *ClusterAPI) Transport() func(agentID int64) http.RoundTripper
Click to show internal directories.
Click to hide internal directories.