test

package
v0.0.0-...-d13c728 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2020 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Overview

Get access to client objects

To initialize client objects you can use the setup function. It returns a clients struct that contains initialized clients for accessing:

For example, to create a Pipeline

_, err = clients.PipelineClient.Pipelines.Create(test.Pipeline(namespaceName, pipelineName))

And you can use the client to clean up resources created by your test

func tearDown(clients *test.Clients) {
    if clients != nil {
        clients.Delete([]string{routeName}, []string{configName})
    }
}

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EventAssertion

func EventAssertion(t *testing.T, task func(namespace string) *v1beta1.Task, assertionSet []AssertionSet, brokerCreater eventinghelpers.BrokerCreator)

func PatchDefaultCloudEventSinkOrFail

func PatchDefaultCloudEventSinkOrFail(t *testing.T, c *pkgTest.KubeClient, sink string, ns string)

func WaitForTaskRunState

func WaitForTaskRunState(c *clients, name string, inState pipelineTest.ConditionAccessorFn) error

WaitForTaskRunState polls the status of the TaskRun called name from client every interval until inState returns `true` indicating it is done, returns an error or timeout. desc will be used to name the metric that is emitted to track how long it took for name to get into the state checked by inState.

Types

type AssertionSet

type AssertionSet struct {
	N        int
	Matchers []cetestv2.EventMatcher
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL