Documentation
¶
Index ¶
- Constants
- func Assert(t *testing.T, result *icmd.Result, expected icmd.Expected)
- func AssertOutput(t *testing.T, expected, actual interface{})
- func CollectPodLogs(c *Clients, podName, namespace string, logf logging.FormatLogger)
- func CreateNamespace(namespace string, kubeClient *knativetest.KubeClient)
- func CreateServiceAccountSecret(c *knativetest.KubeClient, namespace string, secretName string) (bool, error)
- func DeleteNamespace(namespace string, cs *Clients)
- func Details(pre v1alpha1.PipelineResource) string
- func GetPipeline(c *Clients, name string) *v1alpha1.Pipeline
- func GetPipelineDescribeOutput(t *testing.T, cs *Clients, pname string, td map[int]interface{}) string
- func GetPipelineList(c *Clients) *v1alpha1.PipelineList
- func GetPipelineListWithTestData(t *testing.T, c *Clients, td map[int]interface{}) *v1alpha1.PipelineList
- func GetPipelineResource(c *Clients, name string) *v1alpha1.PipelineResource
- func GetPipelineResourceList(c *Clients) *v1alpha1.PipelineResourceList
- func GetPipelineRun(c *Clients, name string) *v1alpha1.PipelineRun
- func GetPipelineRunList(c *Clients) *v1alpha1.PipelineRunList
- func GetPipelineRunListWithName(c *Clients, pname string) *v1alpha1.PipelineRunList
- func GetPipelineRunListWithNameAndTestData(t *testing.T, c *Clients, pname string, td map[int]interface{}) *v1alpha1.PipelineRunList
- func GetPipelineWithTestData(t *testing.T, c *Clients, name string, td map[int]interface{}) *v1alpha1.Pipeline
- func GetTask(c *Clients, name string) *v1alpha1.Task
- func GetTaskList(c *Clients) *v1alpha1.TaskList
- func GetTaskListWithTestData(t *testing.T, c *Clients, td map[int]interface{}) *v1alpha1.TaskList
- func GetTaskRun(c *Clients, name string) *v1alpha1.TaskRun
- func GetTaskRunList(c *Clients) *v1alpha1.TaskRunList
- func GetTaskRunListWithName(c *Clients, tname string) *v1alpha1.TaskRunList
- func GetTaskRunListWithTestData(t *testing.T, c *Clients, td map[int]interface{}) *v1alpha1.TaskRunList
- func Header(logf logging.FormatLogger, text string)
- func ListAllPipelinesOutput(t *testing.T, cs *Clients, td map[int]interface{}) string
- func ListAllTaskRunsOutput(t *testing.T, cs *Clients, allnamespaces bool, td map[int]interface{}) string
- func ListAllTasksOutput(t *testing.T, cs *Clients, td map[int]interface{}) string
- func ListResourceNamesForJSONPath(obj interface{}) string
- func PipelineRunHasFailed(pr *v1alpha1.PipelineRun) string
- func PodStatus(respond chan<- string, watch watch.Interface)
- func Process(t *template.Template, vars interface{}) string
- func ProcessString(str string, vars interface{}) string
- func ResourcePath(elem ...string) string
- func SortByStartTime(trs []v1alpha1.TaskRun)
- func SortResourcesByTypeAndName(pres []v1alpha1.PipelineDeclaredResource) []v1alpha1.PipelineDeclaredResource
- func TaskRunHasFailed(tr *v1alpha1.TaskRun) string
- func TearDown(t *testing.T, cs *Clients, namespace string)
- func VerifyServiceAccountExistence(namespace string, kubeClient *knativetest.KubeClient)
- func VerifyServiceAccountExistenceForSecrets(namespace string, kubeClient *knativetest.KubeClient, sa string)
- func WaitForPipelineRunState(c *Clients, name string, polltimeout time.Duration, inState PipelineRunStateFn, ...) error
- func WaitForPipelineRunToComplete(c *Clients, prname string, namespace string)
- func WaitForPipelineRunToStart(c *Clients, prname string, namespace string)
- func WaitForPodState(c *Clients, name string, namespace string, ...) error
- func WaitForPodStateKube(c *knativetest.KubeClient, namespace string, inState PodRunStateFn, ...) error
- func WaitForPodStatus(kubeClient *knativetest.KubeClient, namespace string)
- func WaitForServiceExternalIPState(c *Clients, namespace, name string, ...) error
- func WaitForTaskRunState(c *Clients, name string, inState TaskRunStateFn, desc string) error
- func WaitForTaskRunToBeStarted(c *Clients, trname string, namespace string)
- func WaitForTaskRunToComplete(c *Clients, trname string, namespace string)
- type Clients
- type Kubectl
- type PipelineDescribeData
- type PipelineRunStateFn
- type PipelinesListData
- type PodRunStateFn
- type Prompt
- type TaskData
- type TaskRefData
- type TaskRunData
- type TaskRunStateFn
- type TaskStateFn
- type TaskrunList
- type Test
- type TknRunner
- func (e TknRunner) CheckVersion(component string, version string) bool
- func (e TknRunner) Path() string
- func (e TknRunner) Run(args ...string) *icmd.Result
- func (e TknRunner) RunInteractiveTests(t *testing.T, ops *Prompt) *expect.Console
- func (e TknRunner) RunInteractiveTestsDummy(t *testing.T, ops *Prompt) *expect.Console
- func (e TknRunner) RunNoNamespace(args ...string) *icmd.Result
- func (e TknRunner) RunWithOption(option icmd.CmdOp, args ...string) *icmd.Result
- func (e TknRunner) TknNamespace() string
Constants ¶
const (
Apitimeout = 10 * time.Minute
)
Variables ¶
This section is empty.
Functions ¶
func AssertOutput ¶ added in v0.11.0
func CollectPodLogs ¶
func CollectPodLogs(c *Clients, podName, namespace string, logf logging.FormatLogger)
CollectPodLogs will get the logs for all containers in a Pod
func CreateNamespace ¶
func CreateNamespace(namespace string, kubeClient *knativetest.KubeClient)
func CreateServiceAccountSecret ¶
func CreateServiceAccountSecret(c *knativetest.KubeClient, namespace string, secretName string) (bool, error)
Create Service Account
func DeleteNamespace ¶
func Details ¶
func Details(pre v1alpha1.PipelineResource) string
func GetPipelineList ¶
func GetPipelineList(c *Clients) *v1alpha1.PipelineList
func GetPipelineResource ¶
func GetPipelineResource(c *Clients, name string) *v1alpha1.PipelineResource
func GetPipelineResourceList ¶
func GetPipelineResourceList(c *Clients) *v1alpha1.PipelineResourceList
func GetPipelineRun ¶
func GetPipelineRun(c *Clients, name string) *v1alpha1.PipelineRun
func GetPipelineRunList ¶
func GetPipelineRunList(c *Clients) *v1alpha1.PipelineRunList
func GetPipelineRunListWithName ¶
func GetPipelineRunListWithName(c *Clients, pname string) *v1alpha1.PipelineRunList
func GetPipelineWithTestData ¶
func GetTaskList ¶
func GetTaskListWithTestData ¶
func GetTaskRunList ¶
func GetTaskRunList(c *Clients) *v1alpha1.TaskRunList
func GetTaskRunListWithName ¶ added in v0.10.0
func GetTaskRunListWithName(c *Clients, tname string) *v1alpha1.TaskRunList
func Header ¶
func Header(logf logging.FormatLogger, text string)
func ListAllPipelinesOutput ¶
func ListAllTaskRunsOutput ¶
func ListAllTasksOutput ¶
func ListResourceNamesForJSONPath ¶
func ListResourceNamesForJSONPath(obj interface{}) string
func PipelineRunHasFailed ¶
func PipelineRunHasFailed(pr *v1alpha1.PipelineRun) string
func ProcessString ¶
func ResourcePath ¶ added in v0.11.0
func SortByStartTime ¶
func SortResourcesByTypeAndName ¶
func SortResourcesByTypeAndName(pres []v1alpha1.PipelineDeclaredResource) []v1alpha1.PipelineDeclaredResource
this will sort the Resource by Type and then by Name
func TaskRunHasFailed ¶
func VerifyServiceAccountExistence ¶
func VerifyServiceAccountExistence(namespace string, kubeClient *knativetest.KubeClient)
func VerifyServiceAccountExistenceForSecrets ¶
func VerifyServiceAccountExistenceForSecrets(namespace string, kubeClient *knativetest.KubeClient, sa string)
func WaitForPipelineRunState ¶
func WaitForPipelineRunState(c *Clients, name string, polltimeout time.Duration, inState PipelineRunStateFn, desc string) error
WaitForPipelineRunState polls the status of the PipelineRun 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.
func WaitForPipelineRunToComplete ¶
WaitForPipelineRunToComplete Wait for Pipeline Run to complete
func WaitForPipelineRunToStart ¶
WaitForPipelineRunToStart Waits for PipelineRun to be started
func WaitForPodState ¶
func WaitForPodState(c *Clients, name string, namespace string, inState func(r *corev1.Pod) (bool, error), desc string) error
WaitForPodState polls the status of the Pod 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.
func WaitForPodStateKube ¶
func WaitForPodStateKube(c *knativetest.KubeClient, namespace string, inState PodRunStateFn, desc string) error
func WaitForPodStatus ¶
func WaitForPodStatus(kubeClient *knativetest.KubeClient, namespace string)
func WaitForServiceExternalIPState ¶
func WaitForServiceExternalIPState(c *Clients, namespace, name string, inState func(s *corev1.Service) (bool, error), desc string) error
WaitForServiceExternalIPState polls the status of the a k8s Service called name from client every interval until an external ip is assigned 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.
func WaitForTaskRunState ¶
func WaitForTaskRunState(c *Clients, name string, inState TaskRunStateFn, desc string) error
func WaitForTaskRunToBeStarted ¶
WaitForTaskRunToBeStarted Wait For Task Run Resource to be completed
func WaitForTaskRunToComplete ¶
WaitForTaskRunToComplete Wait For Task Run Resource to be completed
Types ¶
type Clients ¶
type Clients struct {
KubeClient *knativetest.KubeClient
PipelineClient v1alpha1.PipelineInterface
TaskClient v1alpha1.TaskInterface
TaskRunClient v1alpha1.TaskRunInterface
PipelineRunClient v1alpha1.PipelineRunInterface
PipelineResourceClient resourcev1alpha1.PipelineResourceInterface
ConditionClient v1alpha1.ConditionInterface
}
clients holds instances of interfaces for making requests to the Pipeline controllers.
func NewClients ¶
newClients instantiates and returns several clientsets required for making requests to the Pipeline cluster specified by the combination of clusterName and configPath. Clients can make requests within namespace.
type Kubectl ¶ added in v0.10.0
type Kubectl struct {
// contains filtered or unexported fields
}
Kubectl type
type PipelineDescribeData ¶
type PipelineRunStateFn ¶
type PipelineRunStateFn func(pr *v1alpha1.PipelineRun) (bool, error)
PipelineRunStateFn is a condition function on TaskRun used polling functions
func PipelineRunFailed ¶
func PipelineRunFailed(name string) PipelineRunStateFn
PipelineRunFailed provides a poll condition function that checks if the PipelineRun has failed.
func PipelineRunSucceed ¶
func PipelineRunSucceed(name string) PipelineRunStateFn
PipelineRunSucceed provides a poll condition function that checks if the PipelineRun has successfully completed.
type PipelinesListData ¶
type PodRunStateFn ¶
func PodRunSucceed ¶
func PodRunSucceed(name string) PodRunStateFn
type TaskRefData ¶
type TaskRunData ¶
type TaskRunStateFn ¶
TaskRunStateFn is a condition function on TaskRun used polling functions
func TaskRunFailed ¶
func TaskRunFailed(name string) TaskRunStateFn
TaskRunFailed provides a poll condition function that checks if the TaskRun has failed.
func TaskRunSucceed ¶
func TaskRunSucceed(name string) TaskRunStateFn
TaskRunSucceed provides a poll condition function that checks if the TaskRun has successfully completed.
type TaskrunList ¶
type TaskrunList []tkr
func (TaskrunList) Len ¶
func (s TaskrunList) Len() int
func (TaskrunList) Less ¶
func (s TaskrunList) Less(i, j int) bool
func (TaskrunList) Swap ¶
func (s TaskrunList) Swap(i, j int)
type Test ¶
func NewTestData ¶
type TknRunner ¶ added in v0.10.0
type TknRunner struct {
// contains filtered or unexported fields
}
TknRunner contains information about the current test execution tkn binary path under test
func NewTknRunner ¶ added in v0.10.0
NewTknRunner returns details about the tkn on particular namespace
func (TknRunner) CheckVersion ¶ added in v0.11.0
TODO: Re-write this to just get the version of Tekton components through tkn version as described in https://github.com/tektoncd/cli/issues/1067
func (TknRunner) Run ¶ added in v0.10.0
Run will help you execute tkn command on a specific namespace, with a timeout
func (TknRunner) RunInteractiveTests ¶ added in v0.11.0
RunInteractiveTests helps to run interactive tests.
func (TknRunner) RunInteractiveTestsDummy ¶ added in v0.11.0
RunInteractiveTests helps to run interactive tests.
func (TknRunner) RunNoNamespace ¶ added in v0.10.0
RunNoNamespace will help you execute tkn command without namespace, with a timeout
func (TknRunner) RunWithOption ¶ added in v0.10.0
RunWithOption will help you execute tkn command with namespace, cmd option
func (TknRunner) TknNamespace ¶ added in v0.10.0
TknNamespace returns the current Namespace