input-output-hk / mithril

Stake-based threshold multi-signatures protocol
https://mithril.network
Apache License 2.0
116 stars 36 forks source link

Create a test Cardano transactions builder #1703

Closed dlachaume closed 2 months ago

dlachaume commented 2 months ago

Content

This PR adds the CardanoTransactionsBuilder, which aims to easily build transactions for test cases.

Pre-submit checklist

Issue(s)

Closes #1667

github-actions[bot] commented 2 months ago

Test Results

    3 files  ± 0     43 suites  ±0   8m 29s :stopwatch: -9s   985 tests +14    985 :white_check_mark: +14  0 :zzz: ±0  0 :x: ±0  1 079 runs  +14  1 079 :white_check_mark: +14  0 :zzz: ±0  0 :x: ±0 

Results for commit c8342cb7. ± Comparison against base commit 1ef4fb76.

This pull request removes 1 and adds 15 tests. Note that renamed tests count towards both. ``` mithril-persistence ‑ database::repository::cardano_transaction_repository::tests::repository_store_transactions_with_existing_hash_doesnt_erase_existing_data ``` ``` mithril-common ‑ test_utils::cardano_transactions_builder::test::build_block_ranges_return_many_transactions_per_block_when_requested mithril-common ‑ test_utils::cardano_transactions_builder::test::build_block_ranges_return_the_number_of_block_ranges_requested mithril-common ‑ test_utils::cardano_transactions_builder::test::build_block_ranges_with_many_blocks_per_block_ranges mithril-common ‑ test_utils::cardano_transactions_builder::test::build_transactions_with_immutable_file_starting_at_a_specific_number mithril-common ‑ test_utils::cardano_transactions_builder::test::build_transactions_with_many_blocks_per_block_ranges mithril-common ‑ test_utils::cardano_transactions_builder::test::build_transactions_with_many_transactions_per_immutable_file mithril-common ‑ test_utils::cardano_transactions_builder::test::build_transactions_with_same_number_of_transactions_per_immutable_file mithril-common ‑ test_utils::cardano_transactions_builder::test::generate_one_block_range_return_one_transaction_by_default mithril-common ‑ test_utils::cardano_transactions_builder::test::only_the_last_block_is_not_full_when_we_can_not_fill_all_blocks mithril-common ‑ test_utils::cardano_transactions_builder::test::return_all_transactions_in_same_block_when_ask_less_transactions_than_transactions_per_block … ```

:recycle: This comment has been updated with latest results.