failurehandler

package
v1.19.0 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2024 License: Apache-2.0 Imports: 11 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(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 DaemonSetsNotReady added in v1.13.0

func DaemonSetsNotReady(framework *clustertest.Framework, cluster *application.Cluster) FailureHandler

DaemonSetsNotReady collects debug information for all DaemonSets in the workload cluster that currently don't have the expected number of replicas. This information includes events for the DaemonSets and the status of any associated pods.

func DeploymentsNotReady added in v1.13.0

func DeploymentsNotReady(framework *clustertest.Framework, cluster *application.Cluster) FailureHandler

DeploymentsNotReady collects debug information for all deployments in the workload cluster that currently don't have the expected number of replicas. This information includes events for the deployment and the status of any associated pods.

func StatefulSetsNotReady added in v1.13.0

func StatefulSetsNotReady(framework *clustertest.Framework, cluster *application.Cluster) FailureHandler

StatefulSetsNotReady collects debug information for all StatefulSets in the workload cluster that currently don't have the expected number of replicas. This information includes events for the StatefulSet and the status of any associated 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