e2e

package
v0.53.1 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

README

End-to-end test

To run

$ ./hack/test-e2e.sh
$ ./hack/test-e2e.sh -run TestVersion

See ./test/e2e/env.go for required environment variables for some tests.

If running tests for kapp-controller's integration with secretgen-controller, you will need to set the environment variable KAPPCTRL_E2E_SECRETGEN_CONTROLLER=true.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Env

type Env struct {
	Namespace         string
	PackagingGlobalNS string
}

func BuildEnv

func BuildEnv(t *testing.T) Env

func (Env) Validate

func (e Env) Validate(t *testing.T)

type Kapp

type Kapp struct {
	T         *testing.T
	Namespace string
	L         Logger
}

func (*Kapp) Run

func (k *Kapp) Run(args []string) string

Run executes kapp with the provided arguments

func (*Kapp) RunWithOpts

func (k *Kapp) RunWithOpts(args []string, opts RunOpts) (string, error)

RunWithOpts executes kapp with the provided arguments and allow for extra options

type Kubectl

type Kubectl struct {
	T         *testing.T
	Namespace string
	L         Logger
}

func (Kubectl) Run

func (k Kubectl) Run(args []string) string

func (Kubectl) RunWithOpts

func (k Kubectl) RunWithOpts(args []string, opts RunOpts) (string, error)

type Logger

type Logger struct{}

func (Logger) Debugf

func (l Logger) Debugf(msg string, args ...interface{})

func (Logger) Section

func (l Logger) Section(msg string, f func())

type RunOpts

type RunOpts struct {
	NoNamespace  bool
	IntoNs       bool
	AllowError   bool
	StderrWriter io.Writer
	StdoutWriter io.Writer
	StdinReader  io.Reader
	Ctx          context.Context
	Redact       bool
	Interactive  bool
	OnErrKubectl []string
}

type Secrets added in v0.52.0

type Secrets struct {
	Name       string
	Namespace  string
	Kubeconfig string
}

Secrets represents a secret with target cluster kubeconfig

func (Secrets) ForTargetCluster added in v0.52.0

func (s Secrets) ForTargetCluster() string

ForTargetCluster can be used to get secret with target cluster kubeconfig

type ServiceAccounts added in v0.52.0

type ServiceAccounts struct {
	Namespace string
}

func (ServiceAccounts) ForClusterYAML added in v0.52.0

func (sa ServiceAccounts) ForClusterYAML() string

ForClusterYAML can be used to get service account with cluster wide permissions

func (ServiceAccounts) ForDefaultNamespaceYAML added in v0.52.0

func (sa ServiceAccounts) ForDefaultNamespaceYAML(defaultNamespace, pkgiNamespace string) string

ForDefaultNamespaceYAML can be used to get service account with permissions in defaultNamespace

func (ServiceAccounts) ForNamespaceYAML added in v0.52.0

func (sa ServiceAccounts) ForNamespaceYAML() string

Jump to

Keyboard shortcuts

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