contrasttest

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2024 License: AGPL-3.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ContrastTest

type ContrastTest struct {
	// inputs, usually filled by New()
	Namespace             string
	WorkDir               string
	ImageReplacements     map[string]string
	ImageReplacementsFile string
	NamespaceFile         string
	SkipUndeploy          bool
	Kubeclient            *kubeclient.Kubeclient
	// contains filtered or unexported fields
}

ContrastTest is the Contrast test helper struct.

func New

func New(t *testing.T, imageReplacements, namespaceFile string, skipUndeploy bool) *ContrastTest

New creates a new contrasttest.T object bound to the given test.

func (*ContrastTest) Apply

func (ct *ContrastTest) Apply(t *testing.T)

Apply the generated resources to the Kubernetes test environment.

func (*ContrastTest) Generate

func (ct *ContrastTest) Generate(t *testing.T)

Generate runs the contrast generate command.

func (*ContrastTest) Init

func (ct *ContrastTest) Init(t *testing.T, resources []any)

Init patches the given resources for the test environment and makes them available to Generate and Set.

func (*ContrastTest) MeshCACert

func (ct *ContrastTest) MeshCACert() *x509.CertPool

MeshCACert returns a CertPool that contains the coordinator mesh CA cert.

func (*ContrastTest) Recover added in v0.8.0

func (ct *ContrastTest) Recover(t *testing.T)

Recover runs the contrast recover subcommand.

func (*ContrastTest) RootCACert

func (ct *ContrastTest) RootCACert() *x509.CertPool

RootCACert returns a CertPool that contains the coordinator root CA cert.

func (*ContrastTest) RunVerify added in v0.8.0

func (ct *ContrastTest) RunVerify() error

RunVerify runs the contrast verify subcommand.

func (*ContrastTest) Set

func (ct *ContrastTest) Set(t *testing.T)

Set runs the contrast set subcommand.

func (*ContrastTest) Verify

func (ct *ContrastTest) Verify(t *testing.T)

Verify runs the contrast verify subcommand and fails the test if it is not successful.

Jump to

Keyboard shortcuts

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