testkit

package
v0.0.0-...-affaa53 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2019 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ShouldLastFor

func ShouldLastFor(interval, timeout time.Duration, conditionalFunc func() bool) error

func WaitForFunction

func WaitForFunction(interval, timeout time.Duration, conditionalFunc func() bool) error

Types

type HelmClient

type HelmClient interface {
	CheckReleaseStatus(rlsName string) (*rls.GetReleaseStatusResponse, error)
	CheckReleaseExistence(name string) (bool, error)
	IsInstalled(rlsName string) bool
	TestRelease(rlsName string) (<-chan *rls.TestReleaseResponse, <-chan error)
}

func NewHelmClient

func NewHelmClient(host, tlsKeyFile, tlsCertFile string, skipVerify bool) (HelmClient, error)

type K8sResourceChecker

type K8sResourceChecker struct {
	// contains filtered or unexported fields
}

func NewK8sChecker

func NewK8sChecker(client K8sResourcesClient, appName string) *K8sResourceChecker

func (*K8sResourceChecker) CheckK8sResources

func (c *K8sResourceChecker) CheckK8sResources(t *testing.T, checkFunc func(resource interface{}, err error) bool)

type K8sResourcesClient

type K8sResourcesClient interface {
	GetDeployment(name string, options v1.GetOptions) (interface{}, error)
	GetService(name string, options v1.GetOptions) (interface{}, error)
	GetVirtualService(name string, options v1.GetOptions) (interface{}, error)
	GetRole(name string, options v1.GetOptions) (interface{}, error)
	GetRoleBinding(name string, options v1.GetOptions) (interface{}, error)
	GetClusterRole(name string, options v1.GetOptions) (interface{}, error)
	GetClusterRoleBinding(name string, options v1.GetOptions) (interface{}, error)
	GetServiceAccount(name string, options v1.GetOptions) (interface{}, error)
	CreateDummyApplication(name string, accessLabel string, skipInstallation bool) (*v1alpha1.Application, error)
	DeleteApplication(name string, options *v1.DeleteOptions) error
	GetApplication(name string, options v1.GetOptions) (*v1alpha1.Application, error)
	ListPods(options v1.ListOptions) (*corev1.PodList, error)
	DeletePod(name string, options *v1.DeleteOptions) error
	GetLogs(podName string, options *corev1.PodLogOptions) *restclient.Request
}

func NewK8sResourcesClient

func NewK8sResourcesClient(namespace string) (K8sResourcesClient, error)

type TestConfig

type TestConfig struct {
	Namespace                  string
	TillerHost                 string
	TillerTLSKeyFile           string
	TillerTLSCertificateFile   string
	TillerTLSSkipVerify        bool
	InstallationTimeoutSeconds int
}

func ReadConfig

func ReadConfig() (TestConfig, error)

Jump to

Keyboard shortcuts

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