aboutsummaryrefslogtreecommitdiff
path: root/vendor
diff options
context:
space:
mode:
authoropenshift-ci[bot] <75433959+openshift-ci[bot]@users.noreply.github.com>2022-06-27 12:20:51 +0000
committerGitHub <noreply@github.com>2022-06-27 12:20:51 +0000
commitc8cb7a2b9964351c3d82228cda50942beb67f095 (patch)
tree622ccd46e515f4208c51f1bb4a9a72984310dc32 /vendor
parent3176b3fe011aa3323ba192e90efe516d0701e46e (diff)
parent041947b11a5b2ede2476054f13bdbee7459340be (diff)
downloadpodman-c8cb7a2b9964351c3d82228cda50942beb67f095.tar.gz
podman-c8cb7a2b9964351c3d82228cda50942beb67f095.tar.bz2
podman-c8cb7a2b9964351c3d82228cda50942beb67f095.zip
Merge pull request #14724 from containers/dependabot/go_modules/github.com/stretchr/testify-1.7.5
Bump github.com/stretchr/testify from 1.7.4 to 1.7.5
Diffstat (limited to 'vendor')
-rw-r--r--vendor/github.com/stretchr/testify/assert/assertion_compare.go24
-rw-r--r--vendor/modules.txt2
2 files changed, 24 insertions, 2 deletions
diff --git a/vendor/github.com/stretchr/testify/assert/assertion_compare.go b/vendor/github.com/stretchr/testify/assert/assertion_compare.go
index 3bb22a971..95d8e59da 100644
--- a/vendor/github.com/stretchr/testify/assert/assertion_compare.go
+++ b/vendor/github.com/stretchr/testify/assert/assertion_compare.go
@@ -1,6 +1,7 @@
package assert
import (
+ "bytes"
"fmt"
"reflect"
"time"
@@ -32,7 +33,8 @@ var (
stringType = reflect.TypeOf("")
- timeType = reflect.TypeOf(time.Time{})
+ timeType = reflect.TypeOf(time.Time{})
+ bytesType = reflect.TypeOf([]byte{})
)
func compare(obj1, obj2 interface{}, kind reflect.Kind) (CompareType, bool) {
@@ -323,6 +325,26 @@ func compare(obj1, obj2 interface{}, kind reflect.Kind) (CompareType, bool) {
return compare(timeObj1.UnixNano(), timeObj2.UnixNano(), reflect.Int64)
}
+ case reflect.Slice:
+ {
+ // We only care about the []byte type.
+ if !canConvert(obj1Value, bytesType) {
+ break
+ }
+
+ // []byte can be compared!
+ bytesObj1, ok := obj1.([]byte)
+ if !ok {
+ bytesObj1 = obj1Value.Convert(bytesType).Interface().([]byte)
+
+ }
+ bytesObj2, ok := obj2.([]byte)
+ if !ok {
+ bytesObj2 = obj2Value.Convert(bytesType).Interface().([]byte)
+ }
+
+ return CompareType(bytes.Compare(bytesObj1, bytesObj2)), true
+ }
}
return compareEqual, false
diff --git a/vendor/modules.txt b/vendor/modules.txt
index 9b0e22391..cd7e224b3 100644
--- a/vendor/modules.txt
+++ b/vendor/modules.txt
@@ -642,7 +642,7 @@ github.com/spf13/cobra
github.com/spf13/pflag
# github.com/stefanberger/go-pkcs11uri v0.0.0-20201008174630-78d3cae3a980
github.com/stefanberger/go-pkcs11uri
-# github.com/stretchr/testify v1.7.4
+# github.com/stretchr/testify v1.7.5
## explicit
github.com/stretchr/testify/assert
github.com/stretchr/testify/require