test

package
v0.11.2 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package test contains e2e tests for UDS

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCLIName

func GetCLIName() string

GetCLIName looks at the OS and CPU architecture to determine which Zarf binary needs to be run.

Types

type UDSE2ETest

type UDSE2ETest struct {
	UDSBinPath        string
	Arch              string
	ApplianceMode     bool
	ApplianceModeKeep bool
	RunClusterTests   bool
	CommandLog        []string
}

UDSE2ETest Struct holding common fields most of the tests will utilize.

func (*UDSE2ETest) CleanFiles

func (e2e *UDSE2ETest) CleanFiles(files ...string)

CleanFiles removes files and directories that have been created during the test.

func (*UDSE2ETest) CreateZarfPkg

func (e2e *UDSE2ETest) CreateZarfPkg(t *testing.T, path string, forceCreate bool)

CreateZarfPkg creates a Zarf package in the given path

func (*UDSE2ETest) CreateZarfPkgWithArch added in v0.11.1

func (e2e *UDSE2ETest) CreateZarfPkgWithArch(t *testing.T, path string, forceCreate bool, arch string)

CreateZarfPkgWithArch creates a Zarf package of a user specified arch in the given path

func (*UDSE2ETest) DeleteZarfPkg added in v0.10.4

func (e2e *UDSE2ETest) DeleteZarfPkg(t *testing.T, path string)

DeleteZarfPkg deletes a Zarf package from the given path

func (*UDSE2ETest) DownloadZarfInitPkg

func (e2e *UDSE2ETest) DownloadZarfInitPkg(t *testing.T, zarfVersion string)

DownloadZarfInitPkg downloads the zarf init pkg used for testing if it doesn't already exist (todo: makefile?)

func (*UDSE2ETest) GetGitRevision

func (e2e *UDSE2ETest) GetGitRevision() (string, error)

GetGitRevision returns the current git revision

func (*UDSE2ETest) GetLogFileContents

func (e2e *UDSE2ETest) GetLogFileContents(t *testing.T, stdErr string) string

GetLogFileContents gets the log file contents from a given run's std error.

func (*UDSE2ETest) GetMismatchedArch

func (e2e *UDSE2ETest) GetMismatchedArch() string

GetMismatchedArch determines what architecture our tests are running on, and returns the opposite architecture.

func (*UDSE2ETest) GetUdsVersion

func (e2e *UDSE2ETest) GetUdsVersion(t *testing.T) string

GetUdsVersion returns the current build version

func (*UDSE2ETest) HelmDepUpdate

func (e2e *UDSE2ETest) HelmDepUpdate(t *testing.T, path string)

HelmDepUpdate runs 'helm dependency update .' on the given path

func (*UDSE2ETest) SetupDockerRegistry

func (e2e *UDSE2ETest) SetupDockerRegistry(t *testing.T, port int)

SetupDockerRegistry uses the host machine's docker daemon to spin up a local registry for testing purposes.

func (*UDSE2ETest) TeardownRegistry

func (e2e *UDSE2ETest) TeardownRegistry(t *testing.T, port int)

TeardownRegistry removes the local registry.

func (*UDSE2ETest) UDS

func (e2e *UDSE2ETest) UDS(args ...string) (string, string, error)

UDS executes a UDS command.

func (*UDSE2ETest) UDSNoLog

func (e2e *UDSE2ETest) UDSNoLog(args ...string) (string, string, error)

UDSNoLog executes a UDS command with no logging.

Jump to

Keyboard shortcuts

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