Documentation ¶
Index ¶
- type Env
- type NamespacedEnv
- func (e *NamespacedEnv) Ctl() *kube.Ctl
- func (e *NamespacedEnv) Install(chart string, opts helm.InstallOptions) helm.Release
- func (e *NamespacedEnv) Namespace() string
- func (e *NamespacedEnv) Test(release helm.Release)
- func (e *NamespacedEnv) Upgrade(chart string, release helm.Release, opts helm.UpgradeOptions) helm.Release
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Env ¶
type Env struct {
// contains filtered or unexported fields
}
Env represents a test environment consisting of a Kubernetes cluster, helm client, and cert-manager installation.
Env's are expected to be Setup infrequently. Ideally, once per test package and then reused via Env.Namespaced and testing.T.Run.
func (*Env) Namespaced ¶
func (e *Env) Namespaced(t *testing.T) *NamespacedEnv
Namespaced creates a sandboxed Kubernetes namespace that will be cleaned up at the end of `t`. Usage:
t.Run('subtest', func(t *testing.T) { env := env.Namespaced(t) // Testing.... })
type NamespacedEnv ¶
type NamespacedEnv struct {
// contains filtered or unexported fields
}
NamespacedEnv is effectively an Env that is bound to a specific Kubernetes Namespace. It exposes convenience methods for common operations without the need to set .Namespace or check errors.
func (*NamespacedEnv) Ctl ¶
func (e *NamespacedEnv) Ctl() *kube.Ctl
func (*NamespacedEnv) Install ¶
func (e *NamespacedEnv) Install(chart string, opts helm.InstallOptions) helm.Release
func (*NamespacedEnv) Namespace ¶
func (e *NamespacedEnv) Namespace() string
func (*NamespacedEnv) Test ¶
func (e *NamespacedEnv) Test(release helm.Release)
func (*NamespacedEnv) Upgrade ¶
func (e *NamespacedEnv) Upgrade(chart string, release helm.Release, opts helm.UpgradeOptions) helm.Release
Click to show internal directories.
Click to hide internal directories.