Documentation ¶
Index ¶
- Constants
- func GetGitServerImageName(t *testing.T) string
- func InferGitServerImage(porchImage string) string
- func KubectlApply(t *testing.T, config string)
- func KubectlCreateNamespace(t *testing.T, name string)
- func KubectlDeleteNamespace(t *testing.T, name string)
- func KubectlWaitForDeployment(t *testing.T, namespace, name string)
- func KubectlWaitForGitDNS(t *testing.T, gitServerURL string)
- func KubectlWaitForService(t *testing.T, namespace, name string)
- func RegisterRepository(t *testing.T, repoURL, namespace, name string)
- func WriteTestCaseConfig(t *testing.T, tc *TestCaseConfig)
- type Command
- type TestCaseConfig
Constants ¶
View Source
const (
TestGitServerImage = "test-git-server"
)
Variables ¶
This section is empty.
Functions ¶
func GetGitServerImageName ¶
func InferGitServerImage ¶
func KubectlApply ¶
func KubectlCreateNamespace ¶
func KubectlDeleteNamespace ¶
func KubectlWaitForGitDNS ¶
Kubernetes DNS needs time to propagate the updated address Wait until we can register the repository and list its contents.
func KubectlWaitForService ¶
func RegisterRepository ¶
func WriteTestCaseConfig ¶
func WriteTestCaseConfig(t *testing.T, tc *TestCaseConfig)
Types ¶
type Command ¶
type Command struct { // Args is a list of args for the kpt CLI. Args []string `yaml:"args,omitempty"` // StdIn contents will be passed as the command's standard input, if not empty. Stdin string `yaml:"stdin,omitempty"` // StdOut is the standard output expected from the command. Stdout string `yaml:"stdout,omitempty"` // StdErr is the standard error output expected from the command. Stderr string `yaml:"stderr,omitempty"` // ExitCode is the expected exit code frm the command. ExitCode int `yaml:"exitCode,omitempty"` // Yaml indicates that stdout is yaml and the test will reformat it for stable ordering Yaml bool `yaml:"yaml,omitempty"` }
type TestCaseConfig ¶
type TestCaseConfig struct { // TestCase is the name of the test case. TestCase string `yaml:"-"` // ConfigFile stores the name of the config file from which the config was loaded. // Used when generating or updating golden files. ConfigFile string `yaml:"-"` // Repository is the name of the k8s Repository resource to register the default Git repo. Repository string `yaml:"repository,omitempty"` // Commands is a list of kpt commands to be executed by the test. Commands []Command `yaml:"commands,omitempty"` // Skip the test? If the value is not empty, it will be used as a message with which to skip the test. Skip string `yaml:"skip,omitempty"` }
func ReadTestCaseConfig ¶
func ReadTestCaseConfig(t *testing.T, name, path string) TestCaseConfig
Click to show internal directories.
Click to hide internal directories.