failurehandler

package
v1.11.1 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

package failurehandler provides functions to help with extra debugging when Gomega assertions fail

Example using Gomega's `Eventually`

Eventually(wait.IsAllAppDeployed(state.GetContext(), state.GetFramework().MC(), appNamespacedNames)).
		WithTimeout(timeout).
		WithPolling(10*time.Second).
		Should(
			BeTrue(),
			failurehandler.AppIssues(state.GetContext(), state.GetFramework(), state.GetCluster()),
		)

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FailureHandler

type FailureHandler interface{}

FailureHandler is a function that can be used with Gomega to perform extra debugging when an assertion fails Note: Needs to be `interface{}` for Gomega to accept this alias type

func AppIssues

func AppIssues(ctx context.Context, framework *clustertest.Framework, cluster *application.Cluster) FailureHandler

AppIssues produces debugging information from app-operator (on the MC) and chart-operator (on the WC) This function will log out the status of the deployments, any related Events found and the last 25 lines of logs from the pods.

func Wrap

func Wrap(fn func()) FailureHandler

Wrap returns a valid FailureHandler for the given function

Jump to

Keyboard shortcuts

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