Skip to content

Commit

Permalink
Bump github.com/stretchr/testify from 1.9.0 to 1.10.0 (#2226)
Browse files Browse the repository at this point in the history
* Bump github.com/stretchr/testify from 1.9.0 to 1.10.0

Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.9.0 to 1.10.0.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](stretchr/testify@v1.9.0...v1.10.0)

---
updated-dependencies:
- dependency-name: github.com/stretchr/testify
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* Updated Changelog

* Fix uses of NotSame which now fails if either isn't a pointer.

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot[bot] <dependabot[bot]@users.noreply.github.com>
Co-authored-by: Daniel Wedul <[email protected]>
  • Loading branch information
3 people authored Nov 26, 2024
1 parent f119b09 commit 90aa839
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 19 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* `github.com/stretchr/testify` bumped to v1.10.0 (from v1.9.0) [PR 2226](https://github.com/provenance-io/provenance/pull/2226).
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ require (
github.com/spf13/cobra v1.8.1
github.com/spf13/pflag v1.0.5
github.com/spf13/viper v1.19.0
github.com/stretchr/testify v1.9.0
github.com/stretchr/testify v1.10.0
golang.org/x/exp v0.0.0-20240404231335-c0f41cb1a7a0
golang.org/x/text v0.20.0
google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142
Expand Down
3 changes: 2 additions & 1 deletion go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -997,8 +997,9 @@ github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o
github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8=
github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU=
github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 h1:epCh84lMvA70Z7CTTCmYQn2CKbY8j86K7/FAIr141uY=
Expand Down
4 changes: 2 additions & 2 deletions x/marker/keeper/keeper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2947,9 +2947,9 @@ func TestReqAttrBypassAddrs(t *testing.T) {
expected := app.MarkerKeeper.GetReqAttrBypassAddrs()
actual := app.MarkerKeeper.GetReqAttrBypassAddrs()
if assert.Equal(t, expected, actual, "GetReqAttrBypassAddrs()") {
if assert.NotSame(t, expected, actual, "GetReqAttrBypassAddrs()") {
if assert.NotSame(t, &expected, &actual, "GetReqAttrBypassAddrs()") {
for i := range expected {
assert.NotSame(t, expected[i], actual[i], "GetReqAttrBypassAddrs()[%d]", i)
assert.NotSame(t, &expected[i], &actual[i], "GetReqAttrBypassAddrs()[%d]", i)
}
}
}
Expand Down
12 changes: 6 additions & 6 deletions x/marker/types/immutable_addresses_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,18 +49,18 @@ func TestImmutableAccAddresses(t *testing.T) {
// address was copied to a new slice too.
addrs := iAddrs.GetSlice()
require.Equal(t, tc.addrs, addrs, "GetSlice() compared to expected")
require.NotSame(t, tc.addrs, addrs, "GetSlice() compared to expected")
require.NotSame(t, &tc.addrs, &addrs, "GetSlice() compared to expected")
for i := range tc.addrs {
require.NotSame(t, tc.addrs[i], addrs[i], "GetSlice()[%d] compared to expected", i)
require.NotSame(t, &tc.addrs[i], &addrs[i], "GetSlice()[%d] compared to expected", i)
}

// Get the slice five more times and make sure each one is a fresh copy.
for x := 1; x <= 5; x++ {
addrs2 := iAddrs.GetSlice()
require.Equal(t, addrs, addrs2, "[%d]: GetSlice() compared to previous result", x)
require.NotSame(t, addrs, addrs2, "[%d]: GetSlice() compared to previous result", x)
require.NotSame(t, &addrs, &addrs2, "[%d]: GetSlice() compared to previous result", x)
for i := range tc.addrs {
require.NotSame(t, addrs[i], addrs2[i], "[%d]: GetSlice()[%d] compared to previous result", x, i)
require.NotSame(t, &addrs[i], &addrs2[i], "[%d]: GetSlice()[%d] compared to previous result", x, i)
}
addrs = addrs2
}
Expand Down Expand Up @@ -168,9 +168,9 @@ func TestDeepCopyAccAddresses(t *testing.T) {
// Make sure the result is equal to what was provided, but in a different slice.
// Also make sure each entry slice was also copied.
if assert.Equal(t, tc.orig, actual, "deepCopyAccAddresses result") {
if assert.NotSame(t, tc.orig, actual, "deepCopyAccAddresses result") {
if assert.NotSame(t, &tc.orig, &actual, "deepCopyAccAddresses result") {
for i := range tc.orig {
assert.NotSame(t, tc.orig[i], actual[i], "deepCopyAccAddresses result[%d]", i)
assert.NotSame(t, &tc.orig[i], &actual[i], "deepCopyAccAddresses result[%d]", i)
}
}
}
Expand Down
18 changes: 9 additions & 9 deletions x/metadata/types/signer_utils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -475,16 +475,16 @@ func TestPartyDetails_Copy(t *testing.T) {
require.NotPanics(t, testFunc, "Copy()")
require.Equal(t, tc.pd, actual, "result of Copy()")
if tc.pd != nil && actual != nil {
assert.NotSame(t, tc.pd, actual, "result of Copy()")
assert.NotSame(t, tc.pd.acc, actual.acc, "acc field")
assert.NotSame(t, &tc.pd, &actual, "result of Copy()")
assert.NotSame(t, &tc.pd.acc, &actual.acc, "acc field")
if len(actual.acc) > 0 {
// Change the first byte in the copy to make sure it doesn't also change in the original.
actual.acc[0] = actual.acc[0] + 1
assert.NotEqual(t, tc.pd.acc, actual.acc, "the acc field after changing it in the copy")
// And put it back so we don't mess up anything else.
actual.acc[0] = actual.acc[0] - 1
}
assert.NotSame(t, tc.pd.signerAcc, actual.signerAcc, "signerAcc field")
assert.NotSame(t, &tc.pd.signerAcc, &actual.signerAcc, "signerAcc field")
if len(actual.signerAcc) > 0 {
// Change the first byte in the copy to make sure it doesn't also change in the original.
actual.signerAcc[0] = actual.signerAcc[0] + 1
Expand Down Expand Up @@ -1825,10 +1825,10 @@ func TestNewTestablePartyDetails(t *testing.T) {
}
require.NotPanics(t, testFunc, "NewTestablePartyDetails")
assert.Equal(t, expected, actual, "result of NewTestablePartyDetails")
assert.NotSame(t, pd.acc, actual.Acc, "the acc field")
assert.NotSame(t, &pd.acc, &actual.Acc, "the acc field")
actual.Acc[0] = actual.Acc[0] + 1
assert.NotEqual(t, pd.acc, actual.Acc, "the acc field after a change to it in the result")
assert.NotSame(t, pd.signerAcc, actual.SignerAcc, "the signerAcc field")
assert.NotSame(t, &pd.signerAcc, &actual.SignerAcc, "the signerAcc field")
actual.SignerAcc[0] = actual.SignerAcc[0] + 1
assert.NotEqual(t, pd.signerAcc, actual.SignerAcc, "the signerAcc field after a change to it in the result")
})
Expand Down Expand Up @@ -2067,8 +2067,8 @@ func TestNewAuthzCache(t *testing.T) {
assert.Empty(t, c1.isWasm, "isWasm map")

assert.NotSame(t, c1, c2, "NewAuthzCache twice")
assert.NotSame(t, c1.acceptable, c2.acceptable, "acceptable maps of two NewAuthzCache")
assert.NotSame(t, c1.isWasm, c2.isWasm, "isWasm maps of two NewAuthzCache")
assert.NotSame(t, &c1.acceptable, &c2.acceptable, "acceptable maps of two NewAuthzCache")
assert.NotSame(t, &c1.isWasm, &c2.isWasm, "isWasm maps of two NewAuthzCache")
}

func TestAuthzCache_Clear(t *testing.T) {
Expand Down Expand Up @@ -2274,7 +2274,7 @@ func TestAuthzCache_GetAcceptableMap(t *testing.T) {
}
require.NotPanics(t, testFunc, "GetAcceptableMap")
if expected != nil && actual != nil {
require.NotSame(t, tc.cache.acceptable, actual, "result from GetAcceptableMap")
require.NotSame(t, &tc.cache.acceptable, &actual, "result from GetAcceptableMap")
}
require.Equal(t, expected, actual, "result from GetAcceptableMap")
if len(actual) > 0 {
Expand Down Expand Up @@ -2370,7 +2370,7 @@ func TestAuthzCache_GetIsWasmMap(t *testing.T) {
}
require.NotPanics(t, testFunc, "GetIsWasmMap")
if expected != nil && actual != nil {
require.NotSame(t, tc.cache.isWasm, actual, "result from GetIsWasmMap")
require.NotSame(t, &tc.cache.isWasm, &actual, "result from GetIsWasmMap")
}
require.Equal(t, expected, actual, "result from GetIsWasmMap")
if len(actual) > 0 {
Expand Down

0 comments on commit 90aa839

Please sign in to comment.