build(deps): use Go 1.23 instead of Go 1.22 (#21280)
This commit is contained in:
@@ -18,6 +18,8 @@ import (
|
||||
"github.com/cosmos/cosmos-sdk/types"
|
||||
)
|
||||
|
||||
type dummyCtxKey struct{}
|
||||
|
||||
type contextTestSuite struct {
|
||||
suite.Suite
|
||||
}
|
||||
@@ -137,7 +139,7 @@ func (s *contextTestSuite) TestContextWithCustom() {
|
||||
s.Require().Equal(cp, ctx.WithConsensusParams(cp).ConsensusParams())
|
||||
|
||||
// test inner context
|
||||
newContext := context.WithValue(ctx.Context(), struct{}{}, "value")
|
||||
newContext := context.WithValue(ctx.Context(), dummyCtxKey{}, "value")
|
||||
s.Require().NotEqual(ctx.Context(), ctx.WithContext(newContext).Context())
|
||||
}
|
||||
|
||||
@@ -225,7 +227,7 @@ func (s *contextTestSuite) TestUnwrapSDKContext() {
|
||||
s.Require().Panics(func() { types.UnwrapSDKContext(ctx) })
|
||||
|
||||
// test unwrapping when we've used context.WithValue
|
||||
ctx = context.WithValue(sdkCtx, struct{}{}, "bar")
|
||||
ctx = context.WithValue(sdkCtx, dummyCtxKey{}, "bar")
|
||||
sdkCtx2 = types.UnwrapSDKContext(ctx)
|
||||
s.Require().Equal(sdkCtx, sdkCtx2)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user