basicapp

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: May 20, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsInvalidConfig

func IsInvalidConfig(err error) bool

IsInvalidConfig asserts invalidConfigError.

func IsInvalidLabels

func IsInvalidLabels(err error) bool

IsInvalidLabels asserts invalidLabelsError.

func IsInvalidReplicas

func IsInvalidReplicas(err error) bool

IsInvalidReplicas asserts invalidReplicasError.

func IsNotFound

func IsNotFound(err error) bool

IsNotFound asserts NotFoundError.

func IsNotReady

func IsNotReady(err error) bool

IsNotReady asserts notReadyError.

Types

type BasicApp

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

func New

func New(config Config) (*BasicApp, error)

func (*BasicApp) Test

func (b *BasicApp) Test(ctx context.Context) error

type Chart

type Chart struct {
	Name            string
	URL             string
	ChartValues     string
	Namespace       string
	RunReleaseTests bool
}

Chart is the chart to test.

func (Chart) Validate

func (cc Chart) Validate() error

type ChartResources

type ChartResources struct {
	DaemonSets  []DaemonSet
	Deployments []Deployment
	Services    []Service
}

ChartResources are the key resources deployed by the chart.

type Clients

type Clients interface {
	// K8sClient returns a properly configured control plane client for the
	// Kubernetes API.
	K8sClient() kubernetes.Interface
}

type Config

type Config struct {
	Clients    Clients
	HelmClient *helmclient.Client
	Logger     micrologger.Logger

	App            Chart
	ChartResources ChartResources
}

type DaemonSet

type DaemonSet struct {
	Name        string
	Namespace   string
	Labels      map[string]string
	MatchLabels map[string]string
}

DaemonSet is a daemonset to be tested.

type Deployment

type Deployment struct {
	Name             string
	Namespace        string
	DeploymentLabels map[string]string
	MatchLabels      map[string]string
	PodLabels        map[string]string
}

Deployment is a deployment to be tested.

type Interface

type Interface interface {
	// Test executes the test of a managed services chart with basic
	// functionality that applies to all managed services charts.
	//
	// - Install chart.
	// - Check chart is deployed.
	// - Check key resources are correct.
	// - Run helm release tests if configured.
	//
	Test(ctx context.Context) error
}

type Service

type Service struct {
	Name      string
	Namespace string
	Labels    map[string]string
}

Service is a service to be tested.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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