Documentation
¶
Index ¶
- Constants
- func CreateEmptyFileOnPod(namespace string, podName string, filePath string) error
- func DumpDebugInfo(ctx context.Context, c clientset.Interface, ns string)
- func LookForStringInLog(ns, podName, container, expectedString string, timeout time.Duration) (result string, err error)
- func LookForStringInLogWithoutKubectl(ctx context.Context, client clientset.Interface, ns string, podName string, ...) (result string, err error)
- func LookForStringInPodExec(ns, podName string, command []string, expectedString string, ...) (result string, err error)
- func LookForStringInPodExecToContainer(ns, podName, containerName string, command []string, expectedString string, ...) (result string, err error)
- func MatchContainerOutput(ctx context.Context, f *framework.Framework, pod *v1.Pod, containerName string, ...) error
- func RunHostCmd(ns, name, cmd string) (string, error)
- func RunHostCmdOrDie(ns, name, cmd string) string
- func RunHostCmdWithFullOutput(ns, name, cmd string) (string, string, error)
- func RunHostCmdWithRetries(ns, name, cmd string, interval, timeout time.Duration) (string, error)
- func TestContainerOutput(ctx context.Context, f *framework.Framework, scenarioName string, pod *v1.Pod, ...)
- func TestContainerOutputMatcher(ctx context.Context, f *framework.Framework, scenarioName string, pod *v1.Pod, ...)
- func TestContainerOutputRegexp(ctx context.Context, f *framework.Framework, scenarioName string, pod *v1.Pod, ...)
Constants ¶
const ( // Poll is how often to Poll pods, nodes and claims. Poll = 2 * time.Second )
DEPRECATED constants. Use the timeouts in framework.Framework instead.
Variables ¶
This section is empty.
Functions ¶
func CreateEmptyFileOnPod ¶
CreateEmptyFileOnPod creates empty file at given path on the pod.
func DumpDebugInfo ¶
DumpDebugInfo dumps debug info of tests.
func LookForStringInLog ¶
func LookForStringInLog(ns, podName, container, expectedString string, timeout time.Duration) (result string, err error)
LookForStringInLog looks for the given string in the log of a specific pod container
func LookForStringInLogWithoutKubectl ¶
func LookForStringInLogWithoutKubectl(ctx context.Context, client clientset.Interface, ns string, podName string, container string, expectedString string, timeout time.Duration) (result string, err error)
LookForStringInLogWithoutKubectl looks for the given string in the log of a specific pod container
func LookForStringInPodExec ¶
func LookForStringInPodExec(ns, podName string, command []string, expectedString string, timeout time.Duration) (result string, err error)
LookForStringInPodExec looks for the given string in the output of a command executed in the first container of specified pod.
func LookForStringInPodExecToContainer ¶
func LookForStringInPodExecToContainer(ns, podName, containerName string, command []string, expectedString string, timeout time.Duration) (result string, err error)
LookForStringInPodExecToContainer looks for the given string in the output of a command executed in specified pod container, or first container if not specified.
func MatchContainerOutput ¶
func MatchContainerOutput( ctx context.Context, f *framework.Framework, pod *v1.Pod, containerName string, expectedOutput []string, matcher func(string, ...interface{}) gomegatypes.GomegaMatcher) error
MatchContainerOutput creates a pod and waits for all it's containers to exit with success. It then tests that the matcher with each expectedOutput matches the output of the specified container.
func RunHostCmd ¶
RunHostCmd runs the given cmd in the context of the given pod using `kubectl exec` inside of a shell.
func RunHostCmdOrDie ¶
RunHostCmdOrDie calls RunHostCmd and dies on error.
func RunHostCmdWithFullOutput ¶
RunHostCmdWithFullOutput runs the given cmd in the context of the given pod using `kubectl exec` inside of a shell. It will also return the command's stderr.
func RunHostCmdWithRetries ¶
RunHostCmdWithRetries calls RunHostCmd and retries all errors until it succeeds or the specified timeout expires. This can be used with idempotent commands to deflake transient Node issues.
func TestContainerOutput ¶
func TestContainerOutput(ctx context.Context, f *framework.Framework, scenarioName string, pod *v1.Pod, containerIndex int, expectedOutput []string)
TestContainerOutput runs the given pod in the given namespace and waits for all of the containers in the podSpec to move into the 'Success' status, and tests the specified container log against the given expected output using a substring matcher.
func TestContainerOutputMatcher ¶
func TestContainerOutputMatcher(ctx context.Context, f *framework.Framework, scenarioName string, pod *v1.Pod, containerIndex int, expectedOutput []string, matcher func(string, ...interface{}) gomegatypes.GomegaMatcher)
TestContainerOutputMatcher runs the given pod in the given namespace and waits for all of the containers in the podSpec to move into the 'Success' status, and tests the specified container log against the given expected output using the given matcher.
func TestContainerOutputRegexp ¶
func TestContainerOutputRegexp(ctx context.Context, f *framework.Framework, scenarioName string, pod *v1.Pod, containerIndex int, expectedOutput []string)
TestContainerOutputRegexp runs the given pod in the given namespace and waits for all of the containers in the podSpec to move into the 'Success' status, and tests the specified container log against the given expected output using a regexp matcher.
Types ¶
This section is empty.