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:
- Kubernetes objects
- Pipelines (https://github.com/tektoncd/pipeline#pipeline)
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 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 }
Click to show internal directories.
Click to hide internal directories.