Documentation ¶
Index ¶
- func ClusterRole(name string) *v1beta1.ClusterRole
- func GenerateNameReactor(randomLength int64) testing.ReactionFunc
- func Namespace(name string) *v1.Namespace
- func NamespaceWithAnnotations(name string, annotations map[string]string) *v1.Namespace
- func NewCreationTimestampReactor() testing.ReactionFunc
- func NewErrorReactor(expectedErr error) testing.ReactionFunc
- func ObjectKey(name string, namespace string) string
- func ObjectMeta(name string, namespace string) metav1.ObjectMeta
- func PipelineRun(name string, namespace string, spec api.PipelineSpec) *api.PipelineRun
- func SecretOpaque(name string, namespace string) *v1.Secret
- func SecretWithType(name string, namespace string, secretType v1.SecretType) *v1.Secret
- func ServiceAccount(name string, namespace string) *v1.ServiceAccount
- func Tenant(tenantID, namespace string) *api.Tenant
- type ClientFactory
- func (f *ClientFactory) CheckTimeOrder(start metav1.Time, end metav1.Time) bool
- func (f *ClientFactory) CoreV1() corev1.CoreV1Interface
- func (f *ClientFactory) Dynamic() dynamic.Interface
- func (f *ClientFactory) DynamicFake() *dynamicfake.FakeDynamicClient
- func (f *ClientFactory) KubernetesClientset() *kubernetes.Clientset
- func (f *ClientFactory) NetworkingV1() networkingv1.NetworkingV1Interface
- func (f *ClientFactory) RbacV1beta1() rbacv1beta1.RbacV1beta1Interface
- func (f *ClientFactory) Sleep(message string)
- func (f *ClientFactory) StewardClientset() *steward.Clientset
- func (f *ClientFactory) StewardInformerFactory() stewardinformer.SharedInformerFactory
- func (f *ClientFactory) StewardV1alpha1() stewardv1alpha1.StewardV1alpha1Interface
- func (f *ClientFactory) TektonClientset() *tektonclientfake.Clientset
- func (f *ClientFactory) TektonInformerFactory() tektoninformers.SharedInformerFactory
- func (f *ClientFactory) TektonV1alpha1() tektonclientv1alpha1.TektonV1alpha1Interface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClusterRole ¶
func ClusterRole(name string) *v1beta1.ClusterRole
ClusterRole creates a fake ClusterRole with defined name
func GenerateNameReactor ¶
func GenerateNameReactor(randomLength int64) testing.ReactionFunc
GenerateNameReactor returns a new ReactionFunc simulating resource name generation via `metadata.generateName` as performed by a K8s API Server. If `metadata.name` is NOT set and `metadata.generateName` is set to a non-empty string, this reactor sets `metadata.name` to the value of `metadata.generateName` with a random alphanumeric suffix of the given length appended. Note that the returned reactor does not guarantee uniqueness - it might generate a name that is already used in the fake clientset.
func NamespaceWithAnnotations ¶
NamespaceWithAnnotations creates a fake namespace with defined name and annotations.
func NewCreationTimestampReactor ¶
func NewCreationTimestampReactor() testing.ReactionFunc
NewCreationTimestampReactor returns a new ReactorFunc setting the creation time
func NewErrorReactor ¶
func NewErrorReactor(expectedErr error) testing.ReactionFunc
NewErrorReactor returns a new ReactorFunc returning an error
func ObjectMeta ¶
func ObjectMeta(name string, namespace string) metav1.ObjectMeta
ObjectMeta returns a fake ObjectMeta with a given name and namespace
func PipelineRun ¶
func PipelineRun(name string, namespace string, spec api.PipelineSpec) *api.PipelineRun
PipelineRun creates a new pipeline run object.
func SecretOpaque ¶
SecretOpaque creates a fake secret with defined name and type Opaque
func SecretWithType ¶
SecretWithType creates a fake secret with defined name
func ServiceAccount ¶
func ServiceAccount(name string, namespace string) *v1.ServiceAccount
ServiceAccount dummy
Types ¶
type ClientFactory ¶
type ClientFactory struct {
// contains filtered or unexported fields
}
ClientFactory is a factory for fake clients.
func NewClientFactory ¶
func NewClientFactory(objects ...runtime.Object) *ClientFactory
NewClientFactory creates a new ClientFactory
func (*ClientFactory) CheckTimeOrder ¶
CheckTimeOrder checks if the duration between start and end is at least one sleep duration long.
func (*ClientFactory) CoreV1 ¶
func (f *ClientFactory) CoreV1() corev1.CoreV1Interface
CoreV1 implements interface "github.com/SAP/stewardci-core/pkg/k8s".ClientFactory
func (*ClientFactory) Dynamic ¶ added in v0.2.0
func (f *ClientFactory) Dynamic() dynamic.Interface
Dynamic implements interface "github.com/SAP/stewardci-core/pkg/k8s".ClientFactory
func (*ClientFactory) DynamicFake ¶ added in v0.2.0
func (f *ClientFactory) DynamicFake() *dynamicfake.FakeDynamicClient
DynamicFake returns the dynamic Kubernetes fake client.
func (*ClientFactory) KubernetesClientset ¶
func (f *ClientFactory) KubernetesClientset() *kubernetes.Clientset
KubernetesClientset returns the Kubernetes fake clientset.
func (*ClientFactory) NetworkingV1 ¶ added in v0.2.0
func (f *ClientFactory) NetworkingV1() networkingv1.NetworkingV1Interface
NetworkingV1 implements interface "github.com/SAP/stewardci-core/pkg/k8s".ClientFactory
func (*ClientFactory) RbacV1beta1 ¶
func (f *ClientFactory) RbacV1beta1() rbacv1beta1.RbacV1beta1Interface
RbacV1beta1 implements interface "github.com/SAP/stewardci-core/pkg/k8s".ClientFactory
func (*ClientFactory) Sleep ¶
func (f *ClientFactory) Sleep(message string)
Sleep sleeps and logs the start and the end of the sleep.
func (*ClientFactory) StewardClientset ¶
func (f *ClientFactory) StewardClientset() *steward.Clientset
StewardClientset returns the Steward fake clientset.
func (*ClientFactory) StewardInformerFactory ¶
func (f *ClientFactory) StewardInformerFactory() stewardinformer.SharedInformerFactory
StewardInformerFactory implements interface "github.com/SAP/stewardci-core/pkg/k8s".ClientFactory
func (*ClientFactory) StewardV1alpha1 ¶
func (f *ClientFactory) StewardV1alpha1() stewardv1alpha1.StewardV1alpha1Interface
StewardV1alpha1 implements interface "github.com/SAP/stewardci-core/pkg/k8s".ClientFactory
func (*ClientFactory) TektonClientset ¶
func (f *ClientFactory) TektonClientset() *tektonclientfake.Clientset
TektonClientset returns the Tekton fake clientset.
func (*ClientFactory) TektonInformerFactory ¶
func (f *ClientFactory) TektonInformerFactory() tektoninformers.SharedInformerFactory
TektonInformerFactory implements interface "github.com/SAP/stewardci-core/pkg/k8s".ClientFactory
func (*ClientFactory) TektonV1alpha1 ¶
func (f *ClientFactory) TektonV1alpha1() tektonclientv1alpha1.TektonV1alpha1Interface
TektonV1alpha1 implements interface "github.com/SAP/stewardci-core/pkg/k8s".ClientFactory