Documentation
¶
Index ¶
- Constants
- type InventoryEntry
- type Runner
- func (r *Runner) CheckForNamespace(t *testing.T, namespace string) bool
- func (r *Runner) CheckIfResourceGroupInstalled(t *testing.T) bool
- func (r *Runner) CheckKindClusterAvailable(t *testing.T) bool
- func (r *Runner) CreateKindCluster(t *testing.T)
- func (r *Runner) CreateNamespace(t *testing.T, namespace string)
- func (r *Runner) InstallResourceGroup(t *testing.T)
- func (r *Runner) RemoveKindCluster(t *testing.T)
- func (r *Runner) RemoveNamespace(t *testing.T, namespace string)
- func (r *Runner) Run(t *testing.T)
- func (r *Runner) RunApply() (string, string, error)
- func (r *Runner) RunPreApply(t *testing.T)
- func (r *Runner) VerifyExitCode(t *testing.T, err error)
- func (r *Runner) VerifyInventory(t *testing.T, name, namespace string)
- func (r *Runner) VerifyStderr(t *testing.T, stderr string)
- func (r *Runner) VerifyStdout(t *testing.T, stdout string)
- type TestCaseConfig
Constants ¶
View Source
const (
KindClusterName = "live-e2e-test"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InventoryEntry ¶
type InventoryEntry struct {
Group string `yaml:"group,omitempty"`
Kind string `yaml:"kind,omitempty"`
Name string `yaml:"name,omitempty"`
Namespace string `yaml:"namespace,omitempty"`
}
InventoryEntry defines an entry in an inventory list.
type Runner ¶
type Runner struct {
// Config provides the configuration for how this test should be
// executed.
Config TestCaseConfig
// Path provides the path to the test files.
Path string
}
Runner uses the provided Config to run a test.
func (*Runner) CheckForNamespace ¶
func (*Runner) CheckIfResourceGroupInstalled ¶
func (*Runner) CheckKindClusterAvailable ¶
func (*Runner) CreateKindCluster ¶
func (*Runner) InstallResourceGroup ¶
func (*Runner) RemoveKindCluster ¶
func (*Runner) RunPreApply ¶
func (*Runner) VerifyInventory ¶
type TestCaseConfig ¶
type TestCaseConfig struct {
// ExitCode is the expected exit code from the kpt commands. Default: 0
ExitCode int `yaml:"exitCode,omitempty"`
// StdErr is the expected standard error output. Default: ""
StdErr string `yaml:"stdErr,omitempty"`
// StdOut is the expected standard output from running the command.
// Default: ""
StdOut string `yaml:"stdOut,omitempty"`
// Inventory is the expected list of resource present in the inventory.
Inventory []InventoryEntry `yaml:"inventory,omitempty"`
// RequiresCleanCluster tells the test framework that a new cluster must
// be created for running this test.
RequiresCleanCluster bool `yaml:"requiresCleanCluster,omitempty"`
// PreinstallResourceGroup causes the test framework to verify that the
// ResourceGroup CRD is available in the cluster before running the test.
PreinstallResourceGroup bool `yaml:"preinstallResourceGroup,omitempty"`
// KptArgs is a list of args that will be provided to the kpt command
// when running the test.
KptArgs []string `yaml:"kptArgs,omitempty"`
}
func ReadTestCaseConfig ¶
func ReadTestCaseConfig(t *testing.T, path string) TestCaseConfig
Click to show internal directories.
Click to hide internal directories.