vendor: update gotest.tools v3.0.2

full diff: https://github.com/gotestyourself/gotest.tools/compare/v3.0.1...v3.0.2

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2020-04-29 11:42:32 +02:00
Родитель 92dc906059
Коммит 2e83f56856
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 76698F39D527CE8C
2 изменённых файлов: 12 добавлений и 7 удалений

Просмотреть файл

@ -85,7 +85,7 @@ google.golang.org/genproto 3f1135a288c9a07e340ae8ba4cc6
google.golang.org/grpc f495f5b15ae7ccda3b38c53a1bfcde4c1a58a2bc # v1.27.1
gopkg.in/inf.v0 d2d2541c53f18d2a059457998ce2876cc8e67cbf # v0.9.1
gopkg.in/yaml.v2 53403b58ad1b561927d19068c655246f2db79d48 # v2.2.8
gotest.tools/v3 ab4a870b92ce57a83881fbeb535a137a20d664b7 # v3.0.1
gotest.tools/v3 bb0d8a963040ea5048dcef1a14d8f8b58a33d4b3 # v3.0.2
k8s.io/api 35e20aa79eb876d1014e0383c7fcda49e52c5d76 # kubernetes-1.16.1
k8s.io/apimachinery 27d36303b6556f377b4f34e64705fa9024a12b0c # kubernetes-1.16.1
k8s.io/apiextensions-apiserver 49e3d608220c016ce72a3bd9524eed4dcef587df # kubernetes-1.16.1

17
vendor/gotest.tools/v3/assert/assert.go поставляемый
Просмотреть файл

@ -119,12 +119,8 @@ func assert(
return true
case error:
// Handle nil structs which implement error as a nil error
if reflect.ValueOf(check).IsNil() {
return true
}
msg := "error is not nil: "
t.Log(format.WithCustomMessage(failureMessage+msg+check.Error(), msgAndArgs...))
msg := failureMsgFromError(check)
t.Log(format.WithCustomMessage(failureMessage+msg, msgAndArgs...))
case cmp.Comparison:
success = runComparison(t, argSelector, check, msgAndArgs...)
@ -179,6 +175,15 @@ func logFailureFromBool(t TestingT, msgAndArgs ...interface{}) {
t.Log(format.WithCustomMessage(failureMessage+msg, msgAndArgs...))
}
func failureMsgFromError(err error) string {
// Handle errors with non-nil types
v := reflect.ValueOf(err)
if v.Kind() == reflect.Ptr && v.IsNil() {
return fmt.Sprintf("error is not nil: error has type %T", err)
}
return "error is not nil: " + err.Error()
}
func boolFailureMessage(expr ast.Expr) (string, error) {
if binaryExpr, ok := expr.(*ast.BinaryExpr); ok && binaryExpr.Op == token.NEQ {
x, err := source.FormatNode(binaryExpr.X)