Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: backport tests changes from #23262 (partial backport #23262) #23356

Merged
merged 3 commits into from
Jan 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion server/v2/cometbft/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ require (
cosmossdk.io/errors/v2 v2.0.0
cosmossdk.io/log v1.5.0
cosmossdk.io/schema v1.0.0 //main
cosmossdk.io/server/v2 v2.0.0-beta.1.0.20250113101424-c79e19dfc9ca // main
cosmossdk.io/server/v2 v2.0.0-beta.1.0.20250113211313-b461a3142af5 // main
cosmossdk.io/server/v2/appmanager v1.0.0-beta.1.0.20250109081935-cf721a654090 // main
cosmossdk.io/server/v2/stf v1.0.0-beta.1.0.20250109081935-cf721a654090 // main
cosmossdk.io/store/v2 v2.0.0-beta.1.0.20250113105648-064c9ba6385a // main
Expand Down
4 changes: 2 additions & 2 deletions server/v2/cometbft/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ cosmossdk.io/math v1.5.0 h1:sbOASxee9Zxdjd6OkzogvBZ25/hP929vdcYcBJQbkLc=
cosmossdk.io/math v1.5.0/go.mod h1:AAwwBmUhqtk2nlku174JwSll+/DepUXW3rWIXN5q+Nw=
cosmossdk.io/schema v1.0.0 h1:/diH4XJjpV1JQwuIozwr+A4uFuuwanFdnw2kKeiXwwQ=
cosmossdk.io/schema v1.0.0/go.mod h1:RDAhxIeNB4bYqAlF4NBJwRrgtnciMcyyg0DOKnhNZQQ=
cosmossdk.io/server/v2 v2.0.0-beta.1.0.20250113101424-c79e19dfc9ca h1:qabWvfrRR/bp2zmn/VpZgyGP1ePAlwVLUAQ041kdPX0=
cosmossdk.io/server/v2 v2.0.0-beta.1.0.20250113101424-c79e19dfc9ca/go.mod h1:5G6Ms45I5XWH1OPCqAgjrJZkh7SYJYRrXJkIuM95KeY=
cosmossdk.io/server/v2 v2.0.0-beta.1.0.20250113211313-b461a3142af5 h1:Bg6oLXogXDCTBtTZr7qntCv2WERCZE9bK8SA0cjv8BY=
cosmossdk.io/server/v2 v2.0.0-beta.1.0.20250113211313-b461a3142af5/go.mod h1:5G6Ms45I5XWH1OPCqAgjrJZkh7SYJYRrXJkIuM95KeY=
cosmossdk.io/server/v2/appmanager v1.0.0-beta.1.0.20250109081935-cf721a654090 h1:BlNFJZGtVsyaxydK3dIpklhQubbj5Sr2Eqh1Wow0lL4=
cosmossdk.io/server/v2/appmanager v1.0.0-beta.1.0.20250109081935-cf721a654090/go.mod h1:l6oCGNcucF6/U949UwRj+RemNzq5475ovNHohcvN1YM=
cosmossdk.io/server/v2/stf v1.0.0-beta.1.0.20250109081935-cf721a654090 h1:K0HN3TD7jz0zJIbvv1X5gkvEqhcBLqz71T4Al2ujols=
Expand Down
2 changes: 1 addition & 1 deletion simapp/v2/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ require (
cosmossdk.io/log v1.5.0
cosmossdk.io/math v1.5.0
cosmossdk.io/runtime/v2 v2.0.0-20250109081935-cf721a654090 // main
cosmossdk.io/server/v2 v2.0.0-beta.1.0.20250113101424-c79e19dfc9ca // main
cosmossdk.io/server/v2 v2.0.0-beta.1.0.20250113211313-b461a3142af5 // main
cosmossdk.io/server/v2/appmanager v1.0.0-beta.1.0.20250109081935-cf721a654090
cosmossdk.io/server/v2/cometbft v1.0.0-beta.1
cosmossdk.io/store/v2 v2.0.0-beta.1.0.20250113105648-064c9ba6385a // main
Expand Down
4 changes: 2 additions & 2 deletions simapp/v2/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -218,8 +218,8 @@ cosmossdk.io/runtime/v2 v2.0.0-20250109081935-cf721a654090 h1:zAgv9XPOMdSkwqd2Vh
cosmossdk.io/runtime/v2 v2.0.0-20250109081935-cf721a654090/go.mod h1:YRfC3bBBnZYvz0W8VubR/uImEYqi/qBH6cVAMVx+KOA=
cosmossdk.io/schema v1.0.0 h1:/diH4XJjpV1JQwuIozwr+A4uFuuwanFdnw2kKeiXwwQ=
cosmossdk.io/schema v1.0.0/go.mod h1:RDAhxIeNB4bYqAlF4NBJwRrgtnciMcyyg0DOKnhNZQQ=
cosmossdk.io/server/v2 v2.0.0-beta.1.0.20250113101424-c79e19dfc9ca h1:qabWvfrRR/bp2zmn/VpZgyGP1ePAlwVLUAQ041kdPX0=
cosmossdk.io/server/v2 v2.0.0-beta.1.0.20250113101424-c79e19dfc9ca/go.mod h1:5G6Ms45I5XWH1OPCqAgjrJZkh7SYJYRrXJkIuM95KeY=
cosmossdk.io/server/v2 v2.0.0-beta.1.0.20250113211313-b461a3142af5 h1:Bg6oLXogXDCTBtTZr7qntCv2WERCZE9bK8SA0cjv8BY=
cosmossdk.io/server/v2 v2.0.0-beta.1.0.20250113211313-b461a3142af5/go.mod h1:5G6Ms45I5XWH1OPCqAgjrJZkh7SYJYRrXJkIuM95KeY=
cosmossdk.io/server/v2/appmanager v1.0.0-beta.1.0.20250109081935-cf721a654090 h1:BlNFJZGtVsyaxydK3dIpklhQubbj5Sr2Eqh1Wow0lL4=
cosmossdk.io/server/v2/appmanager v1.0.0-beta.1.0.20250109081935-cf721a654090/go.mod h1:l6oCGNcucF6/U949UwRj+RemNzq5475ovNHohcvN1YM=
cosmossdk.io/server/v2/stf v1.0.0-beta.1.0.20250109081935-cf721a654090 h1:K0HN3TD7jz0zJIbvv1X5gkvEqhcBLqz71T4Al2ujols=
Expand Down
2 changes: 1 addition & 1 deletion tests/systemtests/bank_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ func TestBankGRPCQueries(t *testing.T) {
"error when querying supply with height greater than block height",
supplyUrl,
map[string]string{
blockHeightHeader: fmt.Sprintf("%d", blockHeight+5),
blockHeightHeader: fmt.Sprintf("%d", blockHeight+5000),
},
http.StatusBadRequest,
"invalid height",
Expand Down
10 changes: 4 additions & 6 deletions tests/systemtests/distribution_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -179,26 +179,24 @@ func TestDistrValidatorGRPCQueries(t *testing.T) {

// test validator slashes grpc endpoint
slashURL := baseurl + `/cosmos/distribution/v1beta1/validators/%s/slashes`
invalidStartingHeightOutput := `{"code":3, "message":"1 error(s) decoding:\n\n* cannot parse 'starting_height' as uint: strconv.ParseUint: parsing \"-3\": invalid syntax", "details":[]}`
invalidEndingHeightOutput := `{"code":3, "message":"1 error(s) decoding:\n\n* cannot parse 'ending_height' as uint: strconv.ParseUint: parsing \"-3\": invalid syntax", "details":[]}`
invalidHeightOutput := `{"code":"NUMBER", "details":[]interface {}{}, "message":"strconv.ParseUint: parsing \"NUMBER\": invalid syntax"}`

if !systest.IsV2() {
invalidStartingHeightOutput = `{"code":3, "message":"strconv.ParseUint: parsing \"-3\": invalid syntax", "details":[]}`
invalidEndingHeightOutput = invalidStartingHeightOutput
invalidHeightOutput = `{"code":3, "message":"strconv.ParseUint: parsing \"-3\": invalid syntax", "details":[]}`
}

slashTestCases := []systest.RestTestCase{
{
Name: "invalid start height",
Url: fmt.Sprintf(slashURL+`?starting_height=%s&ending_height=%s`, valOperAddr, "-3", "3"),
ExpCode: http.StatusBadRequest,
ExpOut: invalidStartingHeightOutput,
ExpOut: invalidHeightOutput,
},
{
Name: "invalid end height",
Url: fmt.Sprintf(slashURL+`?starting_height=%s&ending_height=%s`, valOperAddr, "1", "-3"),
ExpCode: http.StatusBadRequest,
ExpOut: invalidEndingHeightOutput,
ExpOut: invalidHeightOutput,
},
{
Name: "valid request get slashes",
Expand Down
Loading