Documentation ¶
Index ¶
- Constants
- Variables
- func AddRandomFile(ctx context.Context, t *testing.T, bucketName, fileName, project string)
- func AssertMetrics(t *testing.T, client *Client, topicName, psName string)
- func DeleteTopicOrDie(t *testing.T, topicName string)
- func DuplicatePubSubSecret(client *eventingtestlib.Client)
- func GetTopic(t *testing.T, topicName string) *pubsub.Topic
- func MakeAuditLogsJobOrDie(client *Client, ...)
- func MakeAuditLogsOrDie(client *Client, ...)
- func MakeBucket(ctx context.Context, t *testing.T, project string) string
- func MakePubSubOrDie(client *Client, gvk metav1.GroupVersionKind, ...)
- func MakeSchedulerJobOrDie(client *Client, data, targetName string)
- func MakeSchedulerOrDie(client *Client, sName, data, targetName string, ...)
- func MakeStorageJobOrDie(client *Client, fileName, targetName string)
- func MakeStorageOrDie(client *Client, bucketName, storageName, targetName string, ...)
- func MakeTopicOrDie(t *testing.T) (string, func())
- func MakeTopicWithNameOrDie(t *testing.T, topicName string) (string, func())
- func TearDown(client *Client)
- func WithServiceForJob(name string) func(*batchv1.Job, *Client) error
- type Client
- func (c *Client) CreateAuditLogsOrFail(auditlogs *eventsv1alpha1.CloudAuditLogsSource)
- func (c *Client) CreateChannelOrFail(channel *messagingv1alpha1.Channel)
- func (c *Client) CreateJobOrFail(job *batchv1.Job, options ...func(*batchv1.Job, *Client) error)
- func (c *Client) CreatePubSubOrFail(pubsub *eventsv1alpha1.CloudPubSubSource)
- func (c *Client) CreatePullSubscriptionOrFail(pullsubscription *pubsubv1alpha1.PullSubscription)
- func (c *Client) CreateSchedulerOrFail(scheduler *eventsv1alpha1.CloudSchedulerSource)
- func (c *Client) CreateStorageOrFail(storage *eventsv1alpha1.CloudStorageSource)
- func (c *Client) CreateUnstructuredObjOrFail(spec *unstructured.Unstructured)
- func (c *Client) LogsFor(namespace, name string, tm *metav1.TypeMeta) (string, error)
- func (c *Client) SetupStackDriverMetrics(t *testing.T)
- func (c *Client) StackDriverEventCountMetricFor(namespace, projectID, filter string) (*int64, error)
- func (c *Client) WaitUntilJobDone(namespace, name string) (string, error)
- type TargetOutput
Constants ¶
View Source
const ( ProwProjectKey = "E2E_PROJECT_ID" EventCountMetricType = "custom.googleapis.com/cloud.google.com/source/event_count" GlobalMetricResourceType = "global" StorageResourceGroup = "storages.events.cloud.google.com" PubsubResourceGroup = "pubsubs.events.cloud.google.com" )
Variables ¶
View Source
var ChannelTypeMeta = messagingTypeMeta(resources.ChannelKind)
View Source
var CloudAuditLogsSourceTypeMeta = eventsTypeMeta(resources.CloudAuditLogsSourceKind)
View Source
var CloudPubSubSourceTypeMeta = eventsTypeMeta(resources.CloudPubSubSourceKind)
View Source
var CloudSchedulerSourceTypeMeta = eventsTypeMeta(resources.CloudSchedulerSourceKind)
View Source
var CloudStorageSourceTypeMeta = eventsTypeMeta(resources.CloudStorageSourceKind)
View Source
var JobTypeMeta = batchTypeMeta(resources.JobKind)
View Source
var KsvcTypeMeta = servingTypeMeta(resources.KServiceKind)
View Source
var PullSubscriptionTypeMeta = pubsubTypeMeta(resources.PullSubscriptionKind)
View Source
var ServiceGVK = metav1.GroupVersionKind{
Version: "v1",
Kind: "Service"}
Functions ¶
func AddRandomFile ¶
func DeleteTopicOrDie ¶
func DuplicatePubSubSecret ¶
func DuplicatePubSubSecret(client *eventingtestlib.Client)
DuplicatePubSubSecret duplicates the PubSub secret to the test namespace.
func MakeAuditLogsJobOrDie ¶
func MakeAuditLogsOrDie ¶
func MakeAuditLogsOrDie(client *Client, auditlogsName, methodName, project, resourceName, serviceName, targetName string, so ...kngcptesting.CloudAuditLogsSourceOption, )
func MakeBucket ¶
MakeBucket retrieves the bucket name for the test. If it does not exist, it will create it.
func MakePubSubOrDie ¶
func MakePubSubOrDie(client *Client, gvk metav1.GroupVersionKind, psName, targetName, topicName string, so ...kngcptesting.CloudPubSubSourceOption, )
func MakeSchedulerJobOrDie ¶
func MakeSchedulerOrDie ¶
func MakeSchedulerOrDie(client *Client, sName, data, targetName string, so ...kngcptesting.CloudSchedulerSourceOption, )
func MakeStorageJobOrDie ¶
func MakeStorageOrDie ¶
func MakeStorageOrDie(client *Client, bucketName, storageName, targetName string, so ...kngcptesting.CloudStorageSourceOption, )
func MakeTopicOrDie ¶
func MakeTopicWithNameOrDie ¶
Types ¶
type Client ¶
type Client struct { Core *lib.Client KnativeGCP *knativegcp.Clientset Namespace string T *testing.T Tracker *lib.Tracker }
Client holds instances of interfaces for making requests to Knative.
func (*Client) CreateAuditLogsOrFail ¶
func (c *Client) CreateAuditLogsOrFail(auditlogs *eventsv1alpha1.CloudAuditLogsSource)
func (*Client) CreateChannelOrFail ¶
func (c *Client) CreateChannelOrFail(channel *messagingv1alpha1.Channel)
func (*Client) CreateJobOrFail ¶
func (*Client) CreatePubSubOrFail ¶
func (c *Client) CreatePubSubOrFail(pubsub *eventsv1alpha1.CloudPubSubSource)
func (*Client) CreatePullSubscriptionOrFail ¶
func (c *Client) CreatePullSubscriptionOrFail(pullsubscription *pubsubv1alpha1.PullSubscription)
func (*Client) CreateSchedulerOrFail ¶
func (c *Client) CreateSchedulerOrFail(scheduler *eventsv1alpha1.CloudSchedulerSource)
func (*Client) CreateStorageOrFail ¶
func (c *Client) CreateStorageOrFail(storage *eventsv1alpha1.CloudStorageSource)
func (*Client) CreateUnstructuredObjOrFail ¶
func (c *Client) CreateUnstructuredObjOrFail(spec *unstructured.Unstructured)
func (*Client) LogsFor ¶
TODO(chizhg): move this function to knative/pkg/test or knative/eventing/test
func (*Client) SetupStackDriverMetrics ¶
type TargetOutput ¶
type TargetOutput struct {
Success bool `json:"success"`
}
Source Files ¶
Click to show internal directories.
Click to hide internal directories.