Documentation ¶
Overview ¶
Package test contains e2e tests for UDS
Index ¶
- func GetCLIName() string
- type UDSE2ETest
- func (e2e *UDSE2ETest) CleanFiles(files ...string)
- func (e2e *UDSE2ETest) CreateZarfPkg(t *testing.T, path string, forceCreate bool)
- func (e2e *UDSE2ETest) CreateZarfPkgWithArch(t *testing.T, path string, forceCreate bool, arch string)
- func (e2e *UDSE2ETest) DeleteZarfPkg(t *testing.T, path string)
- func (e2e *UDSE2ETest) DownloadZarfInitPkg(t *testing.T, zarfVersion string)
- func (e2e *UDSE2ETest) GetGitRevision() (string, error)
- func (e2e *UDSE2ETest) GetLogFileContents(t *testing.T, stdErr string) string
- func (e2e *UDSE2ETest) GetMismatchedArch() string
- func (e2e *UDSE2ETest) GetUdsVersion(t *testing.T) string
- func (e2e *UDSE2ETest) HelmDepUpdate(t *testing.T, path string)
- func (e2e *UDSE2ETest) SetupDockerRegistry(t *testing.T, port int)
- func (e2e *UDSE2ETest) TeardownRegistry(t *testing.T, port int)
- func (e2e *UDSE2ETest) UDS(args ...string) (string, string, error)
- func (e2e *UDSE2ETest) UDSNoLog(args ...string) (string, string, 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 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.