hyperledger-iroha / iroha

Iroha - A simple, enterprise-grade decentralized ledger
https://wiki.hyperledger.org/display/iroha
Apache License 2.0
443 stars 277 forks source link

fix: Fix running tests for individual crates #5210

Closed dima74 closed 4 weeks ago

dima74 commented 4 weeks ago

Currently some crates can't be tested individually, e.g.:

cargo test --package iroha_swarm

=>

   Compiling iroha_config v2.0.0-rc.1.0 (/home/dima/soramitsu/fresh/iroha/crates/iroha_config)
error[E0277]: `strum::ParseError` doesn't implement `std::fmt::Display`
  --> crates/iroha_config/src/kura.rs:17:5

This PR fixes it. I used the following commands to test it:

``` cargo test --no-run --package iroha && cargo test --no-run --package iroha_cli && cargo test --no-run --package iroha_codec && cargo test --no-run --package iroha_config && cargo test --no-run --package iroha_config_base && cargo test --no-run --package iroha_config_base_derive && cargo test --no-run --package iroha_core && cargo test --no-run --package iroha_crypto && cargo test --no-run --package iroha_data_model && cargo test --no-run --package iroha_data_model_derive && cargo test --no-run --package iroha_derive && cargo test --no-run --package iroha_executor && cargo test --no-run --package iroha_executor_data_model && cargo test --no-run --package iroha_executor_data_model_derive && cargo test --no-run --package iroha_executor_derive && cargo test --no-run --package iroha_ffi && cargo test --no-run --package iroha_ffi_derive && cargo test --no-run --package iroha_futures && cargo test --no-run --package iroha_futures_derive && cargo test --no-run --package iroha_genesis && cargo test --no-run --package iroha_kagami && cargo test --no-run --package iroha_logger && cargo test --no-run --package iroha_macro && cargo test --no-run --package iroha_macro_utils && cargo test --no-run --package iroha_multisig_data_model && cargo test --no-run --package iroha_numeric && cargo test --no-run --package iroha_p2p && cargo test --no-run --package iroha_primitives && cargo test --no-run --package iroha_primitives_derive && cargo test --no-run --package iroha_schema && cargo test --no-run --package iroha_schema_derive && cargo test --no-run --package iroha_schema_gen && cargo test --no-run --package iroha_smart_contract && cargo test --no-run --package iroha_smart_contract_derive && cargo test --no-run --package iroha_smart_contract_utils && cargo test --no-run --package iroha_swarm && cargo test --no-run --package iroha_telemetry && cargo test --no-run --package iroha_telemetry_derive && cargo test --no-run --package iroha_test_network && cargo test --no-run --package iroha_test_samples && cargo test --no-run --package iroha_torii && cargo test --no-run --package iroha_torii_const && cargo test --no-run --package iroha_trigger && cargo test --no-run --package iroha_trigger_derive && cargo test --no-run --package iroha_version && cargo test --no-run --package iroha_version_derive && cargo test --no-run --package iroha_wasm_builder && cargo test --no-run --package iroha_wasm_codec && cargo test --no-run --package iroha_wasm_codec_derive && cargo test --no-run --package iroha_wasm_test_runner && cargo test --no-run --package irohad && cargo test --no-run --package kura_inspector ```

Running tests for individual crate is useful when running tests from the IDE, or when using env UPDATE_EXPECT=1

mversic commented 4 weeks ago

Would be good to open a ticket to deal with this in ci

dima74 commented 4 weeks ago

Would be good to open a ticket to deal with this in ci

5211