Documentation
¶
Index ¶
- Variables
- func CreateBroker(clients *test.Clients, broker *v1alpha1.Broker, logf logging.FormatLogger, ...) error
- func CreateChannel(clients *test.Clients, channel *v1alpha1.Channel, _ logging.FormatLogger, ...) error
- func CreateClusterRoleBinding(clients *test.Clients, crb *rbacv1.ClusterRoleBinding, _ logging.FormatLogger, ...) error
- func CreateNamespaceIfNeeded(t *testing.T, clients *test.Clients, namespace string, ...)
- func CreatePod(clients *test.Clients, pod *corev1.Pod, _ logging.FormatLogger, ...) error
- func CreatePodAndServiceReady(clients *test.Clients, pod *corev1.Pod, svc *corev1.Service, ...) (*corev1.Pod, error)
- func CreateService(clients *test.Clients, svc *corev1.Service, _ logging.FormatLogger, ...) error
- func CreateServiceAccount(clients *test.Clients, sa *corev1.ServiceAccount, _ logging.FormatLogger, ...) error
- func CreateServiceAccountAndBinding(clients *test.Clients, saName, crName, namespace string, ...) error
- func CreateSubscription(clients *test.Clients, sub *v1alpha1.Subscription, _ logging.FormatLogger, ...) error
- func CreateTrigger(clients *test.Clients, trigger *v1alpha1.Trigger, logf logging.FormatLogger, ...) error
- func DeleteNameSpace(clients *test.Clients, namespace string) error
- func FindAnyLogContents(clients *test.Clients, logf logging.FormatLogger, podName string, ...) (bool, error)
- func GetBaseFuncName(fullFuncName string) string
- func LabelNamespace(clients *test.Clients, namespace string, labels map[string]string, ...) error
- func SendFakeEventToBroker(clients *test.Clients, event *test.CloudEvent, broker *v1alpha1.Broker, ...) error
- func SendFakeEventToChannel(clients *test.Clients, event *test.CloudEvent, channel *v1alpha1.Channel, ...) error
- func Setup(t *testing.T, runInParallel bool, logf logging.FormatLogger) (*test.Clients, string, string, *test.Cleaner)
- func TearDown(clients *test.Clients, namespace string, cleaner *test.Cleaner, ...)
- func WaitForAllTriggersReady(clients *test.Clients, namespace string, logf logging.FormatLogger) error
- func WaitForBrokerReady(clients *test.Clients, broker *v1alpha1.Broker) error
- func WaitForLogContentCount(client *test.Clients, podName, containerName, namespace, content string, ...) error
- func WaitForLogContents(clients *test.Clients, logf logging.FormatLogger, podName string, ...) error
- func WaitForServiceAccountExists(t *testing.T, clients *test.Clients, name, namespace string, ...) error
- func WithBrokerReady(clients *test.Clients, broker *v1alpha1.Broker, logf logging.FormatLogger, ...) error
- func WithChannelsAndSubscriptionsReady(clients *test.Clients, namespace string, chans *[]*v1alpha1.Channel, ...) error
- func WithTriggerReady(clients *test.Clients, trigger *v1alpha1.Trigger, logf logging.FormatLogger, ...) error
Constants ¶
This section is empty.
Variables ¶
var ClusterChannelProvisionerToTest = clusterChannelProvisioner{/* contains filtered or unexported fields */}
ClusterChannelProvisionerToTest hold the CCP that is used to run the test case. It's default to be the first one that is passed through the clusterChannelProvisioners flag. And it can be changed in main_test.go for test case setup.
Functions ¶
func CreateBroker ¶ added in v0.5.0
func CreateBroker(clients *test.Clients, broker *v1alpha1.Broker, logf logging.FormatLogger, cleaner *test.Cleaner) error
CreateBroker will create a Broker.
func CreateChannel ¶
func CreateChannel(clients *test.Clients, channel *v1alpha1.Channel, _ logging.FormatLogger, cleaner *test.Cleaner) error
CreateChannel will create a Channel.
func CreateClusterRoleBinding ¶
func CreateClusterRoleBinding(clients *test.Clients, crb *rbacv1.ClusterRoleBinding, _ logging.FormatLogger, cleaner *test.Cleaner) error
CreateClusterRoleBinding will create a service account binding.
func CreateNamespaceIfNeeded ¶ added in v0.6.0
func CreateNamespaceIfNeeded(t *testing.T, clients *test.Clients, namespace string, logf logging.FormatLogger)
CreateNamespaceIfNeeded creates a new namespace if it does not exist.
func CreatePod ¶
func CreatePod(clients *test.Clients, pod *corev1.Pod, _ logging.FormatLogger, cleaner *test.Cleaner) error
CreatePod will create a Pod.
func CreatePodAndServiceReady ¶ added in v0.6.0
func CreatePodAndServiceReady(clients *test.Clients, pod *corev1.Pod, svc *corev1.Service, logf logging.FormatLogger, cleaner *test.Cleaner) (*corev1.Pod, error)
CreatePodAndServiceReady will create a Pod and Service, and wait for them to become ready.
func CreateService ¶ added in v0.4.0
func CreateService(clients *test.Clients, svc *corev1.Service, _ logging.FormatLogger, cleaner *test.Cleaner) error
CreateService will create a Service.
func CreateServiceAccount ¶
func CreateServiceAccount(clients *test.Clients, sa *corev1.ServiceAccount, _ logging.FormatLogger, cleaner *test.Cleaner) error
CreateServiceAccount will create a service account.
func CreateServiceAccountAndBinding ¶
func CreateServiceAccountAndBinding(clients *test.Clients, saName, crName, namespace string, logf logging.FormatLogger, cleaner *test.Cleaner) error
CreateServiceAccountAndBinding creates both ServiceAccount and ClusterRoleBinding with default cluster-admin role.
func CreateSubscription ¶
func CreateSubscription(clients *test.Clients, sub *v1alpha1.Subscription, _ logging.FormatLogger, cleaner *test.Cleaner) error
CreateSubscription will create a Subscription.
func CreateTrigger ¶ added in v0.5.0
func CreateTrigger(clients *test.Clients, trigger *v1alpha1.Trigger, logf logging.FormatLogger, cleaner *test.Cleaner) error
CreateTrigger will create a Trigger.
func DeleteNameSpace ¶ added in v0.6.0
DeleteNameSpace deletes the namespace that has the given name.
func FindAnyLogContents ¶ added in v0.5.0
func FindAnyLogContents(clients *test.Clients, logf logging.FormatLogger, podName string, containerName string, namespace string, contents []string) (bool, error)
FindAnyLogContents attempts to find logs for given Pod/Container that has 'any' of the given contents. It returns an error if it couldn't retrieve the logs. In case 'any' of the contents are there, it returns true.
func GetBaseFuncName ¶ added in v0.6.0
GetBaseFuncName returns the baseFuncName parsed from the fullFuncName. eg. test/e2e.TestMain will return TestMain. TODO(Fredy-Z): many functions in this file can be moved to knative/pkg/test to make it cleaner.
func LabelNamespace ¶ added in v0.5.0
func LabelNamespace(clients *test.Clients, namespace string, labels map[string]string, logf logging.FormatLogger) error
LabelNamespace labels the given namespace with the labels map.
func SendFakeEventToBroker ¶ added in v0.6.0
func SendFakeEventToBroker(clients *test.Clients, event *test.CloudEvent, broker *v1alpha1.Broker, logf logging.FormatLogger, cleaner *test.Cleaner) error
SendFakeEventToBroker will create fake CloudEvent and send it to the given broker.
func SendFakeEventToChannel ¶ added in v0.6.0
func SendFakeEventToChannel(clients *test.Clients, event *test.CloudEvent, channel *v1alpha1.Channel, logf logging.FormatLogger, cleaner *test.Cleaner) error
SendFakeEventToChannel will create fake CloudEvent and send it to the given channel.
func Setup ¶
func Setup(t *testing.T, runInParallel bool, logf logging.FormatLogger) (*test.Clients, string, string, *test.Cleaner)
Setup validates namespace and provisioner, creates the client objects needed in the e2e tests.
func TearDown ¶
func TearDown(clients *test.Clients, namespace string, cleaner *test.Cleaner, logf logging.FormatLogger)
TearDown will delete created names using clients.
func WaitForAllTriggersReady ¶ added in v0.5.0
func WaitForAllTriggersReady(clients *test.Clients, namespace string, logf logging.FormatLogger) error
WaitForAllTriggersReady will wait until all triggers in the given namespace are ready.
func WaitForBrokerReady ¶ added in v0.5.0
WaitForBrokerReady waits until the broker is Ready.
func WaitForLogContentCount ¶ added in v0.6.0
func WaitForLogContentCount(client *test.Clients, podName, containerName, namespace, content string, appearTimes int) error
WaitForLogContentCount checks if the number of substr occur times equals the given number. If the content does not appear the given times it returns error.
func WaitForLogContents ¶ added in v0.5.0
func WaitForLogContents(clients *test.Clients, logf logging.FormatLogger, podName string, containerName string, namespace string, contents []string) error
WaitForLogContents waits until logs for given Pod/Container include the given contents. If the contents are not present within timeout it returns error.
func WaitForServiceAccountExists ¶ added in v0.6.0
func WaitForServiceAccountExists(t *testing.T, clients *test.Clients, name, namespace string, logf logging.FormatLogger) error
WaitForServiceAccountExists waits until the ServiceAccount exists.
func WithBrokerReady ¶ added in v0.5.0
func WithBrokerReady(clients *test.Clients, broker *v1alpha1.Broker, logf logging.FormatLogger, cleaner *test.Cleaner) error
WithBrokerReady creates a Broker and waits until it is Ready.
func WithChannelsAndSubscriptionsReady ¶ added in v0.6.0
func WithChannelsAndSubscriptionsReady(clients *test.Clients, namespace string, chans *[]*v1alpha1.Channel, subs *[]*v1alpha1.Subscription, logf logging.FormatLogger, cleaner *test.Cleaner) error
WithChannelsAndSubscriptionsReady creates Channels and Subscriptions and waits until all are Ready. When they are ready, chans and subs are altered to get the real Channels and Subscriptions.
Types ¶
This section is empty.