Documentation ¶
Overview ¶
Package test provides e2e tests for Zarf.
Index ¶
- func GetCLIName() string
- type ZarfE2ETest
- func (e2e *ZarfE2ETest) CleanFiles(t *testing.T, files ...string)
- func (e2e *ZarfE2ETest) GetLogFileContents(t *testing.T, stdErr string) string
- func (e2e *ZarfE2ETest) GetMismatchedArch() string
- func (e2e *ZarfE2ETest) GetZarfVersion(t *testing.T) string
- func (e2e *ZarfE2ETest) Kubectl(t *testing.T, args ...string) (string, string, error)
- func (e2e *ZarfE2ETest) NormalizeYAMLFilenames(input string) string
- func (e2e *ZarfE2ETest) StripMessageFormatting(input string) string
- func (e2e *ZarfE2ETest) Zarf(t *testing.T, args ...string) (_ string, _ string, err error)
- func (e2e *ZarfE2ETest) ZarfInDir(t *testing.T, dir string, args ...string) (_ string, _ string, err error)
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 ApplianceModeKeep bool }
ZarfE2ETest Struct holding common fields most of the tests will utilize.
func (*ZarfE2ETest) CleanFiles ¶
func (e2e *ZarfE2ETest) CleanFiles(t *testing.T, files ...string)
CleanFiles removes files and directories that have been created during the test.
func (*ZarfE2ETest) GetLogFileContents ¶
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 ¶
func (e2e *ZarfE2ETest) GetMismatchedArch() string
GetMismatchedArch determines what architecture our tests are running on, and returns the opposite architecture.
func (*ZarfE2ETest) GetZarfVersion ¶
func (e2e *ZarfE2ETest) GetZarfVersion(t *testing.T) string
GetZarfVersion returns the current build/zarf version
func (*ZarfE2ETest) NormalizeYAMLFilenames ¶
func (e2e *ZarfE2ETest) NormalizeYAMLFilenames(input string) string
NormalizeYAMLFilenames normalizes YAML filenames / paths across Operating Systems (i.e Windows vs Linux)
func (*ZarfE2ETest) StripMessageFormatting ¶
func (e2e *ZarfE2ETest) StripMessageFormatting(input string) string
StripMessageFormatting strips any ANSI color codes and extra spaces from a given string
Directories ¶
Path | Synopsis |
---|---|
Package external provides a test for interacting with external resources
|
Package external provides a test for interacting with external resources |
Package testutil provides global testing helper functions
|
Package testutil provides global testing helper functions |