testclient

package
v1.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 14, 2015 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFixtureClients

NewFixtureClients returns mocks of the OpenShift and Kubernetes clients

Types

type Fake

type Fake struct {
	// Fake by default keeps a simple list of the methods that have been called.
	Actions []FakeAction
	Err     error
	// ReactFn is an optional function that will be invoked with the provided action
	// and return a response.
	ReactFn ktestclient.ReactionFunc
}

Fake implements 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 NewSimpleFake

func NewSimpleFake(objects ...runtime.Object) *Fake

NewSimpleFake returns a client that will respond with the provided objects

func (*Fake) BuildConfigs

func (c *Fake) BuildConfigs(namespace string) client.BuildConfigInterface

BuildConfigs provides a fake REST client for BuildConfigs

func (*Fake) BuildLogs

func (c *Fake) BuildLogs(namespace string) client.BuildLogsInterface

BuildLogs provides a fake REST client for BuildLogs

func (*Fake) Builds

func (c *Fake) Builds(namespace string) client.BuildInterface

Builds provides a fake REST client for Builds

func (*Fake) ClusterNetwork

func (c *Fake) ClusterNetwork() client.ClusterNetworkInterface

ClusterNetwork provides a fake REST client for ClusterNetwork

func (*Fake) ClusterPolicies

func (c *Fake) ClusterPolicies() client.ClusterPolicyInterface

ClusterPolicies provides a fake REST client for ClusterPolicies

func (*Fake) ClusterPolicyBindings

func (c *Fake) ClusterPolicyBindings() client.ClusterPolicyBindingInterface

ClusterPolicyBindings provides a fake REST client for ClusterPolicyBindings

func (*Fake) ClusterResourceAccessReviews

func (c *Fake) ClusterResourceAccessReviews() client.ResourceAccessReviewInterface

ClusterResourceAccessReviews provides a fake REST client for ClusterResourceAccessReviews

func (*Fake) ClusterRoleBindings

func (c *Fake) ClusterRoleBindings() client.ClusterRoleBindingInterface

ClusterRoleBindings provides a fake REST client for ClusterRoleBindings

func (*Fake) ClusterRoles

func (c *Fake) ClusterRoles() client.ClusterRoleInterface

ClusterRoles provides a fake REST client for ClusterRoles

func (*Fake) ClusterSubjectAccessReviews

func (c *Fake) ClusterSubjectAccessReviews() client.SubjectAccessReviewInterface

ClusterSubjectAccessReviews provides a fake REST client for ClusterSubjectAccessReviews

func (*Fake) DeploymentConfigs

func (c *Fake) DeploymentConfigs(namespace string) client.DeploymentConfigInterface

DeploymentConfigs provides a fake REST client for DeploymentConfigs

func (*Fake) HostSubnets

func (c *Fake) HostSubnets() client.HostSubnetInterface

HostSubnets provides a fake REST client for HostSubnets

func (*Fake) Identities

func (c *Fake) Identities() client.IdentityInterface

Identities provides a fake REST client for Identities

func (*Fake) ImageStreamImages

func (c *Fake) ImageStreamImages(namespace string) client.ImageStreamImageInterface

ImageStreamImages provides a fake REST client for ImageStreamImages

func (*Fake) ImageStreamMappings

func (c *Fake) ImageStreamMappings(namespace string) client.ImageStreamMappingInterface

ImageStreamMappings provides a fake REST client for ImageStreamMappings

func (*Fake) ImageStreamTags

func (c *Fake) ImageStreamTags(namespace string) client.ImageStreamTagInterface

ImageStreamTags provides a fake REST client for ImageStreamTags

func (*Fake) ImageStreams

func (c *Fake) ImageStreams(namespace string) client.ImageStreamInterface

ImageStreams provides a fake REST client for ImageStreams

func (*Fake) Images

func (c *Fake) Images() client.ImageInterface

Images provides a fake REST client for Images

func (*Fake) Invokes

func (c *Fake) Invokes(action FakeAction, obj runtime.Object) (runtime.Object, error)

Invokes registers the passed fake action and reacts on it if a ReactFn has been defined

func (*Fake) OAuthAccessTokens

func (c *Fake) OAuthAccessTokens() client.OAuthAccessTokenInterface

OAuthAccessTokens provides a fake REST client for OAuthAccessTokens

func (*Fake) Policies

func (c *Fake) Policies(namespace string) client.PolicyInterface

Policies provides a fake REST client for Policies

func (*Fake) PolicyBindings

func (c *Fake) PolicyBindings(namespace string) client.PolicyBindingInterface

PolicyBindings provides a fake REST client for PolicyBindings

func (*Fake) ProjectRequests

func (c *Fake) ProjectRequests() client.ProjectRequestInterface

ProjectRequests provides a fake REST client for ProjectRequests

func (*Fake) Projects

func (c *Fake) Projects() client.ProjectInterface

Projects provides a fake REST client for Projects

func (*Fake) ResourceAccessReviews

func (c *Fake) ResourceAccessReviews(namespace string) client.ResourceAccessReviewInterface

ResourceAccessReviews provides a fake REST client for ResourceAccessReviews

func (*Fake) RoleBindings

func (c *Fake) RoleBindings(namespace string) client.RoleBindingInterface

RoleBindings provides a fake REST client for RoleBindings

func (*Fake) Roles

func (c *Fake) Roles(namespace string) client.RoleInterface

Roles provides a fake REST client for Roles

func (*Fake) Routes

func (c *Fake) Routes(namespace string) client.RouteInterface

Routes provides a fake REST client for Routes

func (*Fake) SubjectAccessReviews

func (c *Fake) SubjectAccessReviews(namespace string) client.SubjectAccessReviewInterface

SubjectAccessReviews provides a fake REST client for SubjectAccessReviews

func (*Fake) TemplateConfigs

func (c *Fake) TemplateConfigs(namespace string) client.TemplateConfigInterface

TemplateConfigs provides a fake REST client for TemplateConfigs

func (*Fake) Templates

func (c *Fake) Templates(namespace string) client.TemplateInterface

Templates provides a fake REST client for Templates

func (*Fake) UserIdentityMappings

func (c *Fake) UserIdentityMappings() client.UserIdentityMappingInterface

UserIdentityMappings provides a fake REST client for UserIdentityMappings

func (*Fake) Users

func (c *Fake) Users() client.UserInterface

Users provides a fake REST client for Users

type FakeAction

type FakeAction ktestclient.FakeAction

FakeAction is a wrapper around the Kubernetes FakeAction. Used for faking various actions on resources.

type FakeBuildConfigs

type FakeBuildConfigs struct {
	Fake      *Fake
	Namespace string
}

FakeBuildConfigs implements BuildConfigInterface. Meant to be embedded into a struct to get a default implementation. This makes faking out just the methods you want to test easier.

func (*FakeBuildConfigs) Create

func (*FakeBuildConfigs) Delete

func (c *FakeBuildConfigs) Delete(name string) error

func (*FakeBuildConfigs) Get

func (*FakeBuildConfigs) Instantiate

func (c *FakeBuildConfigs) Instantiate(request *buildapi.BuildRequest) (result *buildapi.Build, err error)

func (*FakeBuildConfigs) List

func (*FakeBuildConfigs) Update

func (*FakeBuildConfigs) Watch

func (c *FakeBuildConfigs) Watch(label labels.Selector, field fields.Selector, resourceVersion string) (watch.Interface, error)

func (*FakeBuildConfigs) WebHookURL

func (c *FakeBuildConfigs) WebHookURL(name string, trigger *buildapi.BuildTriggerPolicy) (*url.URL, error)

type FakeBuildLogs

type FakeBuildLogs struct {
	Fake      *Fake
	Namespace string
}

FakeBuildLogs implements BuildLogsInterface. Meant to be embedded into a struct to get a default implementation. This makes faking out just the methods you want to test easier.

func (*FakeBuildLogs) Get

Get builds and returns a buildLog request

type FakeBuilds

type FakeBuilds struct {
	Fake      *Fake
	Namespace string
}

FakeBuilds implements BuildInterface. Meant to be embedded into a struct to get a default implementation. This makes faking out just the methods you want to test easier.

func (*FakeBuilds) Clone

func (c *FakeBuilds) Clone(request *buildapi.BuildRequest) (result *buildapi.Build, err error)

func (*FakeBuilds) Create

func (c *FakeBuilds) Create(build *buildapi.Build) (*buildapi.Build, error)

func (*FakeBuilds) Delete

func (c *FakeBuilds) Delete(name string) error

func (*FakeBuilds) Get

func (c *FakeBuilds) Get(name string) (*buildapi.Build, error)

func (*FakeBuilds) List

func (c *FakeBuilds) List(label labels.Selector, field fields.Selector) (*buildapi.BuildList, error)

func (*FakeBuilds) Update

func (c *FakeBuilds) Update(build *buildapi.Build) (*buildapi.Build, error)

func (*FakeBuilds) Watch

func (c *FakeBuilds) Watch(label labels.Selector, field fields.Selector, resourceVersion string) (watch.Interface, error)

type FakeClusterNetwork

type FakeClusterNetwork struct {
	Fake *Fake
}

FakeClusterNetwork implements ClusterNetworkInterface. Meant to be embedded into a struct to get a default implementation. This makes faking out just the methods you want to test easier.

func (*FakeClusterNetwork) Create

func (*FakeClusterNetwork) Get

type FakeClusterPolicies

type FakeClusterPolicies struct {
	Fake *Fake
}

FakeClusterPolicies implements ClusterPolicyInterface. Meant to be embedded into a struct to get a default implementation. This makes faking out just the methods you want to test easier.

func (*FakeClusterPolicies) Delete

func (c *FakeClusterPolicies) Delete(name string) error

func (*FakeClusterPolicies) Get

func (*FakeClusterPolicies) List

func (*FakeClusterPolicies) Watch

func (c *FakeClusterPolicies) Watch(label labels.Selector, field fields.Selector, resourceVersion string) (watch.Interface, error)

type FakeClusterPolicyBindings

type FakeClusterPolicyBindings struct {
	Fake *Fake
}

FakeClusterPolicyBindings implements ClusterPolicyBindingInterface. Meant to be embedded into a struct to get a default implementation. This makes faking out just the methods you want to test easier.

func (*FakeClusterPolicyBindings) Create

func (*FakeClusterPolicyBindings) Delete

func (c *FakeClusterPolicyBindings) Delete(name string) error

func (*FakeClusterPolicyBindings) Get

func (*FakeClusterPolicyBindings) List

func (*FakeClusterPolicyBindings) Watch

func (c *FakeClusterPolicyBindings) Watch(label labels.Selector, field fields.Selector, resourceVersion string) (watch.Interface, error)

type FakeClusterResourceAccessReviews

type FakeClusterResourceAccessReviews struct {
	Fake *Fake
}

func (*FakeClusterResourceAccessReviews) Create

type FakeClusterRoleBindings

type FakeClusterRoleBindings struct {
	Fake *Fake
}

FakeClusterRoleBindings implements ClusterRoleBindingInterface. Meant to be embedded into a struct to get a default implementation. This makes faking out just the methods you want to test easier.

func (*FakeClusterRoleBindings) Create

func (*FakeClusterRoleBindings) Delete

func (c *FakeClusterRoleBindings) Delete(name string) error

func (*FakeClusterRoleBindings) Get

func (*FakeClusterRoleBindings) List

func (*FakeClusterRoleBindings) Update

type FakeClusterRoles

type FakeClusterRoles struct {
	Fake *Fake
}

FakeClusterRoles implements ClusterRoleInterface. Meant to be embedded into a struct to get a default implementation. This makes faking out just the methods you want to test easier.

func (*FakeClusterRoles) Create

func (*FakeClusterRoles) Delete

func (c *FakeClusterRoles) Delete(name string) error

func (*FakeClusterRoles) Get

func (*FakeClusterRoles) List

func (*FakeClusterRoles) Update

type FakeClusterSubjectAccessReviews

type FakeClusterSubjectAccessReviews struct {
	Fake *Fake
}

FakeClusterSubjectAccessReviews implements the ClusterSubjectAccessReviews interface. Meant to be embedded into a struct to get a default implementation. This makes faking out just the methods you want to test easier.

func (*FakeClusterSubjectAccessReviews) Create

type FakeDeploymentConfigs

type FakeDeploymentConfigs struct {
	Fake      *Fake
	Namespace string
}

FakeDeploymentConfigs implements DeploymentConfigInterface. Meant to be embedded into a struct to get a default implementation. This makes faking out just the methods you want to test easier.

func (*FakeDeploymentConfigs) Create

func (*FakeDeploymentConfigs) Delete

func (c *FakeDeploymentConfigs) Delete(name string) error

func (*FakeDeploymentConfigs) Generate

func (*FakeDeploymentConfigs) Get

func (*FakeDeploymentConfigs) List

func (*FakeDeploymentConfigs) Rollback

func (*FakeDeploymentConfigs) Update

func (*FakeDeploymentConfigs) Watch

func (c *FakeDeploymentConfigs) Watch(label labels.Selector, field fields.Selector, resourceVersion string) (watch.Interface, error)

type FakeHostSubnet

type FakeHostSubnet struct {
	Fake *Fake
}

FakeHostSubnet implements HostSubnetInterface. Meant to be embedded into a struct to get a default implementation. This makes faking out just the methods you want to test easier.

func (*FakeHostSubnet) Create

func (c *FakeHostSubnet) Create(sdn *sdnapi.HostSubnet) (*sdnapi.HostSubnet, error)

func (*FakeHostSubnet) Delete

func (c *FakeHostSubnet) Delete(name string) error

func (*FakeHostSubnet) Get

func (c *FakeHostSubnet) Get(name string) (*