testapplyconfiguration

package
v0.0.0-...-03f3e0b Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrorType

type ErrorType string
var (
	NoError       ErrorType = ""
	NonZeroReturn ErrorType = "NonZeroReturn"
)

type PreservePolicy

type PreservePolicy string
var (
	PreservePolicyReplaceExpectedOutput PreservePolicy = "ReplaceExpectedOutput"
)

type TestApplyConfigurationOptions

type TestApplyConfigurationOptions struct {
	// TestDirectory is a directory that will be recursively walked to locate all directories containing a test
	// by finding directories which contain test.yaml
	// 1. test.yaml - serialized TestDescription
	// 2. input-dir - directory that will be provided to the apply-configuration command.
	// 3. output-dir - directory that is expected from apply-configuration command.
	// This allows for fairly arbitrary nesting strategies.
	Tests []TestOptions

	// JunitSuiteName allows naming the junit suite for convenience.  Sometimes we run the same tests before/after a change
	// or in slightly different circumstances. This lets us accomodate that.
	JunitSuiteName string

	OutputDirectory string

	PreservePolicy PreservePolicy

	Streams genericiooptions.IOStreams
}

func (*TestApplyConfigurationOptions) Run

type TestDescription

type TestDescription struct {
	BinaryName   string    `json:"binaryName"`
	TestName     string    `json:"testName"`
	Description  string    `json:"description"`
	TestType     TestType  `json:"testType"`
	DesiredError ErrorType `json:"desiredError,omitempty"`
	// Now is the time to use when invoking the apply-configuration command.  This is commonly used so that output
	// for conditions is stable
	Now metav1.Time `json:"now"`
	// Controllers hold an optional list of controller names to run.
	// By default, all controllers are run.
	Controllers []string `json:"controllers,omitempty"`
}

type TestOptions

type TestOptions struct {
	Description TestDescription
	// TestDirectory is the directory containing the test to run. The directory containing test.yaml and input-dir
	TestDirectory string
	// OutputDirectory is the directory where the output should be
	OutputDirectory string
}

func ReadPotentialTestDir

func ReadPotentialTestDir(path string, replaceExpectedOutput bool) (*TestOptions, bool, error)

type TestType

type TestType string
var (
	TestTypeApplyConfiguration TestType = "ApplyConfiguration"
	AllTestTypes                        = sets.New(TestTypeApplyConfiguration)
)

Jump to

Keyboard shortcuts

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