cosmos / ibc-go

Inter-Blockchain Communication Protocol (IBC) implementation in Golang.
https://ibc.cosmos.network/
MIT License
554 stars 593 forks source link

Use expected errors instead of boolean values #7175

Open bznein opened 3 months ago

bznein commented 3 months ago

Summary of Bug

This is an umbrella issue to enumerate all the test files that use tc.expPass rather than expecting a specific error, extracted with the following command (might not cover ALL of them):

internal/validate/validate_test.go
modules/apps/27-interchain-accounts/controller/keeper/keeper_test.go
modules/apps/27-interchain-accounts/controller/ibc_middleware_test.go
modules/apps/27-interchain-accounts/genesis/types/genesis_test.go
modules/apps/27-interchain-accounts/host/keeper/genesis_test.go
modules/apps/27-interchain-accounts/host/keeper/msg_server_test.go
modules/apps/27-interchain-accounts/host/keeper/handshake_test.go
modules/apps/27-interchain-accounts/host/keeper/keeper_test.go
modules/apps/27-interchain-accounts/host/types/codec_test.go
modules/apps/27-interchain-accounts/host/types/msgs_test.go
modules/apps/27-interchain-accounts/host/ibc_module_test.go
modules/apps/27-interchain-accounts/types/account_test.go
modules/apps/27-interchain-accounts/types/codec_test.go
modules/apps/27-interchain-accounts/types/metadata_test.go
modules/apps/27-interchain-accounts/types/packet_test.go
modules/apps/27-interchain-accounts/types/port_test.go
modules/apps/29-fee/keeper/grpc_query_test.go
modules/apps/29-fee/keeper/msg_server_test.go
modules/apps/29-fee/keeper/relay_test.go
modules/apps/29-fee/types/codec_test.go
modules/apps/29-fee/types/fee_test.go
modules/apps/29-fee/types/genesis_test.go
modules/apps/29-fee/types/keys_test.go
modules/apps/29-fee/types/msgs_test.go
modules/apps/29-fee/ibc_middleware_test.go
modules/apps/transfer/keeper/grpc_query_test.go
modules/apps/transfer/keeper/invariants_test.go
modules/apps/transfer/keeper/keeper_test.go
modules/apps/transfer/keeper/msg_server_test.go
modules/apps/transfer/types/codec_test.go
modules/apps/transfer/types/genesis_test.go
modules/apps/transfer/types/msgs_test.go
modules/apps/transfer/types/transfer_authorization_test.go
modules/apps/transfer/types/packet_test.go
modules/capability/types/genesis_test.go
modules/core/02-client/keeper/client_test.go
modules/core/02-client/keeper/grpc_query_test.go
modules/core/02-client/keeper/keeper_test.go
modules/core/02-client/types/client_test.go
modules/core/02-client/types/codec_test.go
modules/core/02-client/types/genesis_test.go
modules/core/02-client/types/keys_test.go
modules/core/02-client/types/msgs_test.go
modules/core/02-client/types/params_test.go
modules/core/02-client/types/router_test.go
modules/core/03-connection/keeper/grpc_query_test.go
modules/core/03-connection/keeper/keeper_test.go
modules/core/03-connection/keeper/handshake_test.go
modules/core/03-connection/keeper/verify_test.go
modules/core/03-connection/types/codec_test.go
modules/core/03-connection/types/genesis_test.go
modules/core/03-connection/types/keys_test.go
modules/core/03-connection/types/params_test.go
modules/core/03-connection/types/version_test.go
modules/core/03-connection/types/connection_test.go
modules/core/03-connection/types/msgs_test.go
modules/core/04-channel/keeper/grpc_query_test.go
modules/core/04-channel/keeper/keeper_test.go
modules/core/04-channel/keeper/upgrade_test.go
modules/core/04-channel/keeper/handshake_test.go
modules/core/04-channel/keeper/packet_test.go
modules/core/04-channel/keeper/timeout_test.go
modules/core/04-channel/types/channel_test.go
modules/core/04-channel/types/codec_test.go
modules/core/04-channel/types/genesis_test.go
modules/core/04-channel/types/keys_test.go
modules/core/04-channel/types/packet_test.go <---- This is mentioned in #7147 and should be done after eureka is merged
modules/core/04-channel/types/timeout_test.go
modules/core/04-channel/types/upgrade_test.go
modules/core/23-commitment/types/codec_test.go
modules/core/23-commitment/types/utils_test.go
modules/core/24-host/validate_test.go
modules/core/24-host/parse_test.go
modules/core/keeper/keeper_test.go
modules/core/keeper/msg_server_test.go
modules/core/genesis_test.go
modules/light-clients/06-solomachine/client_state_test.go
modules/light-clients/06-solomachine/codec_test.go
modules/light-clients/06-solomachine/consensus_state_test.go
modules/light-clients/06-solomachine/header_test.go
modules/light-clients/06-solomachine/misbehaviour_test.go
modules/light-clients/06-solomachine/proof_test.go
modules/light-clients/07-tendermint/codec_test.go
modules/light-clients/07-tendermint/header_test.go
modules/light-clients/07-tendermint/misbehaviour_handle_test.go
modules/light-clients/07-tendermint/misbehaviour_test.go
modules/light-clients/07-tendermint/proposal_handle_test.go
modules/light-clients/07-tendermint/store_test.go
modules/light-clients/07-tendermint/update_test.go
modules/light-clients/08-wasm/keeper/grpc_query_test.go
modules/light-clients/08-wasm/keeper/keeper_test.go
modules/light-clients/08-wasm/types/client_message_test.go
modules/light-clients/08-wasm/types/codec_test.go
modules/light-clients/08-wasm/types/genesis_test.go
modules/light-clients/08-wasm/types/client_state_test.go
modules/light-clients/08-wasm/types/msgs_test.go
modules/light-clients/09-localhost/light_client_module_test.go

To make the work easier, we can split them into the following groups and create separate issues for them

For Admin Use

DimitrisJim commented 3 months ago

would be nice if we could make this into a bullet list and slap the help wanted label. contributors can ask for specific subsections of it.

bznein commented 3 months ago

would be nice if we could make this into a bullet list and slap the help wanted label. contributors can ask for specific subsections of it.

great idea, done!