suite

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

package suite provides a standard way of setting up and triggering an App test suite

The installation, upgrade (if required) and uninstallation of the App is handled within the test suite. Hooks are provided for users to add pre-install, pre-upgrade and post-install test cases.

Example

func TestBasic(t *testing.T) {
	suite.New(config.MustLoad("../../config.yaml")).
		WithInstallNamespace("kube-system").
		WithIsUpgrade(isUpgrade).
		WithValuesFile("./values.yaml").
		BeforeInstall(func() {
			// Do any pre-install checks here (ensure the cluster has needed pre-reqs)
		}).
		BeforeUpgrade(func() {
			// Perform any checks between installing the latest released version
			// and upgrading it to the version to test
			// E.g. ensure that the initial install has completed and has settled before upgrading
		}).
		Tests(func() {
			// Include calls to app tests here
		}).
		Run(t, "Basic Test")
}

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(testConfig config.TestConfig) *suite

New create a new suite instance that allows configuring an App test suite

Types

This section is empty.

Jump to

Keyboard shortcuts

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