diff options
author | dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> | 2022-06-24 12:09:16 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-24 12:09:16 +0000 |
commit | 041947b11a5b2ede2476054f13bdbee7459340be (patch) | |
tree | 69e0f4ea3170b21820f2095e231f1f8b3017bac3 /vendor | |
parent | 8e88abda85f7bf44b6857ad5d62c8ef58206fce5 (diff) | |
download | podman-041947b11a5b2ede2476054f13bdbee7459340be.tar.gz podman-041947b11a5b2ede2476054f13bdbee7459340be.tar.bz2 podman-041947b11a5b2ede2476054f13bdbee7459340be.zip |
Bump github.com/stretchr/testify from 1.7.4 to 1.7.5
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.7.4 to 1.7.5.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](https://github.com/stretchr/testify/compare/v1.7.4...v1.7.5)
---
updated-dependencies:
- dependency-name: github.com/stretchr/testify
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Diffstat (limited to 'vendor')
-rw-r--r-- | vendor/github.com/stretchr/testify/assert/assertion_compare.go | 24 | ||||
-rw-r--r-- | vendor/modules.txt | 2 |
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 |