test

package
v0.26.3 Latest Latest
Warning

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

Go to latest
Published: May 10, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package test provides e2e tests for Zarf.

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 ZarfE2ETest

type ZarfE2ETest struct {
	ZarfBinPath     string
	Arch            string
	ApplianceMode   bool
	RunClusterTests bool
}

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

func (*ZarfE2ETest) CleanFiles

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

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

func (*ZarfE2ETest) ExecZarfCommand

func (e2e *ZarfE2ETest) ExecZarfCommand(commandString ...string) (string, string, error)

ExecZarfCommand executes a Zarf command.

func (*ZarfE2ETest) GetLogFileContents added in v0.26.3

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

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

func (*ZarfE2ETest) GetMismatchedArch added in v0.26.3

func (e2e *ZarfE2ETest) GetMismatchedArch() string

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

func (*ZarfE2ETest) Setup

func (e2e *ZarfE2ETest) Setup(t *testing.T)

Setup performs actions prior to each test.

func (*ZarfE2ETest) SetupWithCluster

func (e2e *ZarfE2ETest) SetupWithCluster(t *testing.T)

SetupWithCluster performs actions for each test that requires a K8s cluster.

func (*ZarfE2ETest) Teardown

func (e2e *ZarfE2ETest) Teardown(t *testing.T)

Teardown performs actions prior to tearing down each test.

Directories

Path Synopsis
Package external_test provides a test for the external init flow.
Package external_test provides a test for the external init flow.
Package mocks contains all the mocks used in Zarf tests.
Package mocks contains all the mocks used in Zarf tests.
Package upgrade_test provides a test for the upgrade flow.
Package upgrade_test provides a test for the upgrade flow.

Jump to

Keyboard shortcuts

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