e2e

package
v0.0.0-...-70b66e7 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2022 License: Apache-2.0, Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ChangeKubeContextToDefaultUser

func ChangeKubeContextToDefaultUser(framework *Framework, namespace, expected string) error

func ChangeKubeContextToKubeAdmin

func ChangeKubeContextToKubeAdmin() error

func CheckBlockEvent

func CheckBlockEvent(framework *Framework, reason, namespace, expected string) error

func CheckCRD

func CheckCRD(framework *Framework, expected string) error

func CheckClusterRole

func CheckClusterRole(framework *Framework, expected string) error

func CheckClusterRoleBinding

func CheckClusterRoleBinding(framework *Framework, expected string) error

func CheckConfigMap

func CheckConfigMap(framework *Framework, namespace, expected string) error

func CheckDeployment

func CheckDeployment(framework *Framework, namespace, expected string) error

func CheckIShieldResources

func CheckIShieldResources(framework *Framework, kind, namespace, expected string) error

func CheckPodStatus

func CheckPodStatus(framework *Framework, namespace, expected string) error

func CheckRole

func CheckRole(framework *Framework, namespace, expected string) error

func CheckRoleBinding

func CheckRoleBinding(framework *Framework, namespace, expected string) error

func CheckSecret

func CheckSecret(framework *Framework, namespace, expected string) error

func CheckService

func CheckService(framework *Framework, namespace, expected string) error

func CheckServiceAccount

func CheckServiceAccount(framework *Framework, namespace, expected string) error

func DescribePod

func DescribePod(framework *Framework, namespace, expected string)

func GetEvent

func GetEvent(framework *Framework, namespace, expected string) error

func GetPodCondition

func GetPodCondition(status *corev1.PodStatus, conditionType corev1.PodConditionType) (int, *corev1.PodCondition)

GetPodCondition extracts the provided condition from the given status and returns that. Returns nil and -1 if the condition is not present, and the index of the located condition.

func GetPodName

func GetPodName(framework *Framework, namespace, expected string) string

func GetPodReadyCondition

func GetPodReadyCondition(status corev1.PodStatus) *corev1.PodCondition

GetPodReadyCondition extracts the pod ready condition from the given status and returns that. Returns nil if the condition is not present.

func GetSecretName

func GetSecretName(framework *Framework, namespace, expected string) (string, error)

func IsPodReady

func IsPodReady(pod *corev1.Pod) bool

IsPodReady returns true if a pod is ready; false otherwise.

func IsPodReadyConditionTrue

func IsPodReadyConditionTrue(status corev1.PodStatus) bool

IsPodReadyConditionTrue returns true if a pod is ready; false otherwise.

func IsTargetPodReadyConditionTrue

func IsTargetPodReadyConditionTrue(pods *corev1.PodList, expected string) (found, ready bool)

func Kubectl

func Kubectl(args ...string) error

Kubectl executes kubectl commands

func KubectlOut

func KubectlOut(args ...string) (error, string)

func Load

func Load(data []byte) (*clientcmdapi.Config, error)

func LoadConfig

func LoadConfig(config, context string) (*rest.Config, error)

func LoadConfigMap

func LoadConfigMap(framework *Framework, namespace, expected string) (error, *corev1.ConfigMap)

func LoadFromFile

func LoadFromFile(filename string) (*clientcmdapi.Config, error)

func RestclientConfig

func RestclientConfig(config, context string) (*clientcmdapi.Config, error)

func ShowEventsForPod

func ShowEventsForPod(framework *Framework, namespace, expected string)

func ShowPodStatus

func ShowPodStatus(framework *Framework, namespace, expected string)

Types

type Framework

type Framework struct {
	BaseName string

	KubeConfig  string
	KubeContext string
	Kubectl     string

	// KubeClientConfig which was used to create the connection.
	KubeClientConfig *rest.Config

	// Kubernetes API clientsets
	KubeClientSet          kubernetes.Interface
	APIExtensionsClientSet apiextcs.Interface
	MIPClient              mipclient.ApisV1Interface

	// Namespace in which all test resources should reside
	Namespace *v1.Namespace
}

type ResourceRef

type ResourceRef struct {
	Name       string `json:"name"`
	Namespace  string `json:"namespace"`
	Kind       string `json:"kind"`
	ApiVersion string `json:"apiVersion"`
}

Jump to

Keyboard shortcuts

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