Beispiel #1
0
// PanicsWithSubstring returns a gomega matcher, like Panics() but matches substring of err.Error().
func PanicsWithSubstring(substr string) types.GomegaMatcher {
	return &panicsWithSubstring{
		substr: substr,
		panics: panics{err: gomega.WithTransform(func(v interface{}) string {
			return fmt.Sprint(v)
		}, gomega.ContainSubstring(substr)),
		},
	}
}
Beispiel #2
0
func MatchErrorResponse(errRespToMatch *awsfaker.ErrorResponse) types.GomegaMatcher {
	return gomega.WithTransform(requestFailure_to_errorResponse, gomega.Equal(errRespToMatch))
}