Documentation ¶
Index ¶
- type TestHelper
- func (h *TestHelper) GetSMIHelmChart() string
- func (h *TestHelper) GetSMIHelmVersion() string
- func (h *TestHelper) GetSMINamespace() string
- func (h *TestHelper) GetServiceProfile(ctx context.Context, namespace, name string) (*serviceprofile.ServiceProfile, error)
- func (h *TestHelper) HelmInstall(chart, releaseName string, arg ...string) (string, string, error)
- func (h *TestHelper) HelmRun(arg ...string) (string, string, error)
- func (h *TestHelper) IsHelm() bool
- func (h *TestHelper) LinkerdRun(arg ...string) (string, error)
- func (h *TestHelper) LinkerdSMIRun(arg ...string) (string, error)
- func (h *TestHelper) PipeToHelmRun(stdin string, arg ...string) (string, string, error)
- func (h *TestHelper) PipeToLinkerdRun(stdin string, arg ...string) (string, string, error)
- func (h *TestHelper) RetryFor(timeout time.Duration, fn func() error) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TestHelper ¶
type TestHelper struct { testutil.KubernetesHelper // contains filtered or unexported fields }
TestHelper provides helpers for running the linkerd SMI integration tests.
func NewTestHelper ¶
func NewTestHelper() *TestHelper
NewTestHelper creates a new instance of TestHelper for the current test run. The new TestHelper can be configured via command line flags.
func (*TestHelper) GetSMIHelmChart ¶
func (h *TestHelper) GetSMIHelmChart() string
GetSMIHelmChart returns the path to the linkerd-smi Helm chart
func (*TestHelper) GetSMIHelmVersion ¶
func (h *TestHelper) GetSMIHelmVersion() string
GetSMIHelmVersion returns the version of the linkerd-smi Helm chart
func (*TestHelper) GetSMINamespace ¶ added in v0.2.0
func (h *TestHelper) GetSMINamespace() string
GetSMINamespace returns the namespace in which linkerd-smi is installed
func (*TestHelper) GetServiceProfile ¶
func (h *TestHelper) GetServiceProfile(ctx context.Context, namespace, name string) (*serviceprofile.ServiceProfile, error)
GetServiceProfile returns the given ServiceProfile
func (*TestHelper) HelmInstall ¶
HelmInstall runs the helm install subcommand, with the provided arguments
func (*TestHelper) HelmRun ¶
func (h *TestHelper) HelmRun(arg ...string) (string, string, error)
HelmRun executes a helm command appended with the --context
func (*TestHelper) IsHelm ¶
func (h *TestHelper) IsHelm() bool
IsHelm returns true if Helm path is passed
func (*TestHelper) LinkerdRun ¶
func (h *TestHelper) LinkerdRun(arg ...string) (string, error)
LinkerdRun executes a linkerd command returning its stdout.
func (*TestHelper) LinkerdSMIRun ¶
func (h *TestHelper) LinkerdSMIRun(arg ...string) (string, error)
LinkerdSMIRun executes a linkerd SMI command returning its stdout.
func (*TestHelper) PipeToHelmRun ¶
PipeToHelmRun executes a Helm command appended with the --context flag, and provides a string at Stdin.
func (*TestHelper) PipeToLinkerdRun ¶
PipeToLinkerdRun executes a linkerd command appended with the --linkerd-namespace flag, and provides a string at Stdin.
func (*TestHelper) RetryFor ¶
func (h *TestHelper) RetryFor(timeout time.Duration, fn func() error) error
RetryFor retries a given function every second until the function returns without an error, or a timeout is reached. If the timeout is reached, it returns the last error received from the function.