Documentation ¶
Index ¶
- func AddTektonResources(clientset *fakekubeclientset.Clientset)
- func CollectPodLogsWithLabel(c kubernetes.Interface, namespace, labelSelector string) (string, error)
- func CompareParams(x, y v1beta1.Param) bool
- func ConfigMapFromTestFile(t *testing.T, name string) *corev1.ConfigMap
- func FeatureFlagsToContext(ctx context.Context, flags map[string]string) (context.Context, error)
- func HMACHeader(t testing.TB, secret string, body []byte) string
- func RawExtension(t testing.TB, a interface{}) runtime.RawExtension
- func SetupFakeContext(t testing.TB) (context.Context, []controller.Informer)
- func ToUnstructured(t *testing.T, in interface{}) *unstructured.Unstructured
- func ToV1JSON(t testing.TB, v interface{}) apiextensionsv1.JSON
- func WaitFor(waitFunc wait.ConditionFunc) error
- type Assets
- type Clients
- type Resources
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddTektonResources ¶ added in v0.2.0
func AddTektonResources(clientset *fakekubeclientset.Clientset)
AddTektonResources will update clientset to know it knows about the types it is expected to be able to interact with.
func CollectPodLogsWithLabel ¶
func CollectPodLogsWithLabel(c kubernetes.Interface, namespace, labelSelector string) (string, error)
CollectPodLogsWithLabel will get the logs of all the Pods given a labelSelector
func CompareParams ¶ added in v0.2.0
CompareParams can be used with comparison options such as `cmpopts.SortSlices` so we can ignore the ordering of params.
func ConfigMapFromTestFile ¶ added in v0.16.0
ConfigMapFromTestFile creates a v1.ConfigMap from a YAML file It loads the YAML file from the testdata folder.
func FeatureFlagsToContext ¶ added in v0.16.0
FeatureFlagsToContext takes a map of feature flags and adds it to the context nolint:unused,deadcode
func HMACHeader ¶ added in v0.11.0
HMACHeader generates a X-Hub-Signature header given a secret token and the request body See https://developer.github.com/webhooks/securing/#validating-payloads-from-github
func RawExtension ¶ added in v0.9.0
func RawExtension(t testing.TB, a interface{}) runtime.RawExtension
RawExtenstion is a test helper to generate RawExtension objects for tests
func SetupFakeContext ¶ added in v0.18.0
func ToUnstructured ¶ added in v0.2.0
func ToUnstructured(t *testing.T, in interface{}) *unstructured.Unstructured
ToUnstructured returns an Unstructured object from interface in.
func ToV1JSON ¶ added in v0.13.0
func ToV1JSON(t testing.TB, v interface{}) apiextensionsv1.JSON
ToV1JSON is a wrapper around json.Marshal to easily convert to the Kubernetes apiextensionsv1.JSON type
func WaitFor ¶
func WaitFor(waitFunc wait.ConditionFunc) error
WaitFor waits for the specified ConditionFunc every internal until the timeout.
Types ¶
type Assets ¶ added in v0.2.0
type Assets struct { Controller *controller.Impl Clients Clients }
Assets holds references to the controller and clients.
type Clients ¶
type Clients struct { Kube *fakekubeclientset.Clientset Triggers *faketriggersclientset.Clientset Pipeline *fakepipelineclientset.Clientset Resource *fakeresourceclientset.Clientset DynamicClient *fakedynamic.FakeDynamicClient }
Clients holds references to clients which are useful for reconciler tests.
type Resources ¶ added in v0.2.0
type Resources struct { Namespaces []*corev1.Namespace ClusterTriggerBindings []*v1beta1.ClusterTriggerBinding EventListeners []*v1beta1.EventListener ClusterInterceptors []*v1alpha1.ClusterInterceptor TriggerBindings []*v1beta1.TriggerBinding TriggerTemplates []*v1beta1.TriggerTemplate Triggers []*v1beta1.Trigger Deployments []*appsv1.Deployment Services []*corev1.Service Secrets []*corev1.Secret ServiceAccounts []*corev1.ServiceAccount Pods []*corev1.Pod WithPod []*duckv1.WithPod }
Resources represents the desired state of the system (i.e. existing resources) to seed controllers with.
func GetResourcesFromClients ¶ added in v0.2.0
GetResourcesFromClients returns the Resources in the Clients provided Precondition: all Namespaces used in Resources must be listed in Resources.Namespaces nolint: golint