framework

package
v0.29.0 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2023 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Interval   = 1 * time.Second
	Apitimeout = 10 * time.Minute
)

Variables

This section is empty.

Functions

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 kubernetes.Interface)

func CreateServiceAccountSecret

func CreateServiceAccountSecret(c kubernetes.Interface, namespace string, secretName string) (bool, error)

Create Service Account

func DeleteNamespace

func DeleteNamespace(namespace string, cs *Clients)
func Header(logf logging.FormatLogger, text string)

func TearDown

func TearDown(t *testing.T, cs *Clients, namespace string)

func VerifyServiceAccountExistence

func VerifyServiceAccountExistence(namespace string, kubeClient kubernetes.Interface)

func VerifyServiceAccountExistenceForSecrets

func VerifyServiceAccountExistenceForSecrets(namespace string, kubeClient kubernetes.Interface, sa string)

Types

type Clients

type Clients struct {
	KubeClient             kubernetes.Interface
	PipelineClient         v1beta1.PipelineInterface
	TaskClient             v1beta1.TaskInterface
	ClusterTaskClient      v1beta1.ClusterTaskInterface
	TaskRunClient          v1beta1.TaskRunInterface
	PipelineRunClient      v1beta1.PipelineRunInterface
	PipelineResourceClient resourcev1alpha1.PipelineResourceInterface
}

clients holds instances of interfaces for making requests to the Pipeline controllers.

func NewClients

func NewClients(configPath, clusterName, namespace string) *Clients

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.

func Setup

func Setup(t *testing.T) (*Clients, string)

type Test

type Test struct {
	Cmd      string
	Expected map[int]interface{}
}

func NewTestData

func NewTestData(cmd string, expected map[int]interface{}) *Test

Jump to

Keyboard shortcuts

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